/* What Should I Make? - Styles */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --bg-panel: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --primary: #a855f7;
    --primary-dim: #7c3aed;
    --primary-light: #c084fc;
    --primary-glow: rgba(168, 85, 247, 0.3);
    --secondary: #e879f9;
    --accent-yellow: #fbbf24;
    --success: #22c55e;
    --game: #ef4444;
    --art: #ec4899;
    --music: #f59e0b;
    --story: #3b82f6;
    --code: #10b981;
    --build: #06b6d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
}

/* Start Screen */
#start-screen {
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #2d1a4a 0%, #0a0a0f 70%);
    padding: 2rem;
}

.start-content {
    text-align: center;
    max-width: 500px;
}

.logo-icon {
    margin-bottom: 2rem;
}

.sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle.s1 { animation-delay: 0s; }
.sparkle.s2 { animation-delay: 0.3s; }
.sparkle.s3 { animation-delay: 0.6s; }
.sparkle.s4 { animation-delay: 0.9s; }
.sparkle.s5 { animation-delay: 1.2s; }
.sparkle.s6 { animation-delay: 1.5s; }

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.bulb-rays {
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.start-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-icon {
    font-size: 1.5rem;
}

/* Quiz Screen */
#quiz-screen {
    flex-direction: column;
    background: var(--bg-dark);
}

.quiz-header {
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    height: 8px;
    background: var(--bg-panel);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 16.66%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quiz-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.question-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.question-text {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.option-card {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.option-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.option-card.selected {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.2);
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
}

.option-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 3-column grid for some questions */
.options-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* 4-column grid */
.options-grid.four-col {
    grid-template-columns: repeat(4, 1fr);
}

.options-grid.four-col .option-card {
    padding: 1rem;
}

.options-grid.four-col .option-icon {
    font-size: 2.5rem;
}

.options-grid.four-col .option-title {
    font-size: 0.95rem;
}

.options-grid.four-col .option-desc {
    font-size: 0.75rem;
}

/* Analyzing Screen */
#analyzing-screen {
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #2d1a4a 0%, #0a0a0f 70%);
}

.analyzing-content {
    text-align: center;
}

.analyzing-animation {
    width: 200px;
    height: 200px;
    position: relative;
    margin: 0 auto 2rem;
}

.orbit {
    width: 100%;
    height: 100%;
    position: absolute;
    animation: orbit-spin 4s linear infinite;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.planet {
    position: absolute;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    animation: counter-spin 4s linear infinite;
}

@keyframes counter-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.planet.p1 { top: 0; left: 50%; transform: translateX(-50%); }
.planet.p2 { top: 25%; right: 0; }
.planet.p3 { bottom: 25%; right: 0; }
.planet.p4 { bottom: 0; left: 50%; transform: translateX(-50%); }
.planet.p5 { bottom: 25%; left: 0; }
.planet.p6 { top: 25%; left: 0; }

.center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.analyzing-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.analyzing-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Result Screen */
#result-screen {
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #2d1a4a 0%, #0a0a0f 70%);
    padding: 2rem;
    overflow-y: auto;
}

.result-content {
    text-align: center;
    max-width: 700px;
    padding: 2rem 0;
}

.result-badge {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 0 40px var(--primary-glow);
    animation: badge-pop 0.5s ease-out;
}

@keyframes badge-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.result-label {
    font-size: 0.875rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.result-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-tagline {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.result-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.result-traits, .result-perfect-for, .other-matches {
    margin-bottom: 2rem;
    text-align: left;
}

.result-traits h3, .result-perfect-for h3, .other-matches h3 {
    font-size: 1rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    text-align: center;
}

.traits-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.trait-tag {
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trait-icon {
    font-size: 1rem;
}

.perfect-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.perfect-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.perfect-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.perfect-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.other-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.other-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.other-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.other-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    background: var(--bg-panel);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.other-info {
    text-align: left;
}

.other-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.other-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cta-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.cta-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {
    .question-text {
        font-size: 1.5rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .options-grid.three-col,
    .options-grid.four-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .perfect-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .other-grid {
        grid-template-columns: 1fr;
    }

    .result-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 500px) {
    .start-content h1 {
        font-size: 2rem;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .options-grid.three-col,
    .options-grid.four-col {
        grid-template-columns: 1fr;
    }

    .option-icon {
        font-size: 2.5rem;
    }

    .perfect-grid {
        grid-template-columns: 1fr;
    }
}

/* Question animations */
.question-container {
    animation: fade-in 0.4s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.option-card {
    animation: option-pop 0.4s ease-out backwards;
}

.option-card:nth-child(1) { animation-delay: 0.1s; }
.option-card:nth-child(2) { animation-delay: 0.2s; }
.option-card:nth-child(3) { animation-delay: 0.3s; }
.option-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes option-pop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
