/* Record Stats - Grid Layouts */

/* Map name cell */
.cell-map {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Date + "x years ago" stacked */
.cell-date-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.cell-date {
    font-size: 0.8rem;
}

.cell-ago {
    font-size: 0.65rem;
    color: #999;
}

/* Oldest Current WRs grid */
.oldest-wr-grid {
    grid-template-columns: 1fr 1fr 100px;
    gap: 8px;
}

.oldest-wr-grid > :nth-child(1) { text-align: left; }
.oldest-wr-grid > :nth-child(2) { text-align: left; }
.oldest-wr-grid > :nth-child(3) { text-align: center; }

/* Longest Standing WRs grid */
.longest-wr-grid {
    grid-template-columns: 1fr 1fr 100px;
    gap: 8px;
}

.longest-wr-grid > :nth-child(1) { text-align: left; }
.longest-wr-grid > :nth-child(2) { text-align: left; }
.longest-wr-grid > :nth-child(3) { text-align: center; }

/* Competitive Maps grid (shared by most & least) */
.competitive-grid {
    grid-template-columns: 1fr 60px 80px;
    gap: 8px;
}

.competitive-grid > :nth-child(1) { text-align: left; }
.competitive-grid > :nth-child(2) { text-align: center; }
.competitive-grid > :nth-child(3) { text-align: center; }

/* Biggest Deltas grid */
.delta-grid {
    grid-template-columns: 1fr 1fr 90px;
    gap: 8px;
}

.delta-grid > :nth-child(1) { text-align: left; }
.delta-grid > :nth-child(2) { text-align: left; }
.delta-grid > :nth-child(3) { text-align: center; }

/* Most Dominated Maps grid */
.dominated-grid {
    grid-template-columns: 1fr 1fr 90px;
    gap: 8px;
}

.dominated-grid > :nth-child(1) { text-align: left; }
.dominated-grid > :nth-child(2) { text-align: left; }
.dominated-grid > :nth-child(3) { text-align: center; }

/* Most Consecutive WRs grid */
.consecutive-grid {
    grid-template-columns: 1fr 1fr 70px;
    gap: 8px;
}

.consecutive-grid > :nth-child(1) { text-align: left; }
.consecutive-grid > :nth-child(2) { text-align: left; }
.consecutive-grid > :nth-child(3) { text-align: center; }

/* Longest Reigns grid */
.reign-grid {
    grid-template-columns: 1fr 1fr 100px;
    gap: 8px;
}

.reign-grid > :nth-child(1) { text-align: left; }
.reign-grid > :nth-child(2) { text-align: left; }
.reign-grid > :nth-child(3) { text-align: center; }

/* Still standing (unbeaten) records */
.still-standing .cell-value-highlight {
    color: #4caf50;
}

.still-standing-arrow {
    font-size: 0.7em;
    margin-left: 3px;
    display: inline-block;
    animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Single centered panel */
.stats-single-panel {
    max-width: 700px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .oldest-wr-grid,
    .longest-wr-grid,
    .reign-grid {
        grid-template-columns: 1fr 1fr 80px;
        gap: 4px;
    }

    .competitive-grid {
        grid-template-columns: 1fr 50px 60px;
        gap: 4px;
    }

    .delta-grid,
    .dominated-grid,
    .consecutive-grid {
        grid-template-columns: 1fr 1fr 70px;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .oldest-wr-grid,
    .longest-wr-grid,
    .reign-grid {
        grid-template-columns: 1fr 1fr 65px;
    }

    .competitive-grid {
        grid-template-columns: 1fr 45px 50px;
    }

    .delta-grid,
    .dominated-grid,
    .consecutive-grid {
        grid-template-columns: 1fr 1fr 60px;
    }
}
