:root {
    --bg-main: #09090b; /* Even darker for nightmare theme */
    --bg-secondary: rgba(24, 24, 27, 0.7);
    --bg-tertiary: #1f1f22;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-primary: #a855f7; /* Vibrant Purple */
    --accent-hover: #9333ea;   /* Darker Purple */
    --border-color: #27272a;
}

body.light-theme {
    --bg-main: #f4f4f5;
    --bg-secondary: rgba(255, 255, 255, 0.8);
    --bg-tertiary: #ffffff;
    --text-main: #18181b;
    --text-muted: #52525b;
    --border-color: #e4e4e7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* Premium Labyrinth Background */
.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.15;
    /* An isometric/maze-like SVG pattern data URI */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83v58.34h-58.34l-.83-.83v-58.34h58.34zm-5.83 5.83h-46.68v46.68h46.68v-46.68zm-35.01 11.67h23.34v23.34h-23.34v-23.34zm11.67 5.835v11.67h-11.67v-11.67h11.67z' fill='%23a855f7' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 100px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
}

a {
    text-decoration: none;
    color: var(--text-main);
}

.text-xs {
    font-size: 0.7rem;
    margin-left: 0.2rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.logo-text {
    color: var(--text-main);
    letter-spacing: -0.03em;
    text-shadow: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-main);
}

.btn-signin-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.btn-signin-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.theme-toggle-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-primary);
}

.music-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    color: var(--text-muted);
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.75rem;
}

.music-toggle-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-primary);
}

.music-toggle-btn.is-playing {
    border-color: rgba(168, 85, 247, 0.5);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Premium Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem 6rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-logo-large {
    width: 140px;
    height: 140px;
    border: 12px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 4rem;
    color: var(--accent-primary);
    position: relative;
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.3), inset 0 0 20px rgba(168, 85, 247, 0.2);
}

.hero-logo-large::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50px;
    width: 10px;
    height: 40px;
    background: var(--bg-main);
    transform: rotate(45deg);
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.highlight-primary {
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Categories Section */
.categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.categories-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.category-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    background-color: rgba(39, 39, 42, 0.9);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.1);
}

.category-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.category-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: #050507;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent-primary);
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.link-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-column h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.link-column a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.link-column a:hover {
    color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 900px) {
    .nav-center {
        display: none;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .footer-top {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-right .btn-signin-primary, .nav-right .theme-toggle-btn {
        display: none;
    }

    .music-toggle-btn span {
        display: none;
    }

    .music-toggle-btn {
        width: 36px;
        padding: 0;
        font-size: 1rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-right.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: var(--bg-secondary);
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        backdrop-filter: blur(10px);
    }
    
    .nav-right.mobile-active .nav-link, 
    .nav-right.mobile-active .btn-signin-primary {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* Custom Hero Download Button */
.btn-download-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #a855f7, #6b21a8);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 1;
}

.btn-download-hero:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.6), 0 0 15px rgba(168, 85, 247, 0.4) inset;
    color: white;
}

.btn-download-hero i {
    font-size: 1.4rem;
}

.btn-download-hero .ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    animation: rippleEffect 0.6s linear;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}
