* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important;
}

:root {
    /* Common */
    --primary-purple: #9333ea;
    --purple-light: #a855f7;
    --purple-lighter: #c084fc;

    /* Dark Mode Defaults */
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --header-bg: rgba(15, 15, 15, 0.5);
}

/* Light Mode Variables */
[data-theme="light"] {
    --bg-color: #cdcdcd;
    --hero-purple-color: #52078e;
    --card-bg: rgb(0, 0, 0);
    --border-color: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --header-bg: rgba(255, 255, 255, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Zalando Sans Expanded", sans-serif;
    font-weight: 400;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* custom mouse cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    will-change: left, top;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-secondary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
    box-shadow:
            0 0 15px rgba(147, 51, 234, 0.55),
            0 0 40px rgba(147, 51, 234, 0.22);
}

/* Ensure buttons and links don't show default cursor */
button,
a {
    cursor: none !important;
}

/* Disable custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }
}

/* ===== Loading Screen ===== */

.loading-screen {
    position: fixed;
    inset: 0;
    background: #0a0a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-screen h2 {
    font-family: "Zen Dots", sans-serif;
    font-size: 1.5rem;
    color: #8b5cf6;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2a2a4a;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
body.auth-checking > *:not(#loadingScreen) {
    visibility: hidden;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 70px; /* RIGHT of menu icon */
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.back-btn img {
    width: 20px;
    height: 20px;
}

.back-btn:hover {
    border-color: var(--primary-purple);
    transform: translateX(-2px) scale(1.05);
}

/* Dark mode icon fix */
[data-theme="dark"] .back-btn img {
    filter: invert(1);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #581c87; border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #7e22ce; }
