﻿/* ==========================================
   RESEÑAS — FICHA DE JUEGO (juego.html)
   ========================================== */

.game-detail-section .reviews-section {
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
    padding: 0 1rem;
}

.game-detail-section .reviews-content.show {
    padding: 1.25rem 0 0.75rem;
}

/* --- Resumen (promedio + barras) --- */
.game-detail-section .reviews-section .reviews-grid {
    display: grid;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 2rem 3rem;
    align-items: center;
    max-width: min(960px, 100%);
    width: 100%;
    margin: 0 auto 2rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.game-detail-section .reviews-average {
    padding-right: 0.5rem;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.game-detail-section .average-score {
    font-size: clamp(2.5rem, 4vw, 3.25rem);
    line-height: 1;
    margin-bottom: 0.65rem;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.game-detail-section .total-reviews {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Estrellas del resumen (debajo del puntaje): glow suave, solo en reviews-grid */
.game-detail-section .reviews-section .reviews-grid .reviews-average .stars-rating--summary-glow {
    --star-size: 1.4rem;
    --star-color: #fcd34d;
}

.game-detail-section .reviews-section .reviews-grid .reviews-average .stars-rating--summary-glow .stars-rating-fill {
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.75)) drop-shadow(0 0 14px rgba(251, 191, 36, 0.35));
}

.game-detail-section .reviews-section .reviews-grid .reviews-average .stars-rating--summary-glow .stars-rating-bg .star-svg path {
    stroke: rgba(251, 191, 36, 0.22);
}

.game-detail-section .reviews-distribution {
    gap: 0.65rem;
}

.game-detail-section .rating-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: auto;
    min-width: 2rem;
}

.game-detail-section .rating-label .fa-star {
    font-size: 0.7rem;
    color: #fcd34d;
}

.game-detail-section .rating-progress {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.game-detail-section .rating-fill {
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
}

/* --- Grid de tarjetas --- */
.game-detail-section #reviews-list-container {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    max-width: min(1760px, 100%);
    margin: 0 auto;
    padding: 0;
    align-items: stretch;
}

.game-detail-section #reviews-list-container .review-card {
    flex: 0 1 100% !important;
    max-width: 100% !important;
}

@media (min-width: 640px) {
    .game-detail-section #reviews-list-container {
        gap: 1.35rem;
    }

    .game-detail-section #reviews-list-container .review-card {
        flex: 0 1 calc((100% - 1.35rem) / 2) !important;
        max-width: calc((100% - 1.35rem) / 2) !important;
    }
}

@media (min-width: 1280px) {
    .game-detail-section #reviews-list-container {
        gap: 1.5rem;
    }

    .game-detail-section #reviews-list-container .review-card {
        flex: 0 1 calc((100% - 1.5rem) / 2) !important;
        max-width: calc((100% - 1.5rem) / 2) !important;
    }

    .game-detail-section .reviews-section .reviews-grid {
        max-width: min(1040px, 100%);
    }
}

@media (min-width: 1536px) {
    .game-detail-section #reviews-list-container .review-card {
        flex: 0 1 calc((100% - 2 * 1.5rem) / 3) !important;
        max-width: calc((100% - 2 * 1.5rem) / 3) !important;
    }
}

@media (min-width: 1920px) {
    .game-detail-section #reviews-list-container {
        gap: 1.65rem;
    }

    .game-detail-section #reviews-list-container .review-card {
        flex: 0 1 calc((100% - 3 * 1.65rem) / 4) !important;
        max-width: calc((100% - 3 * 1.65rem) / 4) !important;
    }

    .game-detail-section .review-card__header {
        margin-bottom: 1.55rem;
    }

    .game-detail-section .review-title {
        margin-top: 0.35rem;
        margin-bottom: 1.1rem;
    }
}

/* --- Tarjeta individual --- */
.game-detail-section .review-card {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 0;
    margin: 0;
    padding: 1.25rem;
    background: linear-gradient(160deg, rgba(42, 52, 65, 0.98), rgba(30, 38, 50, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.game-detail-section .review-card:hover {
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.35);
}

.game-detail-section .review-card.review-card-expanded {
    height: auto;
    overflow: visible;
}

.game-detail-section .review-card__header {
    margin-bottom: 1.2rem;
    flex-shrink: 0;
}

.game-detail-section .review-profile {
    align-items: center;
    gap: 0.85rem;
}

.game-detail-section .review-profile .profile-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.game-detail-section .review-user-info {
    gap: 0.15rem;
    min-width: 0;
}

.game-detail-section .review-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.game-detail-section .review-date {
    font-size: 0.8rem;
    opacity: 0.85;
}

.game-detail-section .review-stars .stars-rating-inline {
    --star-size: 0.88rem;
}

.game-detail-section .review-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.game-detail-section .review-title {
    margin: 0.2rem 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #f1f5f9;
}

.game-detail-section .review-text-block {
    flex: 1 1 auto;
    min-height: 0;
}

.game-detail-section .review-text {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.92);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-detail-section .review-text.review-text-expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
}

.game-detail-section .review-text-actions {
    margin-top: 0.5rem;
}

.game-detail-section .review-card .btn-ver-mas-texto {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.game-detail-section .review-card .btn-ver-mas-texto:hover {
    background: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.45);
}

/* --- GalerÃ­a de imÃ¡genes --- */
.game-detail-section .review-card__gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.85rem;
    flex-shrink: 0;
}

.game-detail-section .review-card__gallery-thumb {
    display: block;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-detail-section .review-card__gallery-thumb:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.game-detail-section .review-card__gallery-thumb img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
}

.game-detail-section .review-card__gallery--multi .review-card__gallery-thumb img {
    width: 64px;
    height: 64px;
}

/* --- Cargar mÃ¡s reseÃ±as --- */
.game-detail-section .reviews-load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 1.5rem auto 0.5rem;
    max-width: min(1760px, 100%);
}

.game-detail-section .reviews-load-more-wrap[hidden] {
    display: none !important;
}

.game-detail-section .reviews-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 160px;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #e0f2fe;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(37, 99, 235, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.game-detail-section .reviews-load-more-btn:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(37, 99, 235, 0.32));
    border-color: rgba(125, 211, 252, 0.55);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.game-detail-section .reviews-load-more-btn:active {
    transform: translateY(0);
}

/* --- Dejar reseÃ±a (alinear con el grid) --- */
.game-detail-section .leave-review-section {
    max-width: min(1760px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

/* --- Responsive resumen --- */
@media (max-width: 768px) {
    .game-detail-section .reviews-section {
        padding: 0 0.5rem;
    }

    .game-detail-section .reviews-section .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.35rem 1.15rem;
    }

    .game-detail-section .reviews-average {
        border-right: none;
        padding-right: 0;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .game-detail-section .reviews-distribution {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .game-detail-section .review-card {
        padding: 1rem;
    }

    .game-detail-section .review-card__gallery-thumb img {
        width: 64px;
        height: 64px;
    }
}

