/* Zirkus Sarminelli - Display Mode (Portrait Pi Kiosk) */
/* GPU-optimized, no animations, big text for distance readability */

:root {
    --cream: #F5E6D3;
    --red: #D83C3E;
    --navy: #1C2A3A;
    --gold: #D4AF37;
    --white: #FFFFFF;
}

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

html, body {
    height: 100vh;
    overflow: hidden;
    cursor: none;
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--cream);
}

::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Container */
.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 30px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 15px 0;
}

.title {
    font-size: 6rem;
    font-weight: bold;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 10px;
    text-shadow: 2px 2px 0px var(--red);
    line-height: 1.2;
}

/* Decorative border */
.decorative-border {
    height: 16px;
    background: repeating-linear-gradient(
        90deg,
        var(--red) 0px,
        var(--red) 30px,
        var(--white) 30px,
        var(--white) 60px
    );
    margin: 12px 0;
}

/* Leaderboard card */
.leaderboard {
    background: var(--white);
    border: 6px solid var(--navy);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Tables */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.leaderboard-table thead th {
    background: var(--navy);
    color: var(--cream);
    padding: 16px 20px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    border: none;
}

.leaderboard-table thead th:first-child {
    border-radius: 8px 0 0 8px;
}

.leaderboard-table thead th:last-child {
    border-radius: 0 8px 8px 0;
}

.leaderboard-table tbody tr {
    background: var(--cream);
}

.leaderboard-table tbody td {
    padding: 18px 20px;
    font-size: 3.5rem;
    border: none;
}

.leaderboard-table tbody tr td:first-child {
    border-radius: 8px 0 0 8px;
}

.leaderboard-table tbody tr td:last-child {
    border-radius: 0 8px 8px 0;
}

/* Rank column */
.rank {
    font-weight: bold;
    color: var(--navy);
    text-align: center;
    width: 100px;
    font-size: 4rem;
}

.rank-medal {
    font-size: 5rem;
}

/* Group name */
.group-name {
    color: var(--navy);
    font-weight: bold;
    padding-left: 24px !important;
}

/* Shots count */
.shots {
    text-align: right;
    color: var(--red);
    font-weight: bold;
    font-size: 4rem;
    padding-right: 24px !important;
}

/* Top 3 podium colors (flat, no gradients) */
#leaderboard-static tbody tr:nth-child(1) {
    background: #FFD700;
}

#leaderboard-static tbody tr:nth-child(2) {
    background: #C0C0C0;
}

#leaderboard-static tbody tr:nth-child(3) {
    background: #CD7F32;
}

/* Scroll container for positions 4+ */
.scroll-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.scroll-inner {
    will-change: transform;
    transform: translateY(0);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 60px;
    font-size: 3rem;
    color: var(--navy);
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Image overlay for interstitial */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-in-out;
    z-index: 100;
    will-change: opacity;
}

.image-overlay.visible {
    opacity: 1;
}

.image-overlay img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}
