* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(236, 72, 153, 0.3);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e9ce37;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ecd348;
}

.nav-links .active {
    color: #e9ce37;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e9ce37;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #2c4a21 0%, #4a0d47 50%, #2a0a2a 100%);
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    z-index: 2;
    padding: 2rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(45deg, #b69f20, #f0e49f, #aa920b);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #a1a1aa;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.2rem;
    color: #00d800;
    font-weight: 600;
}

/* Mixer Section */
.mixer-section {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.mixer-card {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.mixer-intro {
    text-align: center;
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #00d800, #f916a2);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.btn-secondary {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: white;
}

.btn-secondary:hover {
    background: rgba(236, 72, 153, 0.3);
}

/* Traits Grid */
.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.trait-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid rgba(236, 72, 153, 0.3);
    background: rgba(20, 20, 20, 0.8);
    cursor: pointer;
    transition: all 0.3s;
}

.trait-item:hover {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.5);
    transform: translateY(-2px);
}

.trait-item input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #ec4899;
}

.trait-item label {
    cursor: pointer;
    flex: 1;
    font-size: 1rem;
}

/* Result */
.result {
    background: rgba(0, 216, 0, 0.1);
    border: 1px solid rgba(0, 216, 0, 0.3);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    animation: fadeIn 0.6s ease forwards;
}

.result.hidden {
    display: none;
}

.result-title {
    color: #00d800;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.genre-output {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-align: center;
    margin: 1rem 0;
}

.explain-output {
    color: #a1a1aa;
    font-size: 1rem;
    line-height: 1.5;
}

.top-scores {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(236, 72, 153, 0.3);
}

.top-scores strong {
    color: #ec4899;
}

.top-scores ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    list-style: decimal;
}

.top-scores li {
    color: #a1a1aa;
    margin: 0.5rem 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.flex {
    display: flex;
}

.loading-content {
    text-align: center;
}

.spinner {
    position: relative;
    width: 8rem;
    height: 8rem;
    margin: 0 auto 2rem;
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #00d800;
    border-right-color: #f916a2;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-circle:nth-child(2) {
    border-top-color: #f916a2;
    border-right-color: #00d800;
    animation-delay: 0.15s;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
}

.spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
}

.loading-text {
    color: #a1a1aa;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.95);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(236, 72, 153, 0.3);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    font-size: 2rem;
    font-weight: bold;
    color: #ec4899;
    margin-bottom: 1rem;
}

.footer-text {
    color: #a1a1aa;
    font-size: 1.1rem;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #ff94c9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(236, 72, 153, 0.3);
        padding: 0 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 300px;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .logo {
        font-size: 1.25rem;
    }

    .hero {
        height: auto;
        padding: 6rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .mixer-section {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .mixer-card {
        padding: 1.5rem;
    }

    .traits-grid {
        grid-template-columns: 1fr;
    }

    .genre-output {
        font-size: 2rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-title {
        font-size: 1.5rem;
    }

    .footer-text {
        font-size: 1rem;
    }
}

@media (min-width: 640px) {
    .traits-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (min-width: 1024px) {
    .traits-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

@media (min-width: 1280px) {
    .traits-grid { 
        grid-template-columns: repeat(4, 1fr); 
    }
}