/* ============================================
   CineVault — Cinematic Theme (Variable-Driven)
   All colors/fonts driven by CSS variables set
   dynamically by the admin theme editor.
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-bright); }
img { max-width: 100%; height: auto; display: block; }

/* ─── Announcement ─── */
.announcement-bar { text-align: center; padding: 8px 1rem; font-size: 0.85rem; font-weight: 600; }

/* ─── Header ─── */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(0,0,0,0.7); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1300px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, black)); color: var(--bg-deep); font-size: 14px; font-weight: 700; }
.logo-text { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.main-nav a:hover { color: var(--text-primary); }
.user-badge { display: inline-flex; align-items: center; padding: 4px 12px; background: var(--accent-glow); border: 1px solid var(--accent); border-radius: 20px; font-size: 0.8rem; color: var(--accent); font-weight: 500; }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.4rem; cursor: pointer; }

/* ─── Footer ─── */
.site-footer { text-align: center; padding: 2rem; margin-top: 4rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.main-content { min-height: calc(100vh - 200px); }

/* ─── Hero ─── */
.hero { padding: 6rem 2rem 4rem; text-align: center; background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%), linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%); }
.hero-minimal { padding: 4rem 2rem 3rem; background: var(--bg-surface); }
.hero-image { padding: 8rem 2rem 6rem; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1rem; }
.hero .accent { color: var(--accent); font-style: italic; }
.hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* ─── Sections ─── */
.section { max-width: 1300px; margin: 0 auto; padding: 2rem 2rem 3rem; }
.section-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.01em; }

/* ─── Movie Grid ─── */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
[data-layout="list"] .movie-grid { grid-template-columns: 1fr; }
[data-layout="list"] .movie-card { display: flex; flex-direction: row; }
[data-layout="list"] .movie-poster { width: 120px; aspect-ratio: 2/3; flex-shrink: 0; }
[data-layout="list"] .movie-info { flex: 1; padding: 1rem; display: flex; flex-direction: column; justify-content: center; }

.movie-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; border: 1px solid var(--border); }
[data-card-style="sharp"] .movie-card { border-radius: 0; }
[data-card-style="pill"] .movie-card { border-radius: 24px; }
.movie-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.movie-card.featured { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

.movie-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; background: var(--bg-elevated); }
.movie-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.movie-card:hover .movie-poster img { transform: scale(1.05); }
.no-poster, .no-poster-lg, .no-poster-sm, .no-poster-xs { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 3rem; background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card)); }
.movie-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.65); opacity: 0; transition: opacity 0.3s; }
.movie-card:hover .movie-overlay { opacity: 1; }
.movie-info { padding: 1rem; }
.movie-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; line-height: 1.3; }
.movie-meta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.genre-tag { font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; background: var(--accent-glow); color: var(--accent); font-weight: 500; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.movie-meta span { font-size: 0.8rem; color: var(--text-muted); }
.movie-price { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; color: var(--accent); }
.owned-badge { color: var(--success); font-size: 0.85rem; font-weight: 500; }
.owned-badge-lg { color: var(--success); font-size: 1rem; }

/* ─── Upcoming ─── */
.upcoming-grid { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
.upcoming-card { display: flex; gap: 1rem; min-width: 300px; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); flex-shrink: 0; }
.upcoming-poster { width: 60px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-elevated); }
.upcoming-poster img { width: 100%; height: 100%; object-fit: cover; }
.upcoming-info h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.release-date { font-size: 0.8rem; color: var(--text-secondary); }
.upcoming-price { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); margin-top: 0.3rem; }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; text-decoration: none; background: var(--bg-elevated); color: var(--text-primary); }
.btn:hover { background: var(--border-light); color: var(--text-primary); }
.btn-primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, black)); color: var(--bg-deep); border: none; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.15); color: var(--bg-deep); }
.btn-lg { padding: 12px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 5px 14px; font-size: 0.8rem; }
.btn-xs { padding: 3px 10px; font-size: 0.75rem; }
.btn-full { width: 100%; }
.btn-play { background: var(--accent); color: var(--bg-deep); font-weight: 700; padding: 10px 28px; border: none; border-radius: 30px; font-size: 1rem; }
.btn-buy { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 10px 28px; border-radius: 30px; }
.btn-outline { background: transparent; border: 1px solid var(--border-light); }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }
.stripe-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* ─── Auth ─── */
.auth-container { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 2rem; }
.auth-card { width: 100%; max-width: 420px; padding: 2.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 0.3rem; }
.auth-subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--text-secondary); }

/* ─── Forms ─── */
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.form-group label small { color: var(--text-muted); font-weight: 400; }
.form-group input, .form-group textarea, .form-group select { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-group input[type="file"] { padding: 8px; font-size: 0.85rem; }
.form-group input[type="range"] { padding: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.code-input { font-family: var(--font-mono); font-size: 0.85rem; }

/* ─── Alerts ─── */
.alert { padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: rgba(231,76,94,0.1); border: 1px solid rgba(231,76,94,0.3); color: #f08898; }
.alert-success { background: rgba(78,203,141,0.1); border: 1px solid rgba(78,203,141,0.3); color: #6ed8a8; }
.alert-success-subtle { background: rgba(78,203,141,0.06); border: 1px solid rgba(78,203,141,0.15); color: var(--success); font-size: 0.85rem; }
.alert-warning { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.3); color: #d4b855; }

/* ─── Movie Detail ─── */
.movie-detail { max-width: 1000px; margin: 2rem auto; padding: 2rem; display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; }
.movie-detail-poster { border-radius: var(--radius); overflow: hidden; aspect-ratio: 2/3; background: var(--bg-card); }
.movie-detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.movie-detail-info h1 { font-family: var(--font-display); font-size: 2.2rem; margin-bottom: 0.5rem; }
.movie-meta-detail { display: flex; gap: 0.8rem; margin-bottom: 1rem; }
.duration-tag { font-size: 0.85rem; color: var(--text-secondary); }
.movie-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.5rem; white-space: pre-line; }
.movie-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.price-display { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--accent); }

/* ─── Player ─── */
.player-page { max-width: 1100px; margin: 0 auto; padding: 1.5rem 2rem; }
.player-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1rem; }
.player-header h2 { font-family: var(--font-display); font-size: 1.3rem; }
.back-link { color: var(--text-secondary); font-size: 0.9rem; }
.back-link:hover { color: var(--text-primary); }
.player-container { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 16/9; }
.video-player { width: 100%; height: 100%; background: #000; }
.no-video { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }

/* ─── Account ─── */
.account-page { max-width: 1000px; margin: 0 auto; padding: 2rem; }
.account-header { display: flex; align-items: center; gap: 1.5rem; padding: 2rem; margin-bottom: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); flex-wrap: wrap; }
.account-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, black)); color: var(--bg-deep); font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.account-meta h1 { font-family: var(--font-display); font-size: 1.5rem; }
.account-meta p { color: var(--text-secondary); font-size: 0.9rem; }
.account-stats { display: flex; gap: 2rem; margin-left: auto; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.account-section { margin-bottom: 2.5rem; }
.account-section h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1rem; }
.library-list { display: flex; flex-direction: column; gap: 0.75rem; }
.library-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s; }
.library-item:hover { border-color: var(--border-light); }
.library-poster { width: 50px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-elevated); }
.library-poster img { width: 100%; height: 100%; object-fit: cover; }
.library-info { flex: 1; }
.library-info h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.genre-tag-sm { font-size: 0.65rem; padding: 1px 6px; border-radius: 20px; background: var(--accent-glow); color: var(--accent); }
.purchase-date { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.5rem; }
.library-actions { display: flex; align-items: center; gap: 1rem; }
.purchase-amount { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-secondary); }
.history-list { display: flex; flex-direction: column; gap: 0.5rem; }
.history-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.history-poster { width: 36px; height: 36px; border-radius: 4px; overflow: hidden; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.history-poster img { width: 100%; height: 100%; object-fit: cover; }
.history-info { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.history-title { font-size: 0.9rem; font-weight: 500; }
.history-date { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Custom Page ─── */
.custom-page h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1.5rem; }
.page-content { color: var(--text-secondary); line-height: 1.8; }
.page-content h2, .page-content h3 { color: var(--text-primary); font-family: var(--font-display); margin: 1.5rem 0 0.5rem; }
.page-content a { color: var(--accent); }
.page-content img { border-radius: var(--radius); margin: 1rem 0; }

/* ─── Admin ─── */
.admin-page { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.admin-page > h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1rem; }
.admin-nav-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tab { padding: 8px 18px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border); transition: all 0.2s; }
.tab:hover { color: var(--text-primary); border-color: var(--border-light); }
.tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.admin-stat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.admin-stat-num { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.admin-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.3rem; }
.admin-section { margin-bottom: 2.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-header h2 { font-family: var(--font-display); font-size: 1.3rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th { text-align: left; padding: 10px 14px; background: var(--bg-elevated); border-bottom: 2px solid var(--border); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-movie-title { display: flex; align-items: center; gap: 0.6rem; }
.admin-thumb { width: 36px; height: 50px; object-fit: cover; border-radius: 4px; }
.status-badge { font-size: 0.72rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.status-badge.published { background: rgba(78,203,141,0.15); color: var(--success); }
.status-badge.draft { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.status-badge.featured { background: var(--accent-glow); color: var(--accent); }
.role-badge { font-size: 0.72rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.role-badge.admin { background: var(--accent-glow); color: var(--accent); }
.role-badge.user { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.actions-cell { white-space: nowrap; display: flex; gap: 0.3rem; }
.admin-form-page { max-width: 700px; margin: 0 auto; padding: 2rem; }
.admin-form-page h1 { font-family: var(--font-display); font-size: 1.8rem; margin: 1rem 0 1.5rem; }
.movie-form { display: flex; flex-direction: column; gap: 1.2rem; }
.movie-form .btn-lg { margin-top: 0.5rem; }

/* ─── Theme Editor Specific ─── */
.theme-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.theme-section h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.3rem; }
.theme-hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.6rem; margin-bottom: 0.5rem; }
.preset-btn { display: flex; align-items: center; gap: 0.6rem; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; font-family: var(--font-body); }
.preset-btn:hover { filter: brightness(1.3); transform: translateY(-1px); }
.preset-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.8rem; }
.color-field { display: flex; flex-direction: column; gap: 0.3rem; }
.color-field label { font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
.color-field input[type="color"] { width: 100%; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); cursor: pointer; padding: 2px; }
.color-hex { font-family: var(--font-mono); font-size: 0.78rem; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-secondary); width: 100%; }
.settings-info { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.settings-info p { margin: 0.6rem 0; }
.code-block { background: var(--bg-elevated); padding: 12px 16px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.82rem; overflow-x: auto; margin: 0.5rem 0; border: 1px solid var(--border); }
.stripe-status { display: flex; align-items: center; gap: 0.6rem; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 1rem; }
.stripe-status.active { background: rgba(78,203,141,0.08); border: 1px solid rgba(78,203,141,0.2); color: var(--success); }
.stripe-status.inactive { background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.2); color: #d4b855; }
.stripe-dot { width: 10px; height: 10px; border-radius: 50%; }
.stripe-status.active .stripe-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.stripe-status.inactive .stripe-dot { background: #d4b855; }

.empty-state { color: var(--text-muted); text-align: center; padding: 2rem; font-size: 0.95rem; }
.empty-state a { color: var(--accent); }

/* ─── Inbox Badge ─── */
.nav-inbox { position: relative; }
.inbox-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 700; margin-left: 4px; vertical-align: middle; line-height: 1; }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 700; margin-left: 4px; }

/* ─── Inbox Page ─── */
.inbox-page { max-width: 800px; margin: 0 auto; padding: 2rem; }
.inbox-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.inbox-header h1 { font-family: var(--font-display); font-size: 1.8rem; flex: 1; }
.thread-with { font-size: 0.9rem; color: var(--text-secondary); width: 100%; }
.inbox-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }

/* ─── Message List ─── */
.msg-list { display: flex; flex-direction: column; gap: 2px; }
.msg-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text-primary); transition: all 0.15s; position: relative; }
.msg-row:hover { background: var(--bg-elevated); border-color: var(--border-light); color: var(--text-primary); }
.msg-row.unread { background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); border-color: color-mix(in srgb, var(--accent) 20%, var(--border)); }
.msg-row.unread .msg-sender { font-weight: 700; }
.msg-row.unread .msg-subject { font-weight: 600; }
.msg-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.msg-preview { flex: 1; min-width: 0; }
.msg-row-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2px; }
.msg-sender { font-size: 0.9rem; font-weight: 500; }
.msg-time { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }
.msg-subject { font-size: 0.88rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-reply-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.msg-snippet { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 8px var(--accent-glow); }

/* ─── Compose ─── */
.compose-form { display: flex; flex-direction: column; gap: 1.2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.compose-form textarea { min-height: 160px; resize: vertical; }
.compose-actions { display: flex; gap: 1rem; align-items: center; }

/* ─── Thread View ─── */
.thread-messages { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.5rem; max-height: 60vh; overflow-y: auto; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.msg-bubble { max-width: 80%; padding: 0.8rem 1rem; border-radius: var(--radius); position: relative; }
.msg-bubble.received { background: var(--bg-elevated); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-bubble.sent { background: color-mix(in srgb, var(--accent) 12%, var(--bg-elevated)); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.msg-bubble-author { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.msg-bubble-time { font-size: 0.7rem; color: var(--text-muted); }
.msg-bubble-body { font-size: 0.9rem; line-height: 1.6; color: var(--text-primary); }

/* ─── Reply Box ─── */
.thread-reply { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.reply-form { display: flex; flex-direction: column; gap: 0; }
.reply-input-wrap { display: flex; gap: 0.8rem; align-items: flex-end; }
.reply-input-wrap textarea { flex: 1; min-height: 60px; resize: vertical; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; }
.reply-input-wrap textarea:focus { outline: none; border-color: var(--accent); }
.reply-input-wrap .btn { height: fit-content; }

/* ─── Social Feed ─── */
.feed-page { max-width: 680px; margin: 0 auto; padding: 2rem; }
.feed-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.feed-header h1 { font-family: var(--font-display); font-size: 1.8rem; flex: 1; }

/* Compose */
.compose-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; }
.compose-box-guest { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; text-align: center; color: var(--text-secondary); }
.compose-post-form { display: flex; gap: 0.8rem; }
.compose-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, black)); color: var(--bg-deep); font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.compose-body { flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }
.compose-body textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; resize: vertical; min-height: 60px; transition: border-color 0.2s; }
.compose-body textarea:focus { outline: none; border-color: var(--accent); }
.compose-footer { display: flex; justify-content: space-between; align-items: center; }
.compose-media { display: flex; gap: 0.4rem; }
.media-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--bg-elevated); border: 1px solid var(--border); cursor: pointer; font-size: 1rem; transition: all 0.15s; }
.media-btn:hover { border-color: var(--accent); }
.media-btn.has-file { background: var(--accent-glow); border-color: var(--accent); }

/* Post Card */
.feed-posts { display: flex; flex-direction: column; gap: 1rem; }
.post-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; transition: border-color 0.2s; }
.post-card.pinned { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 3%, var(--bg-card)); }
.post-card.hidden-post { opacity: 0.5; }
.post-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.post-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--accent); flex-shrink: 0; text-decoration: none; }
.post-author-info { flex: 1; min-width: 0; }
.post-author { font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--text-primary); }
.post-author:hover { color: var(--accent); }
.post-time { font-size: 0.75rem; color: var(--text-muted); display: block; }
.post-pinned { font-size: 0.7rem; color: var(--accent); background: var(--accent-glow); padding: 2px 8px; border-radius: 10px; }
.post-hidden-tag { font-size: 0.7rem; color: var(--danger); background: rgba(231,76,94,0.1); padding: 2px 8px; border-radius: 10px; }
.post-menu { display: flex; gap: 2px; }
.post-menu-btn { background: none; border: none; font-size: 0.85rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; opacity: 0.4; transition: opacity 0.2s; }
.post-card:hover .post-menu-btn { opacity: 0.7; }
.post-menu-btn:hover { opacity: 1 !important; background: var(--bg-elevated); }
.post-body { font-size: 0.95rem; line-height: 1.6; color: var(--text-primary); margin-bottom: 0.7rem; word-wrap: break-word; }
.post-media { margin-bottom: 0.7rem; border-radius: var(--radius-sm); overflow: hidden; }
.post-media img { width: 100%; max-height: 500px; object-fit: cover; display: block; }
.post-media video { width: 100%; max-height: 500px; background: #000; display: block; }
.post-actions { display: flex; align-items: center; gap: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.like-btn { background: none; border: none; font-size: 0.88rem; cursor: pointer; color: var(--text-muted); padding: 4px 10px; border-radius: 20px; transition: all 0.15s; font-family: var(--font-body); }
.like-btn:hover { background: var(--bg-elevated); }
.like-btn.liked { color: #e74c5e; }
.like-count { font-size: 0.88rem; color: var(--text-muted); }
.post-action-btn { font-size: 0.8rem; color: var(--text-muted); transition: color 0.2s; }
.post-action-btn:hover { color: var(--accent); }
.report-count { font-size: 0.75rem; color: var(--danger); margin-left: auto; }

/* Feed Pagination */
.feed-pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.5rem; padding: 1rem; }
.page-info { font-size: 0.85rem; color: var(--text-muted); }

/* User Profile */
.profile-header { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; flex-wrap: wrap; }
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, black)); color: var(--bg-deep); font-family: var(--font-display); font-size: 2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-info { flex: 1; }
.profile-info h1 { font-family: var(--font-display); font-size: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.profile-joined { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.profile-stats-row { display: flex; gap: 1.5rem; margin-top: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); }
.profile-actions { display: flex; gap: 0.5rem; }

/* Admin Reports */
.report-list { display: flex; flex-direction: column; gap: 0.8rem; }
.report-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; }
.report-meta { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.report-preview { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.7rem; font-style: italic; }
.report-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .header-inner { padding: 0 1rem; }
  .mobile-toggle { display: block; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); padding: 1rem; gap: 0.8rem; }
  .main-nav.open { display: flex; }
  .hero { padding: 3rem 1rem 2rem; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
  .movie-detail { grid-template-columns: 1fr; }
  .movie-detail-poster { max-width: 300px; }
  .account-header { flex-direction: column; align-items: flex-start; }
  .account-stats { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: repeat(2, 1fr); }
  .preset-grid { grid-template-columns: 1fr; }
  .inbox-page { padding: 1rem; }
  .msg-bubble { max-width: 90%; }
  .reply-input-wrap { flex-direction: column; }
  .reply-input-wrap .btn { width: 100%; }
  .compose-actions { flex-direction: column; }
  .compose-actions .btn { width: 100%; }
  .feed-page { padding: 1rem; }
  .compose-post-form { flex-direction: column; }
  .compose-avatar { display: none; }
  .post-media img, .post-media video { max-height: 300px; }
  .profile-header { flex-direction: column; align-items: flex-start; }
  .profile-actions { width: 100%; }
}
