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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #f0f0f5;
    --text-secondary: #9090a0;
    --accent: #8B5CF6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at top, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 0 1rem;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a0a0ff 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titlePulse 3s ease-in-out infinite;
    text-shadow: 0 0 60px var(--accent-glow);
}

@keyframes titlePulse {
    0%, 100% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 40px var(--accent-glow)); }
}

.question-mark {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 8vw, 4rem);
    color: var(--accent);
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Score Panel */
.score-panel {
    display: flex;
    gap: 2rem;
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    border-radius: 100px;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.score-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.score-value.on-fire {
    color: var(--warning);
    animation: fireGlow 0.5s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    from { text-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
    to { text-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
}

/* Category Selector */
.category-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.category-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.category-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
}

.clue-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.clue-card.correct-glow {
    border-color: var(--success);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.clue-card.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.clue-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    line-height: 1.6;
    color: var(--text-primary);
}

/* Attempts */
.attempts-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.attempt-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.attempt-dot.used {
    background: var(--error);
}

/* Feedback */
.feedback {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.feedback.correct {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.feedback.close {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.feedback.wrong {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Input Form */
.input-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1rem;
}

.guess-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.guess-input::placeholder {
    color: var(--text-secondary);
}

.guess-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.submit-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    background: var(--accent);
    border: none;
    border-radius: 100px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* Buttons */
.reveal-btn {
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.reveal-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.revealed-container {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.revealed-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.revealed-answer {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.next-btn {
    padding: 1rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent);
    border: none;
    border-radius: 100px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.next-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-glow);
}

.share-btn {
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 100px;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Controls */
.controls {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.control-btn:hover {
    border-color: var(--accent);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    animation: popIn 0.3s ease;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-body p {
    margin-bottom: 0.5rem;
}

.modal-button {
    width: 100%;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent);
    border: none;
    border-radius: 100px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.remix-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.remix-link:hover {
    opacity: 1;
}

/* Confetti */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti-particle {
    position: absolute;
    top: -10px;
    border-radius: 2px;
    animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .score-panel {
        padding: 0.75rem 1.5rem;
        gap: 1.5rem;
    }
    
    .score-value {
        font-size: 1.2rem;
    }
    
    .clue-card {
        padding: 1.5rem;
    }
    
    .input-form {
        flex-direction: column;
    }
    
    .submit-btn {
        width: 100%;
    }
}