/* ===========================
   Results Page Styles
   =========================== */

.results-section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 140px 24px 40px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.results-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 4rem);
    background: linear-gradient(135deg, var(--pink-200), var(--pink-400), var(--rose-gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
    margin-bottom: 32px;
}

/* Loading */
.results-loading {
    padding: 60px 0;
}

.loading-heart {
    width: 60px;
    height: 55px;
    fill: var(--pink-500);
    animation: pulseHeart 1s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255,107,138,0.5));
    margin-bottom: 16px;
}

.results-loading p {
    color: var(--pink-300);
    font-weight: 300;
}

/* Waiting */
.results-waiting {
    padding: 60px 0;
    text-align: center;
}

.waiting-heart {
    width: 60px;
    height: 55px;
    fill: var(--pink-400);
    opacity: 0.5;
    animation: pulseHeart 2s ease-in-out infinite;
    margin-bottom: 20px;
}

.results-waiting h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--pink-300);
    margin-bottom: 12px;
}

.results-waiting p {
    font-weight: 300;
    color: var(--pink-200);
    max-width: 400px;
    margin: 0 auto 24px;
}

.result-quiz-link {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink-600), var(--pink-700));
    color: var(--pink-100);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(232,69,120,0.3);
}

.result-quiz-link:hover {
    transform: translateY(-2px);
}

/* =============================
   HEART SCORE
   ============================= */
.heart-score-container {
    margin-bottom: 60px;
}

.heart-score {
    position: relative;
    width: 220px;
    height: 200px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-heart-bg,
.score-heart-fill {
    position: absolute;
    width: 100%;
    height: 100%;
}

.score-heart-fill path {
    filter: drop-shadow(0 0 8px rgba(255,107,138,0.5));
    transition: stroke-dasharray 2s ease-out;
}

.score-percent {
    position: relative;
    z-index: 2;
    font-family: var(--font-body);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pink-100);
    text-shadow: 0 0 20px rgba(255,107,138,0.4);
}

.score-label {
    display: block;
    width: 100%;
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--pink-400);
    margin-bottom: 12px;
    margin-top: 12px;
}

.score-message {
    display: block;
    font-weight: 300;
    font-size: 1rem;
    color: var(--pink-200);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =============================
   CATEGORY BREAKDOWN
   ============================= */
.results-breakdown {
    margin-bottom: 48px;
}

.breakdown-title,
.details-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--pink-300);
    margin-bottom: 24px;
}

.category-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-label {
    min-width: 140px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--pink-200);
}

.category-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.category-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pink-600), var(--pink-400));
    transition: width 1.5s ease-out;
}

.category-percent {
    min-width: 40px;
    font-size: 0.85rem;
    color: var(--pink-400);
    font-weight: 600;
}

/* =============================
   QUESTION DETAILS
   ============================= */
.results-details {
    margin-bottom: 48px;
    text-align: left;
}

.detail-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 12px;
    backdrop-filter: blur(8px);
}

.detail-item.match {
    border-color: rgba(201,24,74,0.4);
    background: rgba(201,24,74,0.08);
}

.detail-question {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pink-100);
    margin-bottom: 10px;
}

.detail-answers {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-answer {
    font-size: 0.82rem;
    color: var(--pink-200);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,143,171,0.1);
}

.detail-answer.is-match {
    background: rgba(201,24,74,0.2);
    border-color: var(--pink-600);
}

.detail-match-icon {
    font-size: 0.8rem;
    margin-left: 4px;
}

/* =============================
   WORDLE SCORES (inline)
   ============================= */
.wordle-scores-section {
    margin-top: 48px;
    margin-bottom: 40px;
}

.wordle-h2h {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.wordle-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px 28px;
    backdrop-filter: blur(16px);
    min-width: 200px;
    flex: 1;
    max-width: 260px;
    text-align: left;
}

.wordle-card-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--pink-300);
    margin-bottom: 14px;
    text-align: center;
}

.wordle-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.85rem;
    color: var(--pink-200);
}

.wordle-stat:last-child { border-bottom: none; }

.wordle-stat span:last-child {
    font-weight: 600;
    color: var(--pink-100);
}

.wordle-stat.highlight span:last-child {
    color: var(--pink-400);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 500px) {
    .category-label {
        min-width: 100px;
        font-size: 0.75rem;
    }

    .detail-answers {
        flex-direction: column;
        gap: 8px;
    }

    .heart-score {
        width: 180px;
        height: 165px;
    }

    .score-percent {
        font-size: 2rem;
    }

    .wordle-h2h { flex-direction: column; align-items: center; }
    .wordle-card { min-width: 100%; max-width: 100%; }
}
