* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Appearance defaults2026-10-31. Inline user colors and uploaded font assignments retain priority. */
:root {
    --bg-primary: #f3f5f8;
    --bg-secondary: #eaf0f6;
    --bg-surface: #ffffff;
    --bg-surface-hover: #edf2f8;
    --bg-talk-bar: #eef2f7;
    --bg-talk-bar-hover: #e4ebf4;
    --bg-comment-bar: #eef2f7;
    --text-primary: #172539;
    --text-secondary: #46566c;
    --text-muted: #5c6d82;
    --border: #cad4e1;
    --border-light: #e1e7ef;
    --primary: #2457c5;
    --primary-hover: #1b439b;
    --primary-foreground: #ffffff;
    --primary-muted: rgba(36, 87, 197, 0.08);
    --success: #187246;
    --warning: #895b0a;
    --error: #b5323c;
    --info: #2457c5;
    --nav-bg: #ffffff;
    --nav-border: #d8e0eb;
    --shadow-color: rgba(23, 37, 57, 0.08);
    --modal-overlay: rgba(16, 28, 46, 0.45);
    --ai-color-1: #365e9c;
    --ai-color-2: #42689f;
    --ai-color-3: #5277aa;
    --ai-gradient: linear-gradient(135deg, #365e9c 0%, #42689f 50%, #5277aa 100%);
    --ai-bg: rgba(54, 94, 156, 0.08);
    --ai-border: rgba(54, 94, 156, 0.25);
    --font-default: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --tab-badge-bg: #46566c;
    --tab-badge-color: #ffffff;
    --bg-tertiary: var(--bg-surface-hover);
    --border-color: var(--border);
    --background: var(--bg-primary);
    --surface: var(--bg-surface);
    --text: var(--text-primary);
    --tier-0: #64748b;
    --tier-1: #3b82f6;
    --tier-2: #0ea5e9;
    --tier-3: #06b6d4;
    --tier-4: #14b8a6;
    --tier-5: #10b981;
    --tier-6: #22c55e;
    --tier-7: #84cc16;
    --tier-8: #a3e635;
    --tier-9: #facc15;
    --tier-10: #fbbf24;
    --tier-11: #f59e0b;
    --tier-12: #fb923c;
    --tier-13: #f97316;
    --tier-14: #ef4444;
    --tier-15: #dc2626;
    --tier-16: #b91c1c;
    --tier-17: #991b1b;
    --tier-18: #7f1d1d;
    --tier-19: #450a0a;
}

.theme-light {
    --bg-primary: #f3f5f8;
    --bg-secondary: #eaf0f6;
    --bg-surface: #ffffff;
    --bg-surface-hover: #edf2f8;
    --bg-talk-bar: #eef2f7;
    --bg-talk-bar-hover: #e4ebf4;
    --bg-comment-bar: #eef2f7;
    --text-primary: #172539;
    --text-secondary: #46566c;
    --text-muted: #5c6d82;
    --border: #cad4e1;
    --border-light: #e1e7ef;
    --primary: #2457c5;
    --primary-hover: #1b439b;
    --primary-foreground: #ffffff;
    --primary-muted: rgba(36, 87, 197, 0.08);
    --success: #187246;
    --warning: #895b0a;
    --error: #b5323c;
    --info: #2457c5;
    --nav-bg: #ffffff;
    --nav-border: #d8e0eb;
    --shadow-color: rgba(23, 37, 57, 0.08);
    --modal-overlay: rgba(16, 28, 46, 0.45);
    --ai-color-1: #365e9c;
    --ai-color-2: #42689f;
    --ai-color-3: #5277aa;
    --ai-gradient: linear-gradient(135deg, #365e9c 0%, #42689f 50%, #5277aa 100%);
    --ai-bg: rgba(54, 94, 156, 0.08);
    --ai-border: rgba(54, 94, 156, 0.25);
}

.theme-dark {
    --bg-primary: #101722;
    --bg-secondary: #151f2e;
    --bg-surface: #1c2838;
    --bg-surface-hover: #253448;
    --bg-talk-bar: #223044;
    --bg-talk-bar-hover: #2d3e56;
    --bg-comment-bar: #223044;
    --text-primary: #f1f5f9;
    --text-secondary: #c0cad7;
    --text-muted: #9baabe;
    --border: #41516a;
    --border-light: #304159;
    --primary: #91b8f3;
    --primary-hover: #b3cefa;
    --primary-foreground: #10213b;
    --primary-muted: rgba(145, 184, 243, 0.12);
    --success: #70d6a1;
    --warning: #f0c66c;
    --error: #ff929b;
    --info: #91b8f3;
    --nav-bg: #151f2e;
    --nav-border: #304159;
    --shadow-color: rgba(0, 0, 0, 0.18);
    --modal-overlay: rgba(4, 10, 20, 0.7);
    --ai-color-1: #91b8f3;
    --ai-color-2: #9fc0ef;
    --ai-color-3: #adcafa;
    --ai-gradient: linear-gradient(135deg, #91b8f3 0%, #9fc0ef 50%, #adcafa 100%);
    --ai-bg: rgba(145, 184, 243, 0.10);
    --ai-border: rgba(145, 184, 243, 0.3);
}

/* Glass theme - transparent backgrounds for glass effect */
.theme-glass {
    --bg-primary: transparent;
    --bg-secondary: rgba(20, 20, 25, 0.3);
    --bg-surface: rgba(20, 20, 25, 0.5);
    --bg-surface-hover: rgba(40, 40, 50, 0.5);
    --bg-talk-bar: rgba(25, 25, 30, 0.6);
    --bg-talk-bar-hover: rgba(35, 35, 45, 0.6);
    --bg-comment-bar: rgba(25, 25, 30, 0.5);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.15);
    --border-light: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(15, 15, 20, 0.7);
    --nav-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --modal-overlay: rgba(0, 0, 0, 0.6);
}

/* ============================================================
   UI BACKGROUND LAYER SYSTEM
   3 Layers for different UI depth levels:
   - Layer 1: Layout containers (header, footer, .page)
   - Layer 2: Content zones (cards, panels, modals)
   - Layer 3: Interactive elements (buttons, inputs, badges)
   ============================================================ */

:root {
    /* Layer 1: Layout - Large containers */
    --layer-1-bg: var(--bg-primary);
    --layer-1-bg-hover: var(--bg-secondary);
    --layer-1-opacity: 1;
    --layer-1-border: var(--border);

    /* Layer 2: Zone - Cards, panels, sections */
    --layer-2-bg: var(--bg-surface);
    --layer-2-bg-hover: var(--bg-surface-hover);
    --layer-2-opacity: 1;
    --layer-2-border: var(--border);

    /* Layer 3: Element - Buttons, inputs */
    --layer-3-bg: var(--bg-surface-hover);
    --layer-3-bg-hover: var(--bg-secondary);
    --layer-3-opacity: 1;
    --layer-3-border: var(--border-light);
}

/* Glass mode layer overrides */
.glass-mode {
    --layer-1-bg: rgba(15, 15, 20, 0.6);
    --layer-1-bg-hover: rgba(25, 25, 35, 0.6);
    --layer-1-opacity: 1;
    --layer-1-border: rgba(255, 255, 255, 0.1);

    --layer-2-bg: rgba(20, 20, 25, 0.5);
    --layer-2-bg-hover: rgba(30, 30, 40, 0.5);
    --layer-2-opacity: 1;
    --layer-2-border: rgba(255, 255, 255, 0.08);

    --layer-3-bg: rgba(30, 30, 40, 0.4);
    --layer-3-bg-hover: rgba(40, 40, 55, 0.5);
    --layer-3-opacity: 1;
    --layer-3-border: rgba(255, 255, 255, 0.05);
}

/* Layer 1 class - for layout containers */
.ui-layer-1 {
    background-color: var(--layer-1-bg);
    border-color: var(--layer-1-border);
}
.ui-layer-1:hover {
    background-color: var(--layer-1-bg-hover);
}

/* Layer 2 class - for cards/panels */
.ui-layer-2 {
    background-color: var(--layer-2-bg);
    border-color: var(--layer-2-border);
}
.ui-layer-2:hover {
    background-color: var(--layer-2-bg-hover);
}

/* Layer 3 class - for buttons/inputs */
.ui-layer-3 {
    background-color: var(--layer-3-bg);
    border-color: var(--layer-3-border);
}
.ui-layer-3:hover {
    background-color: var(--layer-3-bg-hover);
}

/* Glass effect variants for each layer */
.glass-mode .ui-layer-1.glass-panel,
.glass-mode .ui-layer-2.glass-panel,
.glass-mode .ui-layer-3.glass-panel {
    background: transparent;
    border: none;
}

/* ============================================================
   AUTOMATIC LAYER ASSIGNMENT
   Map existing CSS classes to their appropriate layer
   ============================================================ */

/* Layer 1: Layout containers */
header, footer, nav, .page,
.admin-page, .admin-sidebar {
    /* Uses Layer 1 variables via header/footer specific styles */
}

/* Layer 2: Content cards and zones */
.card, .talk-card, .talk-card-wrapper, .feed-talk,
.comment-item, .notification-item,
.quest-card, .reward-item, .achievement-card, .title-card,
.marketplace-item, .report-card, .ban-card,
.modal-content, .popup-content, .dropdown-menu,
.settings-section, .form-wrapper, .panel-wrapper {
    background-color: var(--layer-2-bg);
    border-color: var(--layer-2-border);
}

/* Layer 2 hover states */
.card:hover, .talk-card-wrapper:hover, .feed-talk:hover,
.notification-item:hover, .quest-card:hover,
.achievement-card:hover, .title-card:hover, .marketplace-item:hover {
    background-color: var(--layer-2-bg-hover);
}

/* Layer 3: Interactive elements */
.btn, .btn-primary, .btn-secondary, .btn-outline,
.tab-btn, .tab-button, .nav-link,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], textarea, select,
.badge, .chip, .tag {
    /* Buttons and inputs use Layer 3 variables via their specific styles */
}

.tier-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.tier-badge.tier-0 { background: linear-gradient(135deg, var(--tier-0), #475569); }
.tier-badge.tier-1 { background: linear-gradient(135deg, var(--tier-1), #2563eb); }
.tier-badge.tier-2 { background: linear-gradient(135deg, var(--tier-2), #0284c7); }
.tier-badge.tier-3 { background: linear-gradient(135deg, var(--tier-3), #0891b2); }
.tier-badge.tier-4 { background: linear-gradient(135deg, var(--tier-4), #0d9488); }
.tier-badge.tier-5 { background: linear-gradient(135deg, var(--tier-5), #059669); }
.tier-badge.tier-6 { background: linear-gradient(135deg, var(--tier-6), #16a34a); }
.tier-badge.tier-7 { background: linear-gradient(135deg, var(--tier-7), #65a30d); color: #1a1a1a; text-shadow: none; }
.tier-badge.tier-8 { background: linear-gradient(135deg, var(--tier-8), #84cc16); color: #1a1a1a; text-shadow: none; }
.tier-badge.tier-9 { background: linear-gradient(135deg, var(--tier-9), #eab308); color: #1a1a1a; text-shadow: none; }
.tier-badge.tier-10 { background: linear-gradient(135deg, var(--tier-10), #f59e0b); color: #1a1a1a; text-shadow: none; }
.tier-badge.tier-11 { background: linear-gradient(135deg, var(--tier-11), #d97706); }
.tier-badge.tier-12 { background: linear-gradient(135deg, var(--tier-12), #ea580c); }
.tier-badge.tier-13 { background: linear-gradient(135deg, var(--tier-13), #dc2626); }
.tier-badge.tier-14 { background: linear-gradient(135deg, var(--tier-14), #b91c1c); }
.tier-badge.tier-15 { background: linear-gradient(135deg, var(--tier-15), #991b1b); }
.tier-badge.tier-16 { background: linear-gradient(135deg, var(--tier-16), #7f1d1d); }
.tier-badge.tier-17 { background: linear-gradient(135deg, var(--tier-17), #450a0a); }
.tier-badge.tier-18 { background: linear-gradient(135deg, var(--tier-18), #450a0a); }
.tier-badge.tier-19 { background: linear-gradient(135deg, var(--tier-19), #1c1917); color: #fef2f2; }

.username-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.username-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.expiration {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.expiration-warning {
    color: var(--error);
    font-weight: 600;
}

.permanent {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9em;
}

.private-indicator {
    color: var(--warning);
    font-size: 0.9em;
}

.only-me-indicator {
    color: var(--info);
    font-size: 0.9em;
}

.paid-indicator {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9em;
}

.talk-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.talk-category {
    color: var(--text-secondary);
}

.talk-category .subcategory {
    color: var(--text-muted);
}

.talk-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.talk-tag {
    background: var(--primary-muted);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

body {
    font-family: var(--font-default, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.55;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
    z-index: 2;  /* Above video background (0) and overlay (1) */
}

header {
    background: var(--nav-bg, var(--bg-primary));
    border-bottom: 1px solid var(--nav-border, var(--border));
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

main {
    flex: 1;
    padding: 2rem 1rem;
}

footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-account {
    display: inline-block;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-account:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.create-feed-form, .feed-created {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.create-feed-form h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="url"],
.input-title, .input-name, .input-username {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-surface);
    color: var(--text-primary);
}

select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: inherit;
}

select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

input[type="text"]:focus, .input-title:focus, .input-name:focus, .input-username:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-record, .btn-upload, .btn-create, .btn-submit {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.btn-upload {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
}

.btn-record:hover, .btn-upload:hover, .btn-create:hover, .btn-submit:hover {
    background: var(--primary-hover);
}

.btn-create:disabled, .btn-submit:disabled {
    background: var(--secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-stop, .btn-discard, .btn-cancel {
    background: var(--error);
    color: white;
    margin-left: 0.5rem;
}

.btn-record-more {
    background: var(--secondary);
    color: white;
    margin-right: 0.5rem;
}

.recording-active {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recording-indicator {
    color: var(--error);
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.recorded-audios {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--error);
}

.creating-feed {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.feed-url {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.url-display {
    flex: 1;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-copy {
    background: var(--secondary);
    color: white;
}

.btn-view-feed {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.detected-language {
    margin: 1.5rem 0 1rem 0;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.how-it-works {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.how-it-works ol {
    margin-left: 1.5rem;
}

.how-it-works li {
    margin-bottom: 0.5rem;
}

.feed-header {
    margin-bottom: 1rem;
}

.filter-group-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--bg-surface);
    border-radius: 8px;
}

.filter-group-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-group-tab:hover {
    border-color: var(--group-color, var(--primary));
    color: var(--group-color, var(--primary));
}

.filter-group-tab.active {
    background: var(--group-color, var(--primary));
    border-color: var(--group-color, var(--primary));
    color: white;
}

.btn-back {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    cursor: pointer;
}

.btn-back:hover {
    color: var(--primary);
}

.feed-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feed-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.separator {
    margin: 0 0.5rem;
}

.feed-audio {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.original-audio {
    margin-bottom: 1rem;
}

.audio-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.audio-player {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-play, .btn-stop {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

audio {
    display: none;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-buffered {
    position: absolute;
    height: 100%;
    background: var(--text-secondary);
    border-radius: 3px;
    opacity: 0.2;
    transition: width 0.15s ease-out;
}

.progress-played {
    position: absolute;
    height: 100%;
    background: var(--primary, #93c5fd);
    border-radius: 3px;
    opacity: 0.5;
}

.progress-fill {
    position: absolute;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.1s ease-out;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 10;
    transition: left 0.1s ease-out, transform 0.15s ease;
}

.progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}

.progress-bar:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1.1);
}

.progress-bar.dragging {
    cursor: grabbing;
}

.progress-bar.dragging .progress-handle {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.progress-bar.dragging .progress-fill {
    transition: none;
}

.progress-bar.dragging .progress-handle {
    transition: transform 0.1s ease;
}

.time-display {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 80px;
}

.audio-player.buffering .btn-play {
    opacity: 0.7;
}

.loading-spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.audio-error {
    font-size: 0.75rem;
    color: var(--error, #ef4444);
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

.blocked-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error, #ef4444);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.btn-comment-main {
    width: 100%;
    background: var(--primary);
    color: white;
    margin-top: 1rem;
}

.main-comment-form {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.comment-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.comment-input .input-username {
    flex: 1;
    min-width: 200px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.comments-section h2 {
    margin: 0;
}

.btn-filter {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: var(--border);
}

.filter-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-panel h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    margin-top: 0.5rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-apply-filter {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-apply-filter:hover {
    background: var(--primary-hover);
}

.btn-clear-filter {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.comment-item {
    background: var(--bg-comment-bar);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.comment-item.comment-active {
    border: 2px solid var(--primary);
    background: var(--bg-surface);
    opacity: 1 !important;
}

.comment-item.comment-in-chain {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.05);
    opacity: 1 !important;
}

.comment-item.comment-descendant {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.08);
}

.comment-item.comment-in-chain .comment-actions {
    opacity: 0;
    pointer-events: none;
}

.comment-item.comment-faded {
    opacity: 0.5;
}

.comment-item.comment-faded .comment-actions {
    opacity: 0;
    pointer-events: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.audio-number {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.comment-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.comment-actions-header {
    display: none;
    align-items: center;
    gap: 0.25rem;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-comment-bar);
    padding-left: 0.5rem;
}

.comment-item:hover .comment-info {
    opacity: 0;
    pointer-events: none;
}

.comment-item:hover .comment-actions-header {
    display: flex;
}

.comment-actions-header button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.comment-actions-header button:hover {
    background: var(--bg-secondary);
}

.comment-profile-pic-link {
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.comment-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-profile-pic-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 600;
}

.creator-badge {
    color: var(--primary);
}

.user-id {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comment-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comment-audio {
    margin-bottom: 0;
}

.comment-item.deleted-comment {
    opacity: 0.5 !important;
}

.comment-item.deleted-comment .comment-actions-header {
    display: none !important;
}

.btn-reply {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reply:hover {
    background: var(--border);
}

.reply-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.reply-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.guest-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.guest-id {
    font-family: monospace;
}

.replies {
    margin-top: 1rem;
}

.loading-container, .not-found {
    text-align: center;
    padding: 4rem 1rem;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.loading-spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.btn-home {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.btn-back-home {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    cursor: pointer;
    font-size: 1rem;
}

.btn-back-home:hover {
    background: var(--primary-hover);
}

.ai-twin-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.ai-twin-page .page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ai-twin-page .page-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.ai-twin-page .not-authenticated,
.ai-twin-page .feature-locked {
    text-align: center;
    padding: 2rem;
    background: var(--bg-surface);
    border-radius: 12px;
}

.ai-twin-page .btn-primary {
    display: inline-block;
    margin-top: 1rem;
}

.audio-number {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.audio-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-share {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-share:hover {
    background: var(--border);
}

.btn-like {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-like:hover {
    background: #fef3c7;
    border-color: #fbbf24;
    transform: scale(1.05);
}

.highlighted {
    animation: highlight-pulse 3s ease-in-out;
    border: 6px solid #2563eb !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%) !important;
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.8), 0 10px 25px rgba(37, 99, 235, 0.3) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

@keyframes highlight-pulse {
    0%, 100% { 
        background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.8), 0 10px 25px rgba(37, 99, 235, 0.3);
        border-color: #2563eb;
        transform: scale(1.02);
    }
    50% { 
        background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
        box-shadow: 0 0 50px rgba(29, 78, 216, 1), 0 15px 35px rgba(29, 78, 216, 0.4);
        border-color: #1d4ed8;
        transform: scale(1.03);
    }
}

.btn-delete-feed, .btn-delete-comment {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-delete-feed:hover, .btn-delete-comment:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-export, .btn-import {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--info);
    color: var(--info);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-export:hover, .btn-import:hover {
    background: rgba(59, 130, 246, 0.3);
}

.btn-export:disabled, .btn-import:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-settings {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-settings:hover {
    background: rgba(99, 102, 241, 0.3);
}

.btn-favorite {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
    line-height: 1;
}

.btn-favorite:hover {
    border-color: #ffd700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.btn-favorite.favorited {
    color: #ffd700;
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

.btn-favorite:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay, rgba(0, 0, 0, 0.5));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    overflow: hidden;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 60px var(--shadow-color, rgba(0, 0, 0, 0.5));
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--text-primary);
}

.settings-modal {
    max-width: 500px;
}

.settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.settings-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0.25rem;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.settings-modal .modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.settings-group {
    margin-bottom: 1.25rem;
}

.settings-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.settings-group.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.settings-group.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.settings-group .input-text,
.settings-group .input-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
}

.settings-group .input-text:focus,
.settings-group .input-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.settings-group .hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Global modal footer styles - unified for all popups */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.modal-footer button {
    height: 44px;
    padding: 0 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.modal-footer .btn-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.modal-footer .btn-cancel:hover {
    background: var(--bg-surface-hover);
}

.modal-footer .btn-primary,
.modal-footer .btn-translate,
.modal-footer .btn-done,
.modal-footer .btn-save {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 500;
}

.modal-footer .btn-primary:hover,
.modal-footer .btn-translate:hover,
.modal-footer .btn-done:hover,
.modal-footer .btn-save:hover {
    background: var(--primary-hover);
}

.modal-footer .btn-translating {
    background: var(--primary);
    border: none;
    color: white;
    opacity: 0.7;
    cursor: not-allowed;
}

.settings-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.settings-modal .btn-cancel {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.settings-modal .btn-cancel:hover {
    background: var(--border);
}

.settings-modal .btn-save {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.settings-modal .btn-save:hover:not(:disabled) {
    background: var(--primary-dark);
}

.settings-modal .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-modal .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    animation: none;
    padding: 2rem;
    color: var(--text-muted);
    margin: 0 auto;
}

.settings-modal .loading-spinner::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.settings-region {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.settings-region-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.settings-region .settings-group:last-child {
    margin-bottom: 0;
}

.btn-report {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-report:hover {
    background: rgba(245, 158, 11, 0.3);
}

.report-reason-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    margin: 1rem 0;
}

.btn-submit-report {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-submit-report:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-submit-report:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.success-message {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
}

.feed-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-auto-play {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-auto-play:hover {
    background: #15803d;
    transform: translateY(-2px);
}

.account-page {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
}

.auth-forms {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form {
    margin-top: 1rem;
}

.input-text {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg-surface);
    color: var(--text-primary);
}

.input-text:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-logout {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-logout:hover {
    background: #b91c1c;
}

.account-info {
    text-align: center;
}

.user-details {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

.tag-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tag-input-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-chip {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.8;
}

.tag-remove:hover {
    opacity: 1;
}

.category-selects .category-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-selects select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg-primary);
}

.privacy-options {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.privacy-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.privacy-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.privacy-option:hover {
    background: var(--border);
}

.privacy-option input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.privacy-option .option-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.privacy-option .option-text strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.privacy-option .option-text small {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.paid-content-section {
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.paid-options {
    margin-top: 1rem;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paid-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.paid-option label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.input-price {
    width: 100px;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.commission-info {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface-hover);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.commission-info small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.input-preview,
.input-timeout {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    max-width: 300px;
}

.verify-email-page {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
}

.verifying, .verification-success, .verification-error {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 3rem 2rem;
}

.verifying h2 {
    margin: 1rem 0 0.5rem 0;
}

.verification-success h1 {
    color: var(--success);
    margin-bottom: 1rem;
}

.verification-error h1 {
    color: var(--error);
    margin-bottom: 1rem;
}

.verification-success p, .verification-error p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .create-feed-form, .feed-created, .main-comment-form {
        padding: 1.5rem;
    }
    
    .comment-input {
        flex-direction: column;
    }
    
    .comment-input .input-username {
        width: 100%;
    }
    
    .audio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.password-prompt {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.password-prompt h1 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.password-prompt p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.password-form {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px var(--shadow-color, rgba(0, 0, 0, 0.5));
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.password-input {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.password-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-submit-password {
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-password:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.password-prompt .btn-home {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.password-prompt .btn-home:hover {
    opacity: 0.8;
}

.name-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-change-username {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.btn-change-username:hover {
    transform: scale(1.2);
}

.comment-input .name-input-wrapper {
    width: 100%;
}

.comment-input .name-input-wrapper .input-username {
    flex: 1;
}

.reply-input .name-input-wrapper {
    width: 100%;
}

.reply-input .name-input-wrapper .input-username {
    flex: 1;
}

.deleted-comment {
    background: var(--bg-surface-hover) !important;
    border-color: var(--border) !important;
    opacity: 0.7;
}

.deleted-message {
    padding: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    background: var(--bg-surface-hover);
    border: 1px dashed var(--border);
    border-radius: 8px;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.deleted-icon {
    font-size: 1.2rem;
    opacity: 0.6;
}

.banned-user,
.banned-comment {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--error) !important;
    opacity: 0.8;
}

.banned-comment .comment-header {
    opacity: 0.7;
}

.banned-message {
    padding: 1rem;
    color: var(--error);
    font-weight: 600;
    text-align: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    border-radius: 6px;
    margin: 0.5rem 0;
}

.banned-username {
    color: var(--error);
    font-weight: 600;
}

.logged-in-user {
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.logged-in-user strong {
    color: var(--primary);
}

.deleted-audio {
    opacity: 0.7;
}

.deleted-badge {
    background: var(--error);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.deleted-audio-placeholder {
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-secondary);
    min-height: 44px;
}

.deleted-audio-placeholder .deleted-text {
    font-style: italic;
}

.deleted-audio-placeholder .deleted-info {
    font-size: 0.85rem;
}

.input-invalid {
    border-color: var(--error) !important;
    color: var(--error) !important;
    font-weight: 600 !important;
}

.invalid-ids-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.invalid-ids {
    color: var(--error);
    font-weight: 600;
}

.btn-delete-audio {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.btn-delete-audio:hover {
    opacity: 1;
    background: rgba(220, 38, 38, 0.1);
}

.feature-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.feature-locked input {
    cursor: not-allowed;
}

.feature-upgrade-hint {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-left: 0.5rem;
    font-weight: 500;
}

.btn-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--primary);
    border-radius: 20px;
    background: transparent;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-follow:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.btn-follow.following {
    background: var(--primary);
    color: white;
}

.btn-follow.following:hover:not(:disabled) {
    background: var(--error);
    border-color: var(--error);
}

.btn-follow.following:hover .follow-text::after {
    content: 'Unfollow';
}

.btn-follow.following:hover .follow-text {
    visibility: hidden;
    position: relative;
}

.btn-follow.following:hover .follow-text::after {
    visibility: visible;
    position: absolute;
    left: 0;
}

.btn-follow:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-follow .spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-follow-small {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 12px;
}

.creator-with-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-follow-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.follow-stat {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.follow-stat strong {
    color: var(--text-primary);
    font-weight: 600;
}

.youtube-import-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.btn-youtube {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-youtube:hover {
    background: #cc0000;
}

.youtube-modal {
    max-width: 500px;
}

.youtube-url-input {
    display: flex;
    gap: 0.5rem;
}

.youtube-url-input input {
    flex: 1;
}

.btn-fetch {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-fetch:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.youtube-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 8px;
    margin: 1rem 0;
}

.youtube-thumbnail {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
}

.youtube-info {
    flex: 1;
    min-width: 0;
}

.youtube-info .video-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.youtube-info .video-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
}

.btn-extract {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-extract:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.extract-section {
    padding: 0.5rem 0;
}

.extract-url-input {
    display: flex;
    gap: 0.5rem;
}

.extract-url-input input {
    flex: 1;
}

.supported-platforms {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.legal-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.legal-warning .warning-icon {
    flex-shrink: 0;
}

.legal-warning a {
    color: var(--primary);
    text-decoration: underline;
    white-space: nowrap;
    margin-left: auto;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.paid-content-settings {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg-surface);
}

.paid-content-settings .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.paid-content-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paid-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.paid-option label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.paid-option input[type="number"],
.paid-option select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.paid-option input[type="number"] {
    width: 120px;
}

.paid-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--warning);
    color: #000;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.paid-badge-locked {
    background: var(--error);
    color: white;
}

/* TalkCard Wrapper - groups media and bar to prevent flex gap from parent */
.talk-card-wrapper {
    display: contents; /* Default: no wrapper behavior needed when no gap issues */
}

/* In flex containers with gap, use block display to group children */
.feed-list .talk-card-wrapper,
.talks-list .talk-card-wrapper {
    display: block;
}

/* TalkCard Media Container - 16:9 image above the bar */
.talk-media-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0; /* No gap - directly merge with talk bar */
    background: var(--bg-surface); /* Subtle background, not harsh black */
}

.talk-media-container img,
.talk-media-container video,
.talk-media-container .talk-media-image,
.talk-media-container .talk-media-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
}

.talk-media-container:hover img.talk-media-image,
.talk-media-container:hover video.talk-media-video {
    transform: scale(1.02);
}

/* When media is present, adjust bar border radius and remove any gap */
.talk-media-container + .talk-card-bar {
    border-radius: 0 0 12px 12px;
    margin-top: -1px; /* Ensure no gap between media and bar */
}

/* When media is present, avatar stays circular but container shows talk-bar background */
.talk-media-container + .talk-card-bar .talk-card-avatar-left {
    border-radius: 0; /* Square container - bar clips corner */
    background: var(--bg-talk-bar); /* Show talk-bar background behind circular avatar */
}

/* Avatar image/letter STAYS circular when media is present */
.talk-media-container + .talk-card-bar .talk-card-avatar-left img,
.talk-media-container + .talk-card-bar .talk-card-avatar-left .avatar-letter {
    border-radius: 50%; /* Keep circular */
}

/* TalkCard Bar Component - Unified Design */
.talk-card-bar {
    display: flex;
    align-items: stretch;
    height: 70px;
    max-height: 70px;
    background: var(--bg-talk-bar);
    border-radius: 35px 12px 12px 35px; /* Left side is semicircle (half of 70px height) */
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s, background 0.2s;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.talk-card-bar:hover {
    background: var(--bg-talk-bar-hover);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(0,0,0,0.15));
    transform: translateY(-1px);
}

.talk-card-bar.expiring-soon {
    box-shadow: 0 0 0 2px var(--warning, #f59e0b);
}

.talk-card-bar.playing {
    box-shadow: 0 0 0 2px var(--primary);
}

/* Left Avatar - Full Height Semicircle */
.talk-card-avatar-left {
    width: 70px;
    min-width: 70px;
    height: 70px;
    background: transparent; /* Transparent so talk-bar bg shows through - hover effect works */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50% 0 0 50%; /* Left semicircle */
    flex-shrink: 0;
    text-decoration: none;
    transition: filter 0.2s;
}

.talk-card-avatar-left:hover {
    filter: brightness(1.1);
}

.talk-card-avatar-left img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.talk-card-avatar-left .avatar-letter {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.talk-card-rows {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
}

.talk-card-row-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.talk-card-bar .talk-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    flex-shrink: 0;
}

.talk-card-bar .talk-title.untitled {
    color: var(--text-secondary);
    font-style: italic;
}

.talk-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.talk-card-bar .badge {
    font-size: 0.7rem;
}

.talk-card-bar .badge-private {
    color: var(--warning, #f59e0b);
}

.talk-card-bar .badge-invite {
    color: var(--accent, #9333ea);
}

.talk-card-bar .badge-password {
    color: var(--text-secondary);
}

.talk-card-bar .badge-only-me {
    color: var(--accent, #9333ea);
}

.talk-card-bar .badge-public {
    color: var(--success, #22c55e);
}

.talk-card-bar .badge-public-feed {
    color: var(--primary);
}

.talk-card-bar .category-badge {
    background: var(--accent-light, rgba(147, 51, 234, 0.1));
    color: var(--accent, #9333ea);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.talk-card-bar .tag-badge {
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.65rem;
}

.talk-card-bar .stat {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.talk-card-bar .talk-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.talk-card-bar .talk-expires {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.talk-card-bar .talk-expires.expiring-soon {
    color: var(--warning, #f59e0b);
    font-weight: 500;
}

.talk-card-bar .talk-permanent {
    font-size: 0.7rem;
}

.talk-card-row-bottom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    flex-wrap: nowrap;
}

.talk-card-avatar-small {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.talk-card-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.talk-card-avatar-small .avatar-letter {
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.talk-card-bar .talk-creator {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.talk-card-bar .talk-creator-link {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    transition: color 0.2s;
}

.talk-card-bar .talk-creator-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.talk-card-bar .creator-stat {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.talk-card-bar .creator-title {
    font-size: 0.7rem;
    font-weight: 600;
    font-style: italic;
}

.talk-card-bar .creator-social-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.talk-card-bar .creator-social-links .social-link {
    font-size: 0.7rem;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.talk-card-bar .creator-social-links .social-link:hover {
    opacity: 1;
}

.talk-card-bar .stat-popularity {
    color: var(--primary);
    font-weight: 500;
}

.talk-card-bar .expiring-soon-text {
    color: var(--warning, #f59e0b) !important;
    font-weight: 600;
}

.talk-card-bar .category-sub {
    opacity: 0.8;
}

.talk-card-bar .tier-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: var(--primary-muted);
    color: var(--primary);
    font-weight: 600;
}

.creator-ranks {
    display: flex;
    gap: 0.25rem;
}

.rank-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
}

.rank-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 100%);
    color: white;
}

.rank-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #333;
}

.rank-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
}

.talk-card-spacer {
    flex: 1;
}

.talk-card-audio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0 0.75rem;
    background: var(--bg-surface-hover);
    border-left: 1px solid var(--border);
    min-width: 70px;
}

.talk-card-bar .btn-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.talk-card-bar .btn-play:hover {
    background: var(--primary-hover);
    transform: scale(1.08);
}

.talk-card-bar .btn-play.playing {
    background: var(--success, #22c55e);
}

.talk-card-bar .audio-duration {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
}

.talk-card-bar .btn-play.error {
    background: var(--error, #ef4444);
    animation: shake 0.3s ease-in-out;
}

.talk-card-bar .audio-duration.error {
    color: var(--error, #ef4444);
    font-weight: 500;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.talk-card-bar .no-audio {
    font-size: 1.2rem;
    opacity: 0.5;
}

.talk-card-bar:not(:has(.talk-card-audio)) .talk-card-rows {
    padding-right: 1rem;
}

.talk-card .shared-by {
    font-weight: 500;
}

/* Notification Styles */
.page-header.centered {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header.centered h1 {
    margin: 0;
    font-size: 1.5rem;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notification-item:hover {
    border-color: var(--primary);
    background: var(--bg-surface-hover);
}

.notification-item.unread {
    border-left: 3px solid var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-hover);
    border-radius: 50%;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-actions {
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.unread-indicator {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.notifications-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.btn-mark-all-read {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-mark-all-read:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Footer separator */
.footer-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

/* AI Settings Section */
.ai-settings-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.ai-settings-section .section-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.ai-transcript {
    margin-top: 0.5rem;
}

.transcript-preview {
    background: var(--bg-surface);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-height: 100px;
    overflow-y: auto;
}

/* ==========================================
   Feed Filters - Reusable Filter Component
   ========================================== */

.feed-filters {
    background: var(--bg-surface);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.feed-filters .filters-header {
    display: flex;
    align-items: center;
}

.feed-filters .filters-toggle {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
}

.feed-filters .filters-toggle:hover {
    background: var(--bg-surface-hover);
    border-radius: 12px 12px 0 0;
}

.feed-filters.collapsed .filters-toggle:hover {
    border-radius: 12px;
}

.feed-filters .toggle-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.feed-filters .active-filters-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.feed-filters .btn-refresh {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.feed-filters .btn-refresh:hover:not(:disabled) {
    opacity: 1;
    transform: rotate(90deg);
}

.feed-filters .btn-refresh:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.feed-filters .filter-content {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid var(--border);
}

.feed-filters .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    padding-top: 1rem;
}

.feed-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 140px;
}

.feed-filters .filter-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feed-filters .filter-group select,
.feed-filters .filter-group input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    width: 100%;
}

.feed-filters .search-filter {
    flex: 2;
    min-width: 200px;
}

.feed-filters .tags-filter {
    flex: 1.5;
    min-width: 180px;
}

.feed-filters .city-filter {
    flex: 1;
    min-width: 150px;
}

.feed-filters .filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
}

.feed-filters .filter-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.feed-filters .btn-clear {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.feed-filters .btn-clear:hover:not(:disabled) {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.feed-filters .btn-clear:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .feed-filters .filter-row {
        gap: 0.75rem;
    }

    .feed-filters .filter-group {
        min-width: 100%;
    }

    .feed-filters .search-filter,
    .feed-filters .tags-filter {
        min-width: 100%;
    }
}

/* Feed Page Layout - Three column layout with side slots
   The wrapper breaks out of the container to accommodate side slots */
.feed-results-wrapper {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    /* Break out of container width constraint */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0 1rem;
    box-sizing: border-box;
}

.feed-results-wrapper .feed-results {
    width: 100%;
    max-width: 800px;
    flex-shrink: 0;
}

/* Side slots scroll with feed, using sticky for visibility during scroll */
.feed-results-wrapper .slots-column {
    position: sticky;
    top: 80px;
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10;
    align-self: flex-start;
    height: fit-content;
}

.feed-results-wrapper .slots-column.left {
    order: -1; /* Place left column before feed */
}

.feed-results-wrapper .slots-column.right {
    order: 1; /* Place right column after feed */
}

@media (max-width: 1700px) {
    .feed-results-wrapper .slots-column {
        display: none;
    }

    .feed-results-wrapper {
        width: 100%;
        margin-left: 0;
        display: block;
    }
}

/* ===================================================================
   VIDEO BACKGROUND SYSTEM
   Full-screen video background with overlay effects
   =================================================================== */

.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.video-background {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.video-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 1.5s ease, opacity 1.5s ease;
}

.video-bg-overlay.dark {
    background-color: rgba(0, 0, 0, 0.4);
}

.video-bg-overlay.light {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ===================================================================
   GLASS MODE STYLES
   When .glass-mode is applied to .page or body, ALL UI elements get glass effect
   =================================================================== */

/* Base glass mode - background comes from admin settings (VideoBackground component)
   Fallback to default background image if no video is active */
body.glass-mode,
html.glass-mode {
    /* Fallback background image - same as preview window */
    background: url('/images/default-background.jpg') center/cover fixed no-repeat !important;

    /* Override theme variables to transparent so WebGL glass shows through */
    --bg-primary: transparent;
    --bg-secondary: transparent;
    --bg-surface: transparent;
    --bg-surface-hover: rgba(255, 255, 255, 0.05);
    --bg-talk-bar: transparent;
    --bg-talk-bar-hover: rgba(255, 255, 255, 0.05);
    --bg-comment-bar: transparent;
    --nav-bg: transparent;
    --background: transparent;
    --surface: transparent;
}

/* When custom glass background is active (via glassBackground.setImage/setVideo),
   make body transparent so the glass-bg-container (z-index: -2) shows through */
body.glass-mode.glass-bg-active,
html.glass-mode.glass-bg-active {
    background: transparent !important;
}

.page.glass-mode {
    background: transparent !important;
}

.page.glass-mode main {
    background: transparent !important;
}

/* When body or html has glass-mode, ensure page and main are transparent */
body.glass-mode .page,
html.glass-mode .page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.glass-mode main,
html.glass-mode main {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ============================================================
   GLASS-PANEL ELEMENTS
   These elements get the WebGL glass effect when active.
   CSS fallback provides glass-like effect when WebGL isn't working.
   The .glass-webgl-active class is added when WebGL is rendering.
   ============================================================ */

/* CSS FALLBACK: Semi-transparent background for glass panels (no glass reflection)
   TEMPORARY: Glass reflection disabled on large surfaces due to video bg sync issues.
   Only buttons get WebGL glass effect. */
body.glass-mode .glass-panel,
body.glass-mode .glass-enabled,
html.glass-mode .glass-panel,
html.glass-mode .glass-enabled {
    background: rgba(20, 20, 25, var(--glass-bg-opacity, 0.7)) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* WEBGL ACTIVE: Make elements transparent for WebGL canvas */
body.glass-webgl-active .glass-panel,
body.glass-webgl-active .glass-enabled {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
}

/* Admin tab buttons - WebGL glass effect */
body.glass-webgl-active .admin-tabs .tab-btn {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid transparent !important;
}

/* Header and Footer - when they have glass-panel, they're transparent for WebGL */
/* This styling is the CSS FALLBACK for when WebGL isn't working */
/* TEMPORARY: No glass reflection on header/footer - only semi-transparent bg */
.glass-mode header:not(.glass-panel) {
    background: rgba(20, 20, 25, 0.7) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.glass-mode footer:not(.glass-panel) {
    background: rgba(20, 20, 25, 0.7) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   WRAPPER/CONTAINER ELEMENTS - COMPLETELY TRANSPARENT
   These are technical layout wrappers, NOT UI elements.
   They should NEVER have a background or any visual styling.
   Note: Using .glass-mode works for both body.glass-mode and html.glass-mode
   ============================================================ */
body.glass-mode .container,
body.glass-mode .admin-page,
body.glass-mode .admin-tabs,
body.glass-mode .tab-category,
body.glass-mode .theme-tab,
body.glass-mode .glass-tab,
body.glass-mode .preview-section,
body.glass-mode .preview-box,
body.glass-mode .color-group,
body.glass-mode .color-row,
body.glass-mode .settings-grid,
body.glass-mode .settings-section,
body.glass-mode .presets-section,
body.glass-mode .background-section,
body.glass-mode .actions,
body.glass-mode .talks-list,
body.glass-mode .talks-container,
body.glass-mode .feed-container,
body.glass-mode .notifications-container,
body.glass-mode .rewards-container,
body.glass-mode .achievements-grid,
body.glass-mode .quests-panel,
body.glass-mode .titles-grid,
body.glass-mode .marketplace-grid,
body.glass-mode .page-header,
body.glass-mode .page-title,
body.glass-mode .section-header,
body.glass-mode .content-wrapper,
body.glass-mode .list-wrapper,
body.glass-mode .talk-metadata,
body.glass-mode .feed-wrapper,
body.glass-mode .profile-content,
body.glass-mode .account-content,
body.glass-mode .tabs-wrapper,
body.glass-mode .panel-wrapper,
body.glass-mode .form-wrapper,
html.glass-mode .container,
html.glass-mode .admin-page,
html.glass-mode .admin-tabs,
html.glass-mode .tab-category,
html.glass-mode .theme-tab,
html.glass-mode .glass-tab,
html.glass-mode .preview-section,
html.glass-mode .preview-box,
html.glass-mode .color-group,
html.glass-mode .color-row,
html.glass-mode .settings-grid,
html.glass-mode .settings-section,
html.glass-mode .presets-section,
html.glass-mode .background-section,
html.glass-mode .actions,
html.glass-mode .talks-list,
html.glass-mode .talks-container,
html.glass-mode .feed-container,
html.glass-mode .notifications-container,
html.glass-mode .rewards-container,
html.glass-mode .achievements-grid,
html.glass-mode .quests-panel,
html.glass-mode .titles-grid,
html.glass-mode .marketplace-grid,
html.glass-mode .page-header,
html.glass-mode .page-title,
html.glass-mode .section-header,
html.glass-mode .content-wrapper,
html.glass-mode .list-wrapper,
html.glass-mode .talk-metadata,
html.glass-mode .feed-wrapper,
html.glass-mode .profile-content,
html.glass-mode .account-content,
html.glass-mode .tabs-wrapper,
html.glass-mode .panel-wrapper,
html.glass-mode .form-wrapper {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ============================================================
   TEXT ALWAYS WHITE IN GLASS MODE - Override autoContrast
   The autoContrast feature samples the background and may set black text.
   For LetsTalk, we always want white text since glass panels have dark tint.
   ============================================================ */
body.glass-mode,
html.glass-mode,
.page.glass-mode {
    --glass-text-color: #ffffff !important;
    --glass-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-primary);
}

body.glass-mode input, body.glass-mode button, body.glass-mode select, body.glass-mode textarea, body.glass-mode option,
html.glass-mode input, html.glass-mode button, html.glass-mode select, html.glass-mode textarea, html.glass-mode option,
.page.glass-mode input, .page.glass-mode button, .page.glass-mode select, .page.glass-mode textarea, .page.glass-mode option {
    color: inherit;
}

body.glass-mode h1, body.glass-mode h2, body.glass-mode h3, body.glass-mode h4, body.glass-mode h5, body.glass-mode h6,
body.glass-mode p, body.glass-mode span, body.glass-mode label, body.glass-mode a,
html.glass-mode h1, html.glass-mode h2, html.glass-mode h3, html.glass-mode h4, html.glass-mode h5, html.glass-mode h6,
html.glass-mode p, html.glass-mode span, html.glass-mode label, html.glass-mode a,
.page.glass-mode h1, .page.glass-mode h2, .page.glass-mode h3, .page.glass-mode h4, .page.glass-mode h5, .page.glass-mode h6,
.page.glass-mode p, .page.glass-mode span, .page.glass-mode label, .page.glass-mode a {
    opacity: 1 !important;
    color: var(--text-primary) !important;
}

/* Force white text on glass-panel elements (overrides JS autoContrast) */
body.glass-mode .glass-panel,
body.glass-mode .glass-panel *,
html.glass-mode .glass-panel,
html.glass-mode .glass-panel *,
.page.glass-mode .glass-panel,
.page.glass-mode .glass-panel * {
    --glass-text-color: #ffffff !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   ACTUAL UI ELEMENTS - GLASS EFFECT
   These are the interactive elements users see and click.
   They get the glass-like frosted background effect.
   NOTE: Elements with .glass-panel class use WebGL instead.
   Supports body.glass-mode, html.glass-mode (pre-Blazor), and .page.glass-mode
   ============================================================ */
body.glass-mode .talk-card:not(.glass-panel),
body.glass-mode .feed-talk:not(.glass-panel),
body.glass-mode .comment-item:not(.glass-panel),
body.glass-mode .notification-item:not(.glass-panel),
body.glass-mode .quest-card:not(.glass-panel),
body.glass-mode .reward-item:not(.glass-panel),
body.glass-mode .achievement-card:not(.glass-panel),
body.glass-mode .title-card:not(.glass-panel),
body.glass-mode .marketplace-item:not(.glass-panel),
body.glass-mode .modal-content:not(.glass-panel),
body.glass-mode .popup-content:not(.glass-panel),
body.glass-mode .dropdown-menu:not(.glass-panel),
body.glass-mode .toast:not(.glass-panel),
body.glass-mode .stat-card:not(.glass-panel),
body.glass-mode .stat-box:not(.glass-panel),
body.glass-mode .stat-item:not(.glass-panel),
body.glass-mode .stats-card:not(.glass-panel),
body.glass-mode .card:not(.glass-panel),
body.glass-mode .video-card:not(.glass-panel),
body.glass-mode .activity-item:not(.glass-panel),
body.glass-mode .recent-activity-item:not(.glass-panel),
body.glass-mode .filter-panel:not(.glass-panel),
body.glass-mode .filter-section:not(.glass-panel),
html.glass-mode .talk-card:not(.glass-panel),
html.glass-mode .feed-talk:not(.glass-panel),
html.glass-mode .comment-item:not(.glass-panel),
html.glass-mode .notification-item:not(.glass-panel),
html.glass-mode .quest-card:not(.glass-panel),
html.glass-mode .reward-item:not(.glass-panel),
html.glass-mode .achievement-card:not(.glass-panel),
html.glass-mode .title-card:not(.glass-panel),
html.glass-mode .marketplace-item:not(.glass-panel),
html.glass-mode .modal-content:not(.glass-panel),
html.glass-mode .popup-content:not(.glass-panel),
html.glass-mode .dropdown-menu:not(.glass-panel),
html.glass-mode .toast:not(.glass-panel),
html.glass-mode .stat-card:not(.glass-panel),
html.glass-mode .stat-box:not(.glass-panel),
html.glass-mode .stat-item:not(.glass-panel),
html.glass-mode .stats-card:not(.glass-panel),
html.glass-mode .card:not(.glass-panel),
html.glass-mode .video-card:not(.glass-panel),
html.glass-mode .activity-item:not(.glass-panel),
html.glass-mode .recent-activity-item:not(.glass-panel),
html.glass-mode .filter-panel:not(.glass-panel),
html.glass-mode .filter-section:not(.glass-panel),
.page.glass-mode .talk-card:not(.glass-panel),
.page.glass-mode .feed-talk:not(.glass-panel),
.page.glass-mode .comment-item:not(.glass-panel),
.page.glass-mode .notification-item:not(.glass-panel),
.page.glass-mode .quest-card:not(.glass-panel),
.page.glass-mode .reward-item:not(.glass-panel),
.page.glass-mode .achievement-card:not(.glass-panel),
.page.glass-mode .title-card:not(.glass-panel),
.page.glass-mode .marketplace-item:not(.glass-panel),
.page.glass-mode .modal-content:not(.glass-panel),
.page.glass-mode .popup-content:not(.glass-panel),
.page.glass-mode .dropdown-menu:not(.glass-panel),
.page.glass-mode .toast:not(.glass-panel),
.page.glass-mode .stat-card:not(.glass-panel),
.page.glass-mode .stat-box:not(.glass-panel),
.page.glass-mode .stat-item:not(.glass-panel),
.page.glass-mode .stats-card:not(.glass-panel),
.page.glass-mode .card:not(.glass-panel),
.page.glass-mode .video-card:not(.glass-panel),
.page.glass-mode .activity-item:not(.glass-panel),
.page.glass-mode .recent-activity-item:not(.glass-panel),
/* TEMPORARY: No glass reflection on UI elements - only semi-transparent bg */
.page.glass-mode .filter-panel:not(.glass-panel),
.page.glass-mode .filter-section:not(.glass-panel) {
    background: rgba(25, 25, 30, var(--glass-bg-opacity, 0.5)) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Tab buttons - UI elements with glass effect */
body.glass-mode .tab-btn:not(.glass-panel),
body.glass-mode .tab:not(.glass-panel),
body.glass-mode .tabs-container .tab:not(.glass-panel),
html.glass-mode .tab-btn:not(.glass-panel),
html.glass-mode .tab:not(.glass-panel),
html.glass-mode .tabs-container .tab:not(.glass-panel),
.page.glass-mode .tab-btn:not(.glass-panel),
.page.glass-mode .tab:not(.glass-panel),
.page.glass-mode .tabs-container .tab:not(.glass-panel) {
    background: rgba(40, 40, 50, var(--glass-bg-opacity, 0.5)) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.glass-mode .tab-btn:not(.glass-panel):hover,
body.glass-mode .tab:not(.glass-panel):hover,
html.glass-mode .tab-btn:not(.glass-panel):hover,
html.glass-mode .tab:not(.glass-panel):hover,
.page.glass-mode .tab-btn:not(.glass-panel):hover,
.page.glass-mode .tab:not(.glass-panel):hover {
    background: rgba(60, 60, 70, calc(var(--glass-bg-opacity, 0.5) + 0.1)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.glass-mode .tab-btn:not(.glass-panel).active,
html.glass-mode .tab-btn:not(.glass-panel).active,
.page.glass-mode .tab-btn:not(.glass-panel).active {
    background: rgba(99, 102, 241, var(--glass-bg-opacity, 0.5)) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
}

/* Hover state for glass elements */
.glass-mode .talk-card:hover,
.glass-mode .card:hover,
.glass-mode .feed-talk:hover,
.glass-mode .notification-item:hover,
.glass-mode .marketplace-item:hover {
    background: rgba(40, 40, 40, calc(var(--glass-bg-opacity, 0.5) + 0.1)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Navigation in glass mode */
.glass-mode .header-nav {
    background: transparent !important;
}

.glass-mode .nav-link {
    background: transparent !important;
    transition: background 0.2s, color 0.2s;
}

.glass-mode .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.glass-mode .nav-link.active {
    background: rgba(99, 102, 241, 0.2) !important;
}

/* Buttons in glass mode */
.glass-mode .btn,
.glass-mode button:not(.glass-ignore) {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glass-mode .btn-primary,
.glass-mode .btn-submit {
    background: rgba(99, 102, 241, 0.7) !important;
    border: 1px solid rgba(99, 102, 241, 0.5) !important;
}

.glass-mode .btn-primary:hover,
.glass-mode .btn-submit:hover {
    background: rgba(99, 102, 241, 0.85) !important;
}

.glass-mode .btn-secondary,
.glass-mode .btn-outline {
    background: rgba(50, 50, 50, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.glass-mode .btn-secondary:hover,
.glass-mode .btn-outline:hover {
    background: rgba(60, 60, 60, 0.6) !important;
}

/* Form inputs in glass mode */
.glass-mode input[type="text"],
.glass-mode input[type="email"],
.glass-mode input[type="password"],
.glass-mode input[type="number"],
.glass-mode input[type="search"],
.glass-mode input[type="url"],
.glass-mode textarea,
.glass-mode select {
    background: rgba(20, 20, 20, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.glass-mode input:focus,
.glass-mode textarea:focus,
.glass-mode select:focus {
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

/* Tab buttons in glass mode */
.glass-mode .tab-btn,
.glass-mode .tab-button {
    background: transparent !important;
    border: 1px solid transparent !important;
}

.glass-mode .tab-btn:hover,
.glass-mode .tab-button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.glass-mode .tab-btn.active,
.glass-mode .tab-button.active {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Modals and overlays in glass mode */
.glass-mode .modal-overlay,
.glass-mode .popup-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.glass-mode .modal-content,
.glass-mode .popup-content {
    background: rgba(25, 25, 25, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Audio player in glass mode */
.glass-mode .audio-player,
.glass-mode .waveform-container {
    background: rgba(20, 20, 20, 0.4) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Admin-specific glass styles */
.glass-mode .admin-sidebar {
    background: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.glass-mode .admin-tabs {
    background: rgba(25, 25, 25, 0.5) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Tables in glass mode */
.glass-mode table {
    background: transparent !important;
}

.glass-mode thead {
    background: rgba(30, 30, 30, 0.6) !important;
}

.glass-mode tbody tr {
    background: rgba(25, 25, 25, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.glass-mode tbody tr:hover {
    background: rgba(35, 35, 35, 0.5) !important;
}

/* Badge/tag elements in glass mode */
.glass-mode .badge,
.glass-mode .tag,
.glass-mode .tier-badge {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Scrollbar styling for glass mode */
.glass-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.glass-mode ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.glass-mode ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.glass-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Ensure proper z-index layering with glass */
.glass-mode .page > * {
    position: relative;
    z-index: 1;
}

/* Glass effect intensity classes - applied dynamically
   TEMPORARY: backdrop-filter disabled on non-button elements due to video bg sync issues.
   Buttons retain glass effect, larger surfaces use transparent bg only. */
.glass-subtle {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(30, 30, 30, 0.25) !important;
}

.glass-medium {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(30, 30, 30, 0.4) !important;
}

.glass-strong {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(30, 30, 30, 0.55) !important;
}

.glass-frost {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(40, 40, 40, 0.65) !important;
}

/* Buttons still get glass blur effect */
button.glass-subtle, .btn.glass-subtle, .tab-btn.glass-subtle, .glass-button.glass-subtle {
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
}

button.glass-medium, .btn.glass-medium, .tab-btn.glass-medium, .glass-button.glass-medium {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

button.glass-strong, .btn.glass-strong, .tab-btn.glass-strong, .glass-button.glass-strong {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

button.glass-frost, .btn.glass-frost, .tab-btn.glass-frost, .glass-button.glass-frost {
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
}

/* ========================================
   GLASS POPUP STYLES
   ======================================== */

.glass-popup-overlay {
    z-index: 1100;
}

.glass-popup-modal {
    max-width: 900px;
    width: 95%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.glass-popup-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.glass-popup-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.glass-popup-body {
    padding: 1rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.glass-popup-body .glass-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.glass-popup-body .glass-iframe-container {
    position: relative;
    width: 100%;
    height: 850px;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a2e;
}

.glass-popup-body .glass-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .glass-popup-modal {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .glass-popup-body .glass-iframe-container {
        height: 600px;
    }
}


/* Controls follow the selected font; server font assignments may override these defaults. */
button, input, textarea, select { font-family: inherit; }
.btn-primary { color: var(--primary-foreground, #ffffff); }

h1[tabindex="-1"]:focus { outline: none; }
