:root {
    --bg-dark: #080811;
    --card-bg: rgba(20, 20, 36, 0.85);
    --primary-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #00cec9 100%);
    --accent: #00cec9;
    --text-bright: #ffffff;
    --text-dim: #9090b0;
    --border-line: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background: var(--bg-dark); color: var(--text-bright); height: 100vh; overflow: hidden; }

.app-root { display: flex; flex-direction: column; height: 100vh; }

/* 顶部 Top Navbar */
.top-navbar {
    height: 64px; background: rgba(12, 12, 22, 0.95);
    backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-line);
    display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem;
    z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 1.5rem; }
.brand-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.5px; }
.brand-logo span { color: var(--accent); }
.brand-logo small { font-size: 0.65rem; background: rgba(108, 92, 231, 0.3); color: var(--accent); padding: 0.1rem 0.4rem; border-radius: 4px; margin-left: 4px; }

.search-bar-wrapper {
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-line);
    border-radius: 20px; padding: 0.4rem 0.8rem; display: flex; align-items: center; gap: 0.5rem; width: 280px;
}
.search-bar-wrapper input { background: none; border: none; color: #fff; outline: none; font-size: 0.85rem; width: 100%; }

.nav-center-tabs { display: flex; gap: 0.5rem; }
.nav-tab-link {
    background: none; border: none; color: var(--text-dim); padding: 0.5rem 1rem;
    font-size: 0.95rem; font-weight: 600; cursor: pointer; border-radius: 10px; transition: all 0.3s;
}
.nav-tab-link:hover, .nav-tab-link.active { color: #fff; background: rgba(255, 255, 255, 0.08); }

.nav-right-actions { display: flex; align-items: center; gap: 0.8rem; }
.guest-actions { display: flex; gap: 0.6rem; }
.user-profile-actions { display: flex; align-items: center; gap: 0.8rem; }

.user-avatar-dropdown { position: relative; cursor: pointer; }
.avatar-badge { width: 38px; height: 38px; background: var(--primary-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; }

.dropdown-menu {
    position: absolute; right: 0; top: 48px; background: #121224; border: 1px solid var(--border-line);
    border-radius: 12px; width: 200px; padding: 0.8rem; display: none; flex-direction: column; gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 200;
}
.dropdown-menu.active { display: flex; }
.dropdown-header { display: flex; flex-direction: column; gap: 0.2rem; }
.role-pill { font-size: 0.7rem; color: var(--accent); background: rgba(0,206,201,0.15); padding: 0.1rem 0.4rem; border-radius: 4px; align-self: flex-start; }
.dropdown-divider { height: 1px; background: var(--border-line); }
.dropdown-menu a { color: var(--text-dim); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.dropdown-menu a:hover { color: #fff; }
.logout-link { color: #ff7675 !important; }

/* 按钮样式 */
.btn { padding: 0.55rem 1.2rem; border-radius: 10px; border: none; cursor: pointer; font-weight: 600; font-size: 0.85rem; transition: transform 0.2s; }
.btn:hover { transform: translateY(-1px); }
.primary-gradient-btn { background: var(--primary-gradient); color: #fff; }
.secondary-glow-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-line); color: #fff; }
.upload-action-btn { background: rgba(0, 206, 201, 0.2); border: 1px solid var(--accent); color: var(--accent); }
.admin-action-btn { background: rgba(108, 92, 231, 0.2); border: 1px solid #6c5ce7; color: #a29bfe; }
.full-w { width: 100%; }

/* 主 Layout */
.main-body-layout { display: flex; flex: 1; overflow: hidden; }

/* 侧边 Sidebar */
.mini-sidebar {
    width: 72px; background: rgba(10, 10, 18, 0.95); border-right: 1px solid var(--border-line);
    display: flex; flex-direction: column; align-items: center; padding: 1rem 0; gap: 1.2rem;
}
.s-link { background: none; border: none; color: var(--text-dim); display: flex; flex-direction: column; align-items: center; gap: 0.2rem; cursor: pointer; }
.s-link.active, .s-link:hover { color: var(--accent); }
.s-icon { font-size: 1.4rem; }
.s-label { font-size: 0.65rem; }

/* 视图区域 */
.view-viewport { flex: 1; padding: 1.5rem; overflow-y: auto; }
.view-panel { display: none; }
.view-panel.active { display: block; }

/* 短视频模块 */
.tiktok-feed-wrapper { max-width: 420px; margin: 0 auto; }
.short-card {
    width: 100%; height: calc(100vh - 120px); max-height: 640px; background: #121222;
    border-radius: 20px; border: 1px solid var(--border-line); position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.media-stage { position: absolute; inset: 0; background: #000; }
.media-banner-placeholder {
    width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #190e2b 0%, #082126 100%); color: var(--text-dim);
}
.pulse-ring { font-size: 3.5rem; opacity: 0.7; margin-bottom: 0.5rem; }

.video-overlay-details { position: absolute; bottom: 4.5rem; left: 1rem; right: 5rem; z-index: 5; }
.creator-info-line { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.c-avatar { width: 32px; height: 32px; background: var(--primary-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; }
.btn-follow-pill { background: var(--accent); color: #000; border: none; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 700; font-size: 0.75rem; cursor: pointer; }
.v-title { font-size: 1rem; margin-bottom: 0.2rem; }
.v-desc { font-size: 0.8rem; color: var(--text-dim); }

.floating-action-bar { position: absolute; right: 1rem; bottom: 5rem; z-index: 5; display: flex; flex-direction: column; gap: 1rem; }
.f-btn { background: rgba(0,0,0,0.5); border: 1px solid var(--border-line); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.f-icon { font-size: 1.1rem; }
.f-num { font-size: 0.6rem; color: var(--text-dim); margin-top: 1px; }

.video-switch-nav { position: absolute; bottom: 1rem; left: 1rem; right: 1rem; z-index: 10; }

/* 社区模块 */
.fb-community-wrapper { max-width: 680px; margin: 0 auto; }
.create-post-card { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 16px; padding: 1.2rem; margin: 1.5rem 0; }
.create-post-card textarea { width: 100%; height: 80px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-line); border-radius: 10px; color: #fff; padding: 0.8rem; outline: none; margin-bottom: 0.8rem; }
.post-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.emoji-toolbar button { background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: 0 0.2rem; }
.posts-stream { display: flex; flex-direction: column; gap: 1rem; }
.post-card-item { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 14px; padding: 1.2rem; }
.post-meta-line { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.5rem; display: flex; justify-content: space-between; }

/* 短剧与网格 */
.drama-portal-wrapper { max-width: 1000px; margin: 0 auto; }
.portal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.portal-tag { font-size: 0.8rem; color: var(--accent); background: rgba(0,206,201,0.1); padding: 0.2rem 0.6rem; border-radius: 6px; }
.drama-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.2rem; }
.drama-item-card { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 14px; overflow: hidden; }
.drama-poster { height: 230px; background: linear-gradient(135deg, #6c5ce7, #00cec9); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; }
.drama-details { padding: 0.8rem; }

/* 小说模块 */
.novel-reader-wrapper { max-width: 700px; margin: 0 auto; }
.novel-card { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 20px; padding: 2.5rem; }
.author-tag { color: var(--text-dim); font-size: 0.85rem; }
.chapter-title { color: var(--accent); font-weight: 700; margin: 1rem 0; }
.novel-body-text p { line-height: 1.8; color: #d0d0e0; margin-bottom: 1rem; }
.novel-bottom-actions { display: flex; justify-content: space-between; margin-top: 2rem; }

/* 上传中心与管理后台 */
.creator-studio-wrapper, .admin-console-wrapper { max-width: 700px; margin: 0 auto; }
.sub-text { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.5rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.form-row input, .form-row textarea { background: rgba(0,0,0,0.3); border: 1px solid var(--border-line); padding: 0.8rem; border-radius: 8px; color: #fff; outline: none; }

.status-banner { display: flex; justify-content: space-between; align-items: center; background: var(--card-bg); padding: 1rem; border-radius: 12px; border: 1px solid var(--border-line); margin: 1rem 0; }
.green-dot { color: #00b894; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.s-box { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 12px; padding: 1.2rem; text-align: center; }
.s-box h4 { font-size: 0.8rem; color: var(--text-dim); }
.s-box p { font-size: 1.6rem; font-weight: 800; color: var(--accent); margin-top: 0.4rem; }
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.85rem; text-align: left; }
.data-table th, .data-table td { padding: 0.8rem; border-bottom: 1px solid var(--border-line); }
.badge-approved { background: rgba(0,184,148,0.2); color: #00b894; padding: 0.2rem 0.5rem; border-radius: 4px; }
.btn-danger { background: #ff7675; color: #fff; border: none; padding: 0.2rem 0.5rem; border-radius: 4px; cursor: pointer; }

/* 登录/注册 模态框 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: none; align-items: center; justify-content: center; z-index: 999; backdrop-filter: blur(8px); }
.modal-backdrop.active { display: flex; }
.auth-dialog-card { background: #121222; border: 1px solid var(--border-line); width: 90%; max-width: 420px; border-radius: 20px; padding: 2rem; position: relative; }
.auth-close-btn { position: absolute; right: 1.2rem; top: 1.2rem; background: none; border: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border-line); margin-bottom: 1.5rem; }
.auth-tab-btn { flex: 1; padding: 0.6rem; background: none; border: none; color: var(--text-dim); font-weight: 600; cursor: pointer; }
.auth-tab-btn.active { color: #fff; border-bottom: 2px solid var(--accent); }

.google-btn { width: 100%; background: #fff; color: #000; border: none; padding: 0.7rem; border-radius: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 0.6rem; cursor: pointer; margin-bottom: 1rem; }
.auth-divider { text-align: center; color: var(--text-dim); font-size: 0.75rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-line); line-height: 0.1em; }
.auth-divider span { background: #121222; padding: 0 0.5rem; }

.input-group { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.input-group label { font-size: 0.8rem; color: var(--text-dim); }
.input-group input, .input-group select { background: rgba(0,0,0,0.4); border: 1px solid var(--border-line); padding: 0.7rem; border-radius: 8px; color: #fff; outline: none; }

/* 抽屉评论 */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 300; }
.drawer-backdrop.active { display: flex; }
.drawer-card { background: #121222; border: 1px solid var(--border-line); width: 90%; max-width: 420px; border-radius: 16px; padding: 1.2rem; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.drawer-comments-body { height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.comment-card-line { background: rgba(255,255,255,0.04); padding: 0.6rem; border-radius: 8px; font-size: 0.85rem; }
.emoji-fast-bar { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.emoji-fast-bar button { background: none; border: none; font-size: 1.1rem; cursor: pointer; }
.input-row { display: flex; gap: 0.5rem; }
.input-row input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--border-line); padding: 0.5rem; border-radius: 8px; color: #fff; outline: none; }
