/* ============================================
   THE CRASH OUT EXPERIENCE - Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;900&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-muted: #737373;
    --text-subtle: #525252;
    --border-default: rgba(255, 255, 255, 0.1);
    --border-active: rgba(255, 255, 255, 0.4);
    --glow: rgba(255, 255, 255, 0.5);
    --glass: rgba(255, 255, 255, 0.05);
}

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

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ ANIMATIONS ============ */
@keyframes glitchText {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(-3px, -3px);
    }

    60% {
        transform: translate(3px, 3px);
    }

    80% {
        transform: translate(3px, -3px);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes morphShape {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-100px) translateX(50px);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============ LANDING SECTION ============ */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.particles-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: particleFloat 10s infinite ease-in-out;
}

/* ============ HEADER ============ */
.experience-header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideUpFade 0.8s ease forwards;
}

.experience-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.experience-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.9;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #fff 0%, #737373 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.experience-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ============ MODE GRID ============ */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 700px;
    width: 100%;
    animation: slideUpFade 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* Make THE TEST span full width */
.mode-card.mode-featured {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .mode-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .mode-card.mode-featured {
        grid-column: span 1;
    }
}

.mode-card {
    background: var(--glass);
    border: 2px solid var(--border-default);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mode-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-5px);
    animation: pulseGlow 2s infinite;
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.mode-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 12px;
}

.mode-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.mode-tag {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-muted);
}

/* Mode-specific colors on hover */
.mode-card[data-mode="test"]:hover {
    border-color: #ff4444;
}

.mode-card[data-mode="oracle"]:hover {
    border-color: #8844ff;
}

.mode-card[data-mode="mood"]:hover {
    border-color: #44ff88;
}

.mode-card[data-mode="game"]:hover {
    border-color: #ffaa00;
}

/* ============ BACK BUTTON ============ */
.back-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--glass);
    border: 1px solid var(--border-default);
    border-radius: 30px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

/* ============ FOOTER ============ */
.experience-footer {
    margin-top: 60px;
    text-align: center;
    animation: slideUpFade 0.8s ease 0.4s forwards;
    opacity: 0;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ============ TEST MODE ============ */
.test-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

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

.phase-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
}

.phase-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-default);
    transition: all 0.3s ease;
}

.phase-dot.active {
    background: var(--text-primary);
    box-shadow: 0 0 10px var(--glow);
}

.phase-dot.complete {
    background: var(--text-muted);
}

.question-number {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.question-text {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.2;
    margin-bottom: 40px;
}

/* Answer options */
.answers-grid {
    display: grid;
    gap: 16px;
}

.answer-option {
    background: var(--glass);
    border: 2px solid var(--border-default);
    border-radius: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 1rem;
}

.answer-option:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.answer-option.selected {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.15);
}

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--text-primary);
    transition: width 0.3s ease;
    z-index: 1000;
}

/* ============ RESULTS ============ */
.results-container {
    min-height: 100vh;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-display {
    text-align: center;
    margin-bottom: 40px;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.score-number {
    font-size: clamp(5rem, 20vw, 12rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 1;
    animation: glitchText 0.5s ease forwards;
}

.score-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--border-default);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px auto 0;
}

.score-bar-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

.era-badge {
    display: inline-block;
    padding: 12px 24px;
    background: var(--glass);
    border: 2px solid var(--border-active);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 20px;
    animation: pulseGlow 3s infinite;
}

.breakdown-card {
    background: var(--glass);
    border: 1px solid var(--border-default);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    margin: 30px 0;
}

.breakdown-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.breakdown-item {
    margin-bottom: 20px;
}

.breakdown-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.breakdown-bar {
    height: 6px;
    background: var(--border-default);
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4488ff, #ff44ff);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.message-card {
    background: var(--glass);
    border: 1px solid var(--border-default);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.message-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Buttons */
.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-default);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.secondary-btn:hover {
    border-color: var(--text-primary);
    background: var(--glass);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 30px;
}

/* ============ PLAYLIST ============ */
.playlist-container {
    max-width: 600px;
    width: 100%;
    margin-top: 40px;
}

.playlist-title {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.playlist-item:hover {
    border-color: var(--text-primary);
    transform: translateX(5px);
}

.playlist-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.playlist-info {
    flex: 1;
}

.playlist-song-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.playlist-song-era {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.playlist-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 24px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .back-btn {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .mode-card {
        padding: 30px 20px;
    }

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

    .mode-title {
        font-size: 1.25rem;
    }
}