/* css/theme.css */

/* ─── DARK THEME ─── */
[data-theme="dark"] {
    --bg-base:        #0d0d14;
    --surface:        #13131e;
    --surface-2:      #1a1a28;
    --surface-3:      #21212f;
    --sidebar-bg:     rgba(13,13,20,0.92);
    --header-bg:      rgba(13,13,20,0.85);
    --border:         rgba(255,255,255,0.07);
    --scrollbar:      rgba(255,255,255,0.1);

    --text:           #e8e8f5;
    --text-muted:     #6b6b8a;

    --accent:         #7c6df0;
    --accent-dark:    #6455d6;
    --accent-gradient: linear-gradient(135deg, #7c6df0, #9f70f5);
    --accent-shadow:  rgba(124,109,240,0.4);
    --accent-ring:    rgba(124,109,240,0.15);
    --accent-glow:    rgba(124,109,240,0.12);
    --accent2-glow:   rgba(236,72,153,0.08);

    --glass-bg:       rgba(19,19,30,0.85);
    --glass-border:   rgba(255,255,255,0.09);
    --glass-btn-bg:   rgba(255,255,255,0.06);
    --glass-btn-hover:rgba(255,255,255,0.1);

    --bubble-bg:      #1e1e2e;
    --bubble-border:  rgba(255,255,255,0.07);
    --bubble-hover:   #242436;

    --room-hover:     rgba(255,255,255,0.04);
    --room-active:    rgba(124,109,240,0.14);

    --shadow-lg:      0 10px 40px rgba(0,0,0,0.5);
    --shadow-xl:      0 20px 60px rgba(0,0,0,0.6);

    color-scheme: dark;
}

/* ─── LIGHT THEME ─── */
[data-theme="light"] {
    --bg-base:        #f0f0f8;
    --surface:        #ffffff;
    --surface-2:      #f4f4fb;
    --surface-3:      #eaeaf5;
    --sidebar-bg:     rgba(248,248,255,0.95);
    --header-bg:      rgba(255,255,255,0.9);
    --border:         rgba(0,0,0,0.08);
    --scrollbar:      rgba(0,0,0,0.12);

    --text:           #1a1a2e;
    --text-muted:     #8888aa;

    --accent:         #6c5df0;
    --accent-dark:    #5b4de0;
    --accent-gradient: linear-gradient(135deg, #6c5df0, #9060f5);
    --accent-shadow:  rgba(108,93,240,0.35);
    --accent-ring:    rgba(108,93,240,0.12);
    --accent-glow:    rgba(108,93,240,0.08);
    --accent2-glow:   rgba(236,72,153,0.05);

    --glass-bg:       rgba(255,255,255,0.9);
    --glass-border:   rgba(0,0,0,0.08);
    --glass-btn-bg:   rgba(0,0,0,0.04);
    --glass-btn-hover:rgba(0,0,0,0.08);

    --bubble-bg:      #f0f0fa;
    --bubble-border:  rgba(0,0,0,0.07);
    --bubble-hover:   #e8e8f5;

    --room-hover:     rgba(0,0,0,0.04);
    --room-active:    rgba(108,93,240,0.1);

    --shadow-lg:      0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl:      0 20px 60px rgba(0,0,0,0.15);

    color-scheme: light;
}

body { background: var(--bg-base); color: var(--text); }

/* Theme transition */
*, *::before, *::after {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
/* Exclude transitions that shouldn't animate */
.msg-bubble, .room-item, .glass-btn, button, input, textarea, a {
    transition: all 0.2s ease;
}
