/* ===============================
   DUNBLANE SOCCER CLUB THEME
   CHRISTMAS BONANZA EDITION
   Clean global styling
================================*/

/* ----- COLOUR BRANDING ----- */
:root {
    --dsc-navy: #0A1A4A;
    --dsc-blue: #0033A0;
    --dsc-red: #D71920;
    --dsc-gold: #FFD700;
    --dsc-white: #ffffff;
    --dsc-light: rgba(255,255,255,0.8);
}

/* ---------------- GLOBAL ---------------- */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: var(--dsc-navy);
    color: var(--dsc-white);
}


/* ---------------- HEADER ---------------- */
.header-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: var(--dsc-blue);
    border-bottom: 4px solid var(--dsc-red);
}

.header-bar img.logo {
    height: 55px;
    width: auto;
    margin-right: 15px;
}

.header-bar h1 {
    color: var(--dsc-white);
    font-size: 28px;
    margin: 0;
    text-shadow: 1px 1px 5px black;
}

/* ---------------- NAVIGATION ---------------- */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    background: var(--dsc-navy);
    border-bottom: 2px solid var(--dsc-red);
    padding: 10px 0;
}

.nav a {
    color: var(--dsc-light);
    text-decoration: none;
    padding: 8px 15px;
    font-size: 17px;
    border-radius: 6px;
    transition: 0.2s;
}

.nav a:hover {
    background: var(--dsc-blue);
    color: var(--dsc-white);
}

/* ---------------- CONTAINERS ---------------- */
.container {
    max-width: 1000px;
    margin: 25px auto;
    padding: 20px;
    background: rgba(0,0,0,0.7);
    border-radius: 12px;
    border: 2px solid var(--dsc-blue);
    box-shadow: 0 0 12px rgba(255,255,255,0.2);
}

/* Page titles */
.page-title {
    font-size: 26px;
    color: var(--dsc-gold);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 1px 1px 6px black;
}

/* Misc text */
.info-text,
.note {
    font-size: 14px;
    color: var(--dsc-light);
    margin: 10px 0;
}

/* ---------------- FORMS ---------------- */

.form-label {
    margin-top: 10px;
    font-weight: bold;
    display: block;
}

.text-input {
    width: 100%;
    max-width: 350px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    margin-bottom: 10px;
}

.score-input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* Submit button */
.btn,
.submit-btn,
.close-btn {
    background: var(--dsc-red);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
}

.btn:hover,
.submit-btn:hover,
.close-btn:hover {
    background: #b91518;
}

/* ---------------- TABLES ---------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th {
    background: var(--dsc-blue);
    color: white;
    padding: 10px;
    font-size: 17px;
}

td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

/* Leaderboard top 3 */
.first {
    background: rgba(255,215,0,0.3);
    animation: glow 2s infinite;
}
.second {
    background: rgba(192,192,192,0.3);
    animation: glow 2.5s infinite;
}
.third {
    background: rgba(205,127,50,0.3);
    animation: glow 3s infinite;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--dsc-gold); }
    50% { box-shadow: 0 0 15px var(--dsc-gold); }
    100% { box-shadow: 0 0 5px var(--dsc-gold); }
}

/* ---------------- MODAL ---------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal {
    background: var(--dsc-navy);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--dsc-gold);
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 25px rgba(255,215,0,0.5);
}

.modal-title {
    color: var(--dsc-gold);
    margin-top: 0;
}

.bank-box {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    margin: 10px 0;
}

.modal-info {
    font-size: 14px;
    color: var(--dsc-light);
}

/* ---------------- SNOW ---------------- */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 16px;
    animation: fall linear infinite;
    pointer-events: none;
}

@keyframes fall {
    0% { transform: translateY(-10px); }
    100% { transform: translateY(110vh); }
}

/* ---------------- MOBILE ---------------- */
@media (max-width: 600px) {

    .header-bar h1 {
        font-size: 20px;
    }

    th, td {
        font-size: 13px;
    }

    .container {
        padding: 15px;
    }

    .text-input {
        max-width: 100%;
    }

}
/* ---------------- PRIZE FUND BAR ---------------- */
.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--dsc-blue);
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.stat-box {
    min-width: 40%;
}

.stat-label {
    display: block;
    font-size: 16px;
    color: var(--dsc-light);
}

.stat-value {
    display: block;
    margin-top: 5px;
    font-size: 26px;
    font-weight: bold;
    color: var(--dsc-gold);
    text-shadow: 0px 0px 8px rgba(255,215,0,1);
}

/* Leaderboard table styling enhancement */
.leaderboard-table th {
    background: var(--dsc-blue);
    color: white;
    font-size: 18px;
}

.leaderboard-table td {
    font-size: 17px;
}
/* ADMIN LINK (top right) */
.admin-link {
    margin-left: auto;
}

.admin-link a {
    background: rgba(255,255,255,0.15);
    color: var(--dsc-white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.admin-link a:hover {
    background: var(--dsc-blue);
    color: white;
}
/* --- HEADER WRAPPER --- */
.site-header {
    background: #001b54; /* same dark blue as your theme */
    padding: 20px 0;
    border-bottom: 2px solid #e00000; /* your red line */
}

/* --- CONTAINER --- */
.header-inner {
    max-width: 900px;       /* matches your leaderboard width */
    margin: 0 auto;
    text-align: center;
}

/* --- LOGO --- */
.logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 6px;
}

/* --- NAVIGATION --- */
.nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 4px;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
}

.admin-link {
    color: #ff6666 !important;
}

/* --- MOBILE --- */
@media (max-width: 600px) {
    .logo img {
        width: 70px;
        height: 70px;
    }

    .nav a {
        font-size: 16px;
        padding: 6px 8px;
    }
}
/* Compact rules panel */
.rules-compact {
    margin-bottom: 15px;
}

.rules-compact details {
    background: rgba(0,0,0,0.45);
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

.rules-compact summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.rules-compact summary::-webkit-details-marker {
    display: none;
}

.rules-compact summary::after {
    content: " ▼";
    font-size: 12px;
}

.rules-compact details[open] summary::after {
    content: " ▲";
}

.rules-compact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: 14px;
}

.rules-compact-grid > div {
    flex: 1 1 220px;
}

.rules-compact h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
}

.rules-compact ul {
    margin: 0;
    padding-left: 18px;
}

.rules-compact p {
    margin: 0 0 4px 0;
}

.rules-example {
    font-style: italic;
    opacity: 0.9;
}

/* Make name fields sit on one line on desktop */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.form-field {
    flex: 1 1 200px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .rules-compact-grid {
        flex-direction: column;
    }
}
/* ----- 3 STEP SUMMARY SECTION ----- */
.steps-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 25px;
    background: rgba(0,0,0,0.35);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    flex-wrap: wrap;
}

.step-box {
    flex: 1 1 250px;
    background: rgba(255,255,255,0.06);
    padding: 15px 18px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.step-number {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    background: #ffd700;
    color: #000;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.step-box h3 {
    margin: 8px 0;
    font-size: 20px;
    color: #ffd700;
}

.step-box p {
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 700px) {
    .steps-wrapper {
        flex-direction: column;
    }
}
.broadcast-badge {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    background: #ffffff;
    color: #001a4d; /* navy blue text */
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.15);
    width: fit-content;
    opacity: 0.9;
}

.broadcast-badge:hover {
    opacity: 1;
}
/* Card-style fixture layout */
.fixture-card {
    padding: 10px 8px;
}

.teams-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-bottom: 6px;
    text-align: center;
}

.team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
}

.team-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
}

.team-score-input {
    width: 60px;
    text-align: center;
}

/* VS text in middle */
.vs-text {
    align-self: center;
    font-weight: 700;
    font-size: 16px;
    opacity: 0.8;
}

/* Meta row under teams (time + channel) */
.fixture-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

/* Time */
.kickoff-time {
    opacity: 0.85;
}

/* TV channel badge */
.broadcast-badge {
    display: inline-block;
    margin-top: 0;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    background: #ffffff;
    color: #001a4d;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.15);
    width: fit-content;
    opacity: 0.9;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .teams-row {
        flex-direction: column;
        gap: 6px;
    }

    .vs-text {
        font-size: 14px;
    }
}
/* Wildcard toggle button */
.wildcard-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffd700;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.wildcard-toggle:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.wildcard-toggle.active {
    background: #ffd700;
    color: #001845;
    box-shadow: 0 0 12px rgba(255,215,0,0.7);
}

/* Santa flyover */
#santa-flyover {
    position: fixed;
    top: 15%;
    left: -10%;
    font-size: 60px;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
}

#santa-flyover.fly {
    opacity: 1;
    animation: santaFly 1.8s linear forwards;
}

@keyframes santaFly {
    0% {
        transform: translateX(0) translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateX(60vw) translateY(-10px) rotate(3deg);
    }
    100% {
        transform: translateX(120vw) translateY(0) rotate(0deg);
        opacity: 0;
    }
}
/* iOS-style Wildcard toggle */
.wildcard-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.wildcard-label {
    font-size: 14px;
    color: #ffd700;
    font-weight: 600;
}

/* The slider background */
.wc-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: #666;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.25s;
}

/* The moving circle */
.wc-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

/* Active state */
.wc-switch.active {
    background: #34c759; /* iOS green */
}

.wc-switch.active .wc-slider {
    transform: translateX(22px);
}

/* Santa Flyover */
#santa-flyover {
    position: fixed;
    top: 18%;
    left: -15%;
    font-size: 70px;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
}

#santa-flyover.fly {
    opacity: 1;
    animation: santaFly 1.8s linear forwards;
}

@keyframes santaFly {
    0% { transform: translateX(0) rotate(-8deg); }
    50% { transform: translateX(60vw) rotate(5deg); }
    100% { transform: translateX(130vw); opacity: 0; }
}
/* Wildcard iOS-style toggle at bottom of each group */
.wildcard-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 5px 0;
}

.wildcard-label {
    font-size: 14px;
    color: #ffd700;
    font-weight: 600;
}

/* The slider background */
.wc-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: #666;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.25s;
}

/* The moving circle */
.wc-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

/* Active state */
.wc-switch.active {
    background: #34c759; /* iOS green */
}

.wc-switch.active .wc-slider {
    transform: translateX(22px);
}

/* Santa Flyover */
#santa-flyover {
    position: fixed;
    top: 18%;
    left: -15%;
    font-size: 70px;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
}

#santa-flyover.fly {
    opacity: 1;
    animation: santaFly 1.8s linear forwards;
}

@keyframes santaFly {
    0% { transform: translateX(0) rotate(-8deg); }
    50% { transform: translateX(60vw) rotate(5deg); }
    100% { transform: translateX(130vw); opacity: 0; }
}
/* Wildcard iOS-style toggle at bottom of each group */
.wildcard-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 5px 0;
}

.wildcard-label {
    font-size: 14px;
    color: #ffd700;
    font-weight: 600;
}

/* The slider background */
.wc-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: #666;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.25s;
}

/* The moving circle */
.wc-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

/* Active state */
.wc-switch.active {
    background: #34c759; /* iOS green */
}

.wc-switch.active .wc-slider {
    transform: translateX(22px);
}

/* Snow burst overlay container */
#snow-burst {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

/* Individual snowflakes */
.snowflake {
    position: absolute;
    top: 40vh; /* mid screen-ish */
    color: #fff;
    opacity: 0;
    animation-name: snowBurstFall;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes snowBurstFall {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    100% {
        transform: translateY(80px) translateX(var(--drift)) scale(0.9);
        opacity: 0;
    }
}
/* Fix name inputs layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-field {
    flex: 1; /* makes them equal half width */
}

.form-field .text-input {
    width: 100%;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}
