:root {
    /* DARK THEME (Default) */
    --bg-main: #121215;
    --bg-card: rgba(30, 30, 35, 0.6);
    --bg-glass: rgba(30, 30, 35, 0.4);
    --bg-sidebar: rgba(20, 20, 25, 0.6);

    --primary: #ff6b00;
    --primary-hover: #e65a00;
    --primary-glow: rgba(255, 107, 0, 0.4);

    --accent: #2c2c35;
    --text-main: #ffffff;
    --text-muted: #a0a0a5;

    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --font-main: 'Inter', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

[data-theme="light"] {
    --bg-main: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-sidebar: rgba(255, 255, 255, 0.65);

    --primary: #ff6b00;
    /* Keep orange or switch to blue if preferred, sticking to orange for brand consistency */
    --primary-hover: #e65a00;
    --primary-glow: rgba(255, 107, 0, 0.2);

    --accent: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;

    --border-glass: rgba(255, 255, 255, 0.4);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    transition: background 0.3s ease, color 0.3s ease;
    /* Clean grainy gradient background for depth in dark mode */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255, 107, 0, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(79, 70, 229, 0.05), transparent 25%);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    border-radius: var(--radius-lg);
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* AUTH PAGES */
.auth-page {
    background: #0a0a0c;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
}

.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: moveBlob 20s infinite alternate;
}

.blob-1 {
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    background: #9333ea;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes moveBlob {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

/* MODERN THEME SWITCHER */
.theme-switch {
    width: 60px;
    height: 32px;
    background: var(--accent);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    padding: 2px;
}

.theme-switch .switch-ball {
    width: 26px;
    height: 26px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    left: 2px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px var(--primary-glow);
    z-index: 1;
}

.theme-switch .switch-ball i {
    font-size: 0.8rem;
    color: white;
    opacity: 0.9;
}

[data-theme="light"] .theme-switch .switch-ball {
    transform: translateX(28px);
}

.theme-switch .switch-icons {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 0.8rem;
    z-index: 0;
}

[data-theme="light"] .theme-switch {
    background: #e5e7eb;
}

/* GLOBAL SELECT / DROPDOWN STYLES */
select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 0.8rem 2.8rem 0.8rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(0,0,0,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-color: rgba(255, 255, 255, 0.8);
}

select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

[data-theme="light"] select:hover {
    background-color: #fff;
    border-color: var(--primary);
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select option {
    background: #1e1e22;
    color: #fff;
    padding: 12px;
}

[data-theme="light"] select option {
    background: #fff;
    color: #1f2937;
}

/* GLOBAL SCROLLBAR STYLES */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    border: 2px solid transparent;
    background-clip: padding-box;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}