/* ═══════════════════════════════════════════════════════════════
   PartyQuiz.me — Site Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
    --pq-primary: #6366f1;
    --pq-primary-dark: #4f46e5;
    --pq-gradient-start: #6366f1;
    --pq-gradient-end: #ec4899;
    --pq-success: #22c55e;
    --pq-danger: #ef4444;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8f9fa;
}

/* ─── Landing Page ─────────────────────────────────────────────── */

.landing-page {
    background: #0f172a;
    color: #fff;
}

.hero-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--pq-gradient-start), var(--pq-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

    .hero-actions .btn {
        border-radius: 50px;
        padding: 0.75rem 2rem;
        font-weight: 600;
    }

    .hero-actions .btn-primary {
        background: var(--pq-primary);
        border-color: var(--pq-primary);
    }

        .hero-actions .btn-primary:hover {
            background: var(--pq-primary-dark);
        }

.features-section {
    padding: 5rem 0;
    background: #1e293b;
}

.section-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 3rem;
    font-size: 2rem;
}

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

.feature-card {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.2s;
}

    .feature-card:hover {
        transform: translateY(-4px);
    }

.feature-icon {
    font-size: 2.5rem;
    color: var(--pq-gradient-end);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    opacity: 0.7;
}

.usecases-section {
    padding: 5rem 0;
    background: #0f172a;
}

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

.usecase-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s;
}

    .usecase-card:hover {
        transform: translateY(-2px);
    }

    .usecase-card i {
        font-size: 2rem;
        color: var(--pq-primary);
        margin-bottom: 0.75rem;
        display: block;
    }

    .usecase-card h4 {
        font-weight: 600;
    }

    .usecase-card p {
        opacity: 0.6;
        font-size: 0.9rem;
        margin: 0;
    }

.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--pq-gradient-start), var(--pq-gradient-end));
    text-align: center;
}

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

    .cta-section .btn {
        border-radius: 50px;
        padding: 0.75rem 2rem;
        font-weight: 600;
        margin-top: 1rem;
    }

.landing-footer {
    padding: 2rem 0;
    text-align: center;
    opacity: 0.5;
}

.landing-footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.landing-footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ─── Dashboard ────────────────────────────────────────────────── */

.quiz-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

    .quiz-card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    }

.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-icon {
    font-size: 1.75rem;
    color: var(--pq-primary);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 0.85rem;
}

/* ─── Quiz Taking ──────────────────────────────────────────────── */

.take-quiz-layout {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8f9fa 0%, #e2e8f0 100%);
}

.take-quiz-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
}

.quiz-join-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.quiz-btn-start {
    border-radius: 50px;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--pq-primary);
    border-color: var(--pq-primary);
}

.quiz-question-container {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.quiz-question-text h3 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.quiz-answer-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

    .quiz-answer-btn:hover:not(:disabled) {
        border-color: var(--pq-primary);
        background: #f0f0ff;
    }

    .quiz-answer-btn:disabled {
        cursor: default;
    }

    .quiz-answer-btn.correct {
        border-color: var(--pq-success);
        background: #dcfce7;
        color: #166534;
        animation: pop 0.3s ease;
    }

    .quiz-answer-btn.incorrect {
        border-color: var(--pq-danger);
        background: #fee2e2;
        color: #991b1b;
        animation: shake 0.4s ease;
    }

.answer-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-answer-btn.correct .answer-letter {
    background: var(--pq-success);
    color: #fff;
}

.quiz-answer-btn.incorrect .answer-letter {
    background: var(--pq-danger);
    color: #fff;
}

/* ─── Quiz Sub-Header ──────────────────────────────────────────── */

.quiz-subheader,
.quiz-subheader-preview {
    min-height: 52px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.quiz-subheader-preview {
    border-radius: 0;
}

/* ─── Completion ───────────────────────────────────────────────── */

.quiz-complete {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.celebration-icon {
    font-size: 4rem;
    animation: bounce 1s ease infinite;
}

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pq-gradient-start), var(--pq-gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
}

.leaderboard-list {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    gap: 1rem;
}

    .leaderboard-item.current-user {
        background: #ede9fe;
        border: 2px solid var(--pq-primary);
    }

.lb-rank {
    font-weight: 700;
    width: 32px;
    text-align: center;
}

.lb-name {
    flex-grow: 1;
    font-weight: 500;
}

.lb-score {
    font-weight: 700;
    color: var(--pq-primary);
}

/* ─── Animations ───────────────────────────────────────────────── */

.slide-in {
    animation: slideIn 0.8s ease-out;
}

.slide-down {
    animation: slideDown 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in {
    animation: fadeIn 0.7s ease-out;
}

.answer-stagger {
    animation: answerSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(90px);
    }

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-90px);
    }

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

@keyframes answerSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

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

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

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .take-quiz-container {
        padding: 1rem;
    }

    .quiz-join-card, .quiz-question-container, .quiz-complete {
        padding: 1.5rem;
    }

    .quiz-question-text h3 {
        font-size: 1.15rem;
    }

    .quiz-subheader .container,
    .quiz-subheader-preview .container {
        font-size: 0.95rem;
    }
}


/* ── Site Footer ──────────────────────────────────────────────── */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    .app-container > main {
        flex: 1;
    }

.site-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

    .site-footer a:hover {
        text-decoration: underline !important;
    }