/* ==================== 首页 - 纯手机端H5 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
html { width: 100%; height: 100%; overflow: hidden; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; background: #f0f2f5; color: #333; line-height: 1.5; width: 100%; height: 100%; overflow: hidden; user-select: none; -webkit-user-select: none; }

/* 已登录主播横幅 */
.host-banner { position: fixed; top: 0; left: 0; right: 0; height: 44px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 1001; }
.host-info { display: flex; align-items: center; gap: 8px; }
.host-label { font-size: 12px; opacity: 0.8; }
.host-name { font-size: 15px; font-weight: 600; }
.host-uid { font-size: 12px; opacity: 0.8; }
.host-switch { background: rgba(255,255,255,0.2); border: none; color: #fff; padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; }

/* 头部 */
.header { position: fixed; top: 44px; left: 0; right: 0; height: 50px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 1000; }
.header-content { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.header-title { font-size: 17px; font-weight: 600; }
.header-link { font-size: 14px; color: rgba(255,255,255,0.8); text-decoration: none; padding: 6px 12px; background: rgba(255,255,255,0.1); border-radius: 20px; }

/* 内容区 */
.page-container { position: fixed; top: 94px; left: 0; right: 0; bottom: 60px; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card-header { margin-bottom: 14px; }
.card-header h2 { font-size: 15px; font-weight: 600; color: #333; }
.card-body { padding: 0; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 14px; color: #666; margin-bottom: 6px; display: block; }
.form-input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #e5e5e5; border-radius: 8px; font-size: 15px; background: #fff; }
.form-input:focus { border-color: #1677ff; outline: none; }
.form-select { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #e5e5e5; border-radius: 8px; font-size: 15px; background: #fff; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.input-with-history { position: relative; }

/* 下拉 */
.dropdown-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; max-height: 220px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000; display: none; }
.dropdown-list.show { display: block; }
.dropdown-item { padding: 12px 14px; border-bottom: 1px solid #f5f5f5; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.dropdown-item:active { background: #f5f5f5; }
.dropdown-item-value { font-weight: 600; font-size: 14px; }
.dropdown-item-subtitle { font-size: 12px; color: #999; margin-top: 2px; }

/* 历史开播ID */
.tiktok-id-item { justify-content: space-between; }
.tiktok-id-text { font-weight: 500; color: #333; }
.tiktok-id-delete { color: #999; font-size: 18px; padding: 0 8px; cursor: pointer; }
.tiktok-id-delete:hover { color: #ff4d4f; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; }
.btn-success { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%); color: #fff; }
.btn-small { height: 36px; padding: 0 12px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-full-margin { width: 100%; margin-bottom: 10px; }
.btn:active { opacity: 0.85; }
.btn:disabled { opacity: 0.5; background: #e5e5e5; color: #999; cursor: not-allowed; }

/* 状态 */
.status-display { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.status-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.status-row:last-child { margin-bottom: 0; }
.label-text { color: #999; font-size: 14px; }
.status-online { color: #52c41a; font-weight: 600; }
.status-offline { color: #999; font-weight: 600; }

/* 底部导航 */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #fff; display: flex; border-top: 1px solid #e5e5e5; z-index: 1000; }
.nav-container { width: 100%; display: flex; justify-content: space-around; align-items: center; height: 100%; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; cursor: pointer; height: 100%; }
.nav-item.active { color: #1677ff; }
.nav-item-icon { font-size: 22px; margin-bottom: 2px; }
.nav-item-text { font-size: 10px; }

/* 隐藏 */
.hidden { display: none !important; }

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
    max-width: 80%;
    text-align: center;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success { background: rgba(82, 196, 26, 0.9); }
.toast.error { background: rgba(255, 77, 79, 0.9); }
.toast.warning { background: rgba(250, 173, 20, 0.9); }

/* ==================== 自定义弹窗 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.modal.show {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 320px;
    padding: 24px 20px 20px;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}
.modal-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
    white-space: pre-line;
}
.modal-buttons {
    display: flex;
    gap: 12px;
}
.modal-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}
.modal-btn-cancel:active {
    background: #e8e8e8;
}
.modal-btn-confirm {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: #fff;
}
.modal-btn-confirm:active {
    opacity: 0.85;
}
.modal-btn-confirm.danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
}
.modal-btn-confirm.success {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
}
