/* =========================================
   KLEUREN & ACCENT
========================================= */
:root {
    --accent: #FFD54F; /* Premium goud */
    --blue-dark: #003366;
    --blue-mid: #0056B3;
    --blue-light: #A7D8FF;
}

/* =========================================
   ACHTERGROND + OVERLAY (CINEMATIC)
========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;

    background-image: linear-gradient(
        rgba(0,0,0,0.78),
        rgba(0,0,0,0.78)
    ), url('/afbeelding/padelkooi2.jpg');

    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    color: white;
    overflow-x: hidden;
}

/* =========================================
   TERUGKNOP LINKS BOVEN
========================================= */
.back-wrapper {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 50;
}

.back-btn {
    display: inline-block;
    padding: 10px 22px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    color: white;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: 0.25s ease;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(255,255,255,0.45);
}

/* =========================================
   HEADER BAR (CINEMATIC)
========================================= */
.header-bar {
    width: 100%;
    padding: 25px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    color: white;
    text-shadow: 0 5px 20px rgba(0,0,0,0.7);
    font-size: 40px;
    font-weight: 900;

    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 30px;
}

/* =========================================
   BLOKKEN (DARK GLASS)
========================================= */
.block {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(14px);
    padding: 25px;
    margin: 30px auto;
    width: min(90%, 1000px);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.55);
    border-left: 6px solid var(--accent);
    color: white;
}

/* =========================================
   COUNTER TILES (CINEMATIC)
========================================= */
.counter-wrapper {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.counter-tile {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.55);
    border: 3px solid var(--accent);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: white;
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    transition: 0.25s ease;
}

.counter-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.75);
}

.counter-tile span {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 6px;
}

/* =========================================
   MATCHCENTER GRID
========================================= */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
}

/* =========================================
   MATCHCARD (CINEMATIC)
========================================= */
.match-card {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 20px;
    border-left: 6px solid var(--accent);

    box-shadow: 0 10px 35px rgba(0,0,0,0.55);
    transition: 0.25s ease;
    color: white;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.75);
}

/* =========================================
   MATCH HEADER
========================================= */
.match-header {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
}

/* =========================================
   TEAM ROWS
========================================= */
.match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    transition: opacity 0.2s ease;
}

.match-team {
    font-size: 16px;
    color: white;
    font-weight: 600;
}

.total-sets {
    width: 25px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

/* Winner effects */
.match-card.has-winner .match-row:not(.winner) {
    opacity: 0.45;
}

.match-row.winner .match-team {
    color: var(--accent) !important;
    font-weight: 800 !important;
}

.match-row.winner .total-sets {
    color: var(--accent) !important;
    font-weight: 900 !important;
}

/* =========================================
   SPELERSRANGLIJST (DARK MODE)
========================================= */
#spelers table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 16px;
}

#spelers th {
    background: rgba(0,0,0,0.55);
    color: white;
    padding: 12px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    font-size: 15px;
}

#spelers th:first-child {
    text-align: left;
}

#spelers td {
    padding: 12px 10px;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    color: white;
}

#spelers td:first-child {
    text-align: left;
}

#spelers tr:nth-child(even) td {
    background: rgba(0,0,0,0.45);
}

.player-name {
    font-weight: 700;
    color: var(--accent);
}

.badge {
    background: var(--accent);
    color: var(--blue-dark);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 600;
}

/* =========================================
   TEAMSTAND (DARK MODE)
========================================= */
#stand table {
    width: 100%;
    border-collapse: collapse;
    font-size: 17px;
}

#stand th {
    background: rgba(0,0,0,0.55);
    color: white;
    padding: 12px;
    text-align: center;
    border-radius: 6px 6px 0 0;
}

#stand th:first-child {
    text-align: left;
}

#stand td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    color: white;
}

#stand td:first-child {
    text-align: left;
}

#stand tr:nth-child(even) {
    background: rgba(0,0,0,0.45);
}

/* =========================================
   FOOTER
========================================= */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    margin-top: 40px;
}

/* =========================================
   RESPONSIVE FIXES
========================================= */
@media (max-width: 480px) {
    .counter-tile {
        width: 120px;
        height: 120px;
        font-size: 16px;
    }

    .counter-tile span {
        font-size: 32px;
    }

    .match-card {
        padding: 15px;
    }

    .match-team {
        font-size: 14px;
    }

    .total-sets {
        font-size: 16px;
    }
}
