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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f2f2f2;
    min-height: 100vh;
    color: #333;
}

/* ========== HEADER ========== */
.top-header {
    background: #2d2d2d;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 32px;
}

.admin-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
}

.admin-btn:hover {
    background: rgba(255,255,255,0.2);
}

.admin-btn.logged-in {
    background: #4caf50;
}

/* ========== LOGIN OVERLAY ========== */
.login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-overlay.show {
    display: flex;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 24px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
}

.login-close:hover {
    color: #666;
}

.login-icon {
    margin-bottom: 12px;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #999;
    margin-bottom: 24px;
}

.pin-input-wrapper {
    margin-bottom: 8px;
}

.pin-input {
    width: 160px;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 12px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.pin-input:focus {
    border-color: #2d2d2d;
}

.pin-input.error {
    border-color: #e63946;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.login-error {
    font-size: 12px;
    color: #e63946;
    height: 18px;
    margin-bottom: 16px;
    visibility: hidden;
}

.login-error.show {
    visibility: visible;
}

.login-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #2d2d2d;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-submit:hover {
    background: #444;
}

/* ========== TAB NAVIGATIE ========== */
.tab-nav {
    background: #fff;
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-nav .tab {
    flex: 0 0 auto;
    padding: 14px 16px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}

.tab-nav .tab.active {
    color: #333;
}

.tab-nav .tab.admin-tab {
    color: #4caf50;
}

.tab-nav .tab.admin-tab.active {
    color: #4caf50;
}

.tab-nav .tab.admin-tab.active::after {
    background: #4caf50;
}

.tab-nav .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: #333;
    border-radius: 3px 3px 0 0;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px 100px;
}

/* ========== TAB CONTENT ========== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 20px 0 16px;
}

/* ========== WEDSTRIJD CARD ========== */
.match-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

body.admin-mode .match-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Empty state */
.match-empty {
    display: none;
    text-align: center;
    padding: 20px 10px;
}

.match-empty svg {
    color: #ccc;
    margin-bottom: 12px;
}

.match-empty p {
    font-size: 15px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.match-empty span {
    font-size: 12px;
    color: #aaa;
    display: none;
}

body.admin-mode .match-empty span {
    display: block;
}

.match-date {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.match-home-away {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #f0f0f0;
    padding: 2px 12px;
    border-radius: 12px;
    margin: 4px auto 16px;
    text-align: center;
}

.match-date + .match-home-away {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100px;
}

.team-badge {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.team-badge-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #bbb;
}

.team-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

.match-vs {
    font-size: 14px;
    font-weight: 700;
    color: #ccc;
    text-transform: uppercase;
}

.match-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.match-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.match-info-item svg {
    color: #999;
}

.match-info-item strong {
    color: #333;
}

/* ========== OPSTELLING - VELD ========== */
.field {
    background: #e8e4df;
    border-radius: 8px;
    position: relative;
    aspect-ratio: 10/14;
    overflow: hidden;
}

.field-lines {
    position: absolute;
    inset: 12px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
}

.center-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.12);
}

/* Doelen */
.goal-area {
    position: absolute;
    width: 26%;
    height: 4%;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid rgba(0, 0, 0, 0.12);
}

.goal-top {
    top: 0;
    border-top: none;
    border-radius: 0 0 3px 3px;
}

.goal-bottom {
    bottom: 0;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
}

/* Cirkel / 16 meter (D-vorm) */
.penalty-area {
    position: absolute;
    width: 70%;
    aspect-ratio: 2 / 1;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid rgba(0, 0, 0, 0.12);
}

.penalty-top {
    top: 0;
    border-top: none;
    border-radius: 0 0 50% 50%;
}

.penalty-bottom {
    bottom: 0;
    border-bottom: none;
    border-radius: 50% 50% 0 0;
}

/* Verberg center-circle (niet nodig bij hockey) */
.center-circle {
    display: none;
}

/* Spelers op veld */
.players {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 8px;
    z-index: 1;
}

.player-row {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.player-row.attack {
    padding-top: 18px;
}

.player-row.goalkeeper {
    padding-bottom: 8px;
}

.player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 68px;
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #666;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-avatar.captain {
    border-color: #ffd700;
}

.player-label {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    padding: 3px 7px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 80px;
}

.player-number {
    font-size: 10px;
    font-weight: 700;
    color: #e63946;
}

.player-name {
    font-size: 10px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Wissels */
.substitutes {
    margin-top: 16px;
    background: #fff;
    border-radius: 10px;
    padding: 14px;
}

.substitutes h3 {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.subs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-player {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 18px;
}

.sub-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 9px;
    color: #666;
    overflow: hidden;
}

.sub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-label {
    display: flex;
    align-items: center;
    gap: 3px;
}

.sub-number {
    font-size: 10px;
    font-weight: 700;
    color: #e63946;
}

.sub-name {
    font-size: 11px;
    color: #333;
    font-weight: 500;
}

/* ========== SEGMENT CONTROL (herbruikbaar) ========== */
.segment-control {
    display: flex;
    gap: 0;
    padding: 3px;
    background: #e8e8e8;
    border-radius: 10px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.segment-control .segment {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    font-weight: 600;
    transition: all 0.2s;
}

.segment-control .segment.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ========== RANGLIJST ========== */

/* Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    padding: 20px 0 30px;
}

.podium-place.second { animation: podiumRise 0.5s ease-out 0.1s both; }
.podium-place.first  { animation: podiumRise 0.5s ease-out 0.2s both; }
.podium-place.third  { animation: podiumRise 0.5s ease-out 0.3s both; }

@keyframes podiumRise {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #666;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 8px;
    border: 4px solid #e0e0e0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podium-place.first {
    position: relative;
}

.podium-place.first .crown-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
    color: #ffd700;
    animation: crownBounce 0.6s ease-out 0.4s both;
}

@keyframes crownBounce {
    0% { opacity: 0; transform: scale(0) rotate(-15deg); }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.podium-place.first .avatar {
    width: 74px;
    height: 74px;
    font-size: 1.5rem;
    border-width: 5px;
    border-color: #ffd700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.podium-place.second .avatar {
    border-width: 4px;
    border-color: #c0c0c0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.podium-place.third .avatar {
    border-width: 4px;
    border-color: #cd7f32;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.podium-block {
    width: 100%;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.podium-place.first .podium-block {
    height: 80px;
    font-size: 2rem;
    background: linear-gradient(135deg, #f5d020, #f5ab20, #ffd700);
}

.podium-place.second .podium-block {
    height: 58px;
    background: linear-gradient(135deg, #d4d4d4, #a8a8a8, #c0c0c0);
}

.podium-place.third .podium-block {
    height: 40px;
    background: linear-gradient(135deg, #e8a050, #b87333, #cd7f32);
}

.podium-name {
    font-weight: 700;
    color: #333;
    margin-top: 6px;
    font-size: 0.88rem;
    text-align: center;
}

.podium-stat {
    color: #777;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Leaderboard lijst */
.leaderboard-list {
    background: #fff;
    border-radius: 12px;
    padding: 4px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.list-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-rank {
    width: 26px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #bbb;
}

.list-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    margin-right: 10px;
    font-size: 0.8rem;
    overflow: hidden;
    flex-shrink: 0;
}

.list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-info {
    flex: 1;
    min-width: 0;
}

.list-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-name .captain {
    color: #ffd700;
    font-weight: normal;
    font-size: 0.8em;
}

.list-stat {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

/* ========== MATCH REPORT MODAL ========== */
.report-modal {
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.report-header {
    text-align: center;
    margin-bottom: 16px;
}

.report-date {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-vs {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.report-vs strong {
    color: #333;
}

.report-score-section {
    text-align: center;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.report-score-big {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    display: block;
}

.report-result {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 8px;
}

.report-result.win {
    background: #e8f5e9;
    color: #4caf50;
}

.report-result.loss {
    background: #ffebee;
    color: #e63946;
}

.report-result.draw {
    background: #fff3e0;
    color: #ff9800;
}

.report-section {
    margin-bottom: 20px;
}

.report-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.report-player-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 8px 10px;
    border-radius: 8px;
    width: calc(50% - 4px);
}

.report-player-item.active {
    background: #e8f5e9;
}

.report-player-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.report-player-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-btn.minus {
    background: #e0e0e0;
    color: #666;
}

.report-btn.plus {
    background: #2d2d2d;
    color: #fff;
}

.report-player-count {
    font-size: 13px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.report-total {
    margin-top: 12px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

.report-total strong {
    color: #333;
}

.report-player-chip {
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.report-player-chip:hover {
    background: #e8e8e8;
}

.report-player-chip.active {
    background: #2d2d2d;
    color: #fff;
}

.report-empty {
    font-size: 13px;
    color: #999;
    text-align: center;
    padding: 12px;
}

/* ========== DIENSTEN ========== */
.diensten-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.diensten-header .section-title {
    padding-right: 10px;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    background: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s;
}

.sort-btn:hover {
    background: #eee;
}

.sort-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s;
}

.sort-icon.asc {
    transform: rotate(180deg);
}

.diensten-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dienst-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.dienst-row:last-child {
    border-bottom: none;
}

.dienst-rank {
    width: 24px;
    font-size: 13px;
    font-weight: 600;
    color: #bbb;
    flex-shrink: 0;
}

.dienst-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: #666;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 10px;
}

.dienst-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dienst-player-name {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dienst-total {
    font-size: 14px;
    font-weight: 700;
    color: #2d2d2d;
    min-width: 24px;
    text-align: right;
    margin-left: 6px;
    flex-shrink: 0;
}

/* Footer link */
.diensten-footer {
    margin-top: 20px;
}

.dienst-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: background 0.2s;
}

.dienst-link:hover {
    background: #f5f5f5;
}

.dienst-link-icon {
    font-size: 18px;
    color: #999;
}

/* ========== SELECTIE LIJST ========== */
.selectie-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.add-player-btn {
    padding: 8px 14px;
    border: none;
    background: #4caf50;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-player-btn:hover {
    background: #43a047;
}

.selectie-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.selectie-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
}

.selectie-row:hover {
    background: #f9f9f9;
}

.selectie-row:last-child {
    border-bottom: none;
}

.selectie-nummer {
    width: 32px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2d2d;
    flex-shrink: 0;
}

.selectie-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #666;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
}

.selectie-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selectie-name {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
    color: #333;
}

.selectie-name .captain {
    color: #ffd700;
    font-size: 0.8em;
    font-weight: normal;
}

.selectie-edit {
    color: #bbb;
    flex-shrink: 0;
}

.selectie-row:hover .selectie-edit {
    color: #666;
}

/* ========== PLAYER MODAL ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 340px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
}

.modal-close:hover {
    color: #666;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.modal-field {
    margin-bottom: 16px;
}

.modal-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.modal-field input:focus {
    border-color: #2d2d2d;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-btn.save {
    background: #2d2d2d;
    color: #fff;
}

.modal-btn.save:hover {
    background: #444;
}

.modal-btn.delete {
    background: #fee;
    color: #e63946;
}

.modal-btn.delete:hover {
    background: #fdd;
}

/* ========== ADMIN EDIT KNOPPEN ========== */
.edit-btns {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.edit-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 7px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
}

.edit-btn.minus {
    background: #f0f0f0;
    color: #999;
}

.edit-btn.minus:hover {
    background: #fee;
    color: #e63946;
}

.edit-btn.plus {
    background: #2d2d2d;
    color: #fff;
}

.edit-btn.plus:hover {
    background: #444;
}

/* Podium edit knoppen */
.podium-stat .edit-btns {
    display: flex;
    justify-content: center;
    margin-left: 0;
    margin-top: 4px;
}

/* Lege state */
.empty {
    text-align: center;
    color: #bbb;
    padding: 30px 20px;
    font-size: 14px;
}

/* ========== DRAG & DROP ========== */

/* Admin mode cursors */
body.admin-mode .player[data-player-id] {
    cursor: grab;
}

body.admin-mode .sub-player[data-player-id] {
    cursor: grab;
}

/* Dragging source wordt transparant */
.dragging {
    opacity: 0.3 !important;
}

/* Ghost element */
.drag-ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.drag-ghost .player-avatar,
.drag-ghost .sub-avatar {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.drag-ghost-sub {
    flex-direction: row;
    gap: 6px;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Drop zone highlighting during drag */
body.drag-active .player {
    outline: 2px dashed rgba(0, 0, 0, 0.15);
    outline-offset: 4px;
    border-radius: 8px;
}

body.drag-active .substitutes {
    outline: 2px dashed rgba(0, 0, 0, 0.15);
    outline-offset: 2px;
}

/* Lege positie styling */
.player-empty {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.3);
}

body.admin-mode .player-empty {
    cursor: default;
}

/* Prevent text selection during drag */
body.drag-active {
    user-select: none;
    -webkit-user-select: none;
}

/* Touch action voor mobiel */
body.admin-mode .player[data-player-id],
body.admin-mode .sub-player[data-player-id] {
    touch-action: none;
}

/* ========== RESPONSIVE: KLEINE TELEFOONS ========== */
@media (max-width: 374px) {
    /* Veldspelers */
    .player {
        min-width: 56px;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
        font-size: 11px;
    }

    .player-label {
        padding: 2px 5px;
        max-width: 64px;
    }

    .player-number,
    .player-name {
        font-size: 9px;
    }

    .player-empty {
        width: 40px;
        height: 40px;
    }

    .players {
        padding: 16px 4px;
    }

    /* Podium */
    .podium-place {
        width: 80px;
    }

    .avatar {
        width: 48px;
        height: 48px;
        font-size: 0.9rem;
    }

    .podium-place.first .avatar {
        width: 62px;
        height: 62px;
        font-size: 1.2rem;
    }

    .podium-place.first .podium-block {
        height: 65px;
        font-size: 1.6rem;
    }

    .podium-place.second .podium-block {
        height: 48px;
    }

    .podium-place.third .podium-block {
        height: 34px;
    }

    .podium-name {
        font-size: 0.78rem;
    }

    .podium-stat {
        font-size: 0.72rem;
    }

    /* Tab navigatie */
    .tab-nav .tab {
        padding: 12px 12px;
        font-size: 11px;
    }

    /* Container */
    .container {
        padding: 0 10px 80px;
    }

}

/* ========== RESPONSIVE: TABLETS ========== */
@media (min-width: 768px) {
    /* Container */
    .container {
        max-width: 700px;
    }

    /* Podium */
    .podium {
        gap: 16px;
        padding: 28px 0 36px;
    }

    .podium-place {
        width: 120px;
    }

    .avatar {
        width: 66px;
        height: 66px;
        font-size: 1.2rem;
    }

    .podium-place.first .avatar {
        width: 86px;
        height: 86px;
        font-size: 1.7rem;
    }

    .podium-place.first .podium-block {
        height: 90px;
    }

    .podium-place.second .podium-block {
        height: 66px;
    }

    .podium-place.third .podium-block {
        height: 48px;
    }

    .podium-name {
        font-size: 0.95rem;
    }

    /* Match card */
    .match-card {
        padding: 28px;
    }

    .match-teams {
        gap: 24px;
    }

    .match-team {
        width: 120px;
    }

    .team-badge,
    .team-badge-placeholder {
        width: 64px;
        height: 64px;
    }

    /* Modals */
    .modal-card {
        max-width: 400px;
    }

    .login-card {
        max-width: 380px;
    }

    /* Leaderboard */
    .list-item {
        padding: 12px 20px;
    }
}

/* ========== RESPONSIVE: GROTE SCHERMEN ========== */
@media (min-width: 1024px) {
    /* Container */
    .container {
        max-width: 800px;
    }

    /* Tab navigatie gecentreerd */
    .tab-nav {
        justify-content: center;
    }

    .tab-nav .tab {
        padding: 14px 24px;
    }
}
