@font-face {
    font-family: 'Club';
    src: url('/static/fonts/club.eot') format('embedded-opentype'),
         url('/static/fonts/club.woff2') format('woff2'),
         url('/static/fonts/club.woff') format('woff'),
         url('/static/fonts/club.ttf') format('truetype'),
         url('/static/fonts/club.svg') format('svg');
}
@font-face {
    font-family: 'Seg';
    src: url('/static/fonts/seg.woff2') format('woff2'),
         url('/static/fonts/seg.woff') format('woff'),
         url('/static/fonts/seg.ttf') format('truetype')
}

:root {
    --bccblue: #24354F;
    --bccgold: #BA9128;
    /* Core brand extension colors */
    --bccnavy: #1A2638;        /* Darker blue */
    --bcclightblue: #4A6285;   /* Lighter blue */
    --bccdarkgold: #8B6B1E;    /* Darker gold */
    --bcclightgold: #D4B05C;   /* Lighter gold */

    /* Complementary accent colors */
    --bccslate: #5F6B7A;       /* Neutral slate */
    --bccstone: #E5E7EA;       /* Light neutral */
    --bccrust: #A65D21;        /* Warm accent */
    --bccsage: #687A61;        /* Muted green */
    /* others */
    --bccdarkgrey: #404756;
    --bcclightgrey: #a4abbd;
    --bccyellow: #f9f871;
    --bccteal: #00c6bb;
    --bccbeige: #fff7d6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Club, sans-serif, Verdana, Geneva, Tahoma;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure body takes full viewport */
body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}
thead {
    background-color: var(--bccgold);
    color: var(var(--bccblue));
}
th {
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
td {
    padding: 1rem;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.95rem;
}
tr:nth-child(even) {
    background-color: #f8fafc;
}
tr:nth-child(odd) {
    background-color: white;
}
tbody tr:hover {
    background-color: #e8f4fd;
    transition: background-color 0.2s ease;
}
tr:last-child td {
    border-bottom: none;
}

button {
    visibility: hidden;
}
input[type=button], input[type=submit], input[type=reset] {
    background-color: var(--bccblue);
    border: none;
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    margin: 4px 2px;
    cursor: pointer;
  }
  input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
    background-color: var(--bccgold);
  }

/* #################################################################### */
/* ######################### PAGE ELEMENTS ############################ */
/* #################################################################### */

/* The bar above the leaderboard tables */
/* Table Title Bar */
.table-title-bar {
    background: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Buttons and button animation */
.btn {
    display: inline-block;
    position: relative;
    color: white;
    font-size: 18px;
    padding: 1em;
    cursor: pointer;
    background: #4f95da;
    border: 1px solid #91c9ff;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease-in-out;
}

.btn:hover:not(.button-disabled):not(.button-cooldown) {
    background: #91c9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active:not(.button-disabled):not(.button-cooldown) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.button-flash {
    animation: flash 0.5s ease-in-out;
}

.button-disabled, .button-cooldown {
    opacity: 0.65;
    cursor: not-allowed !important;
    background-color: #808080 !important;
    color: #ccc !important;
    border-color: #999 !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: all !important; /* Ensure hover still works */
}

.button-disabled:hover, .button-cooldown:hover {
    opacity: 0.65;
    cursor: not-allowed !important;
}

@keyframes flash {
    0% {
        transform: scale(1);
        background-color: #4f95da;
    }
    50% {
        transform: scale(1.1);
        background-color: #91c9ff;
    }
    100% {
        transform: scale(1);
        background-color: #4f95da;
    }
}

.btn-shake {
    animation: button-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}
@keyframes btn-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
/* #################################################################### */
/* ############################## CONTAINER ########################### */
/* #################################################################### */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(var(--bccgold), var(--bccblue));
    /* background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(100, 100, 100, 0.8)); */
    background-repeat: repeat;
    background-size: auto;
    z-index: -1;
}

.top-qr {
    position: fixed;
    top: 10px;
    right: 2vw;
    height: clamp(60px, 12vw, 160px);
    aspect-ratio: 1;
    object-fit: contain;
    background: transparent;
    padding: 0px;
    z-index: 9999;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 10px;
}

.top-text {
    width: 100%;
    min-height: 14vh;
    background: url(/static/images/header.png) bottom center no-repeat;
    background-size: 100% auto;
    padding: 0px;
    text-align: center;
    color: #ffffff;
    font-size: 24px;
    margin: 0px;
    margin-top: 0.5vh;
    border-radius: 10px;
    overflow: hidden;
}
/* Add specific rules for images within top-text */
.top-text img {
    width: 90vw;
    display: block;
    max-width: none; /* Allows image to exceed container width */
    position: relative;
    /*
    left: 50%;
    transform: translateX(-50%);
    */
}
/* Modify existing frame class */
.frame {
    gap: 2px;
    width: min(90vw, 1100px);
    background-color: var(--bccgold);
    border-radius: 15px;
    padding: clamp(12px, 3vw, 30px);
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}
.frame > * {
    width: 100%;          /* Take full width of parent */
    margin: 0;            /* Remove any default margins */
    flex-shrink: 0;       /* Prevent shrinking */
}
/* #################################################################### */
/* ############################## GeoGuesser ########################## */
/* #################################################################### */

#streetview-container {
    width: 100%;
    height: 40vh;  /* Each takes 40% of viewport height */
    margin: 10px 0;  /* Add some vertical spacing */
    position: relative;
    display: block;
}

#streetview-container iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.streetview-iframe {
    width: '100%';
    height: '100%';
    border: 'none';
    min-height: '40vh';
}

/* Ensure iframe in streetview container fills the space */
#streetview-container iframe {
    width: 100%;
    height: 100%;
    border: 'None';
    min-height: '40vh'
}

/* #################################################################### */
/* ############################## FLAGS ############################### */
/* #################################################################### */
#flag-image {
    width: "8%"
}
/* #################################################################### */
/* ############################## QUESTION ############################ */
/* #################################################################### */

.question-title {
    font-size: clamp(1rem, 3vw, 2rem);
    order: -1;
    margin-bottom: 20px;
    padding: 10px;
    align-self: center;
    text-align: center;
}

.question-container {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.9);
}

.question-text {
    font-size: 1.2em;
    margin: 20px 0;
}

.choice-label {
    display: block;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: white;
}

.choice-label:hover {
    background-color: #f5f5f5;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 5px;
    }

    .question-text {
        font-size: 1em;
    }

    .choice-label {
        padding: 8px;
    }
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 20px;
}

.status-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
}

.question-text {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.choices-container label {
    display: block;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    color: #fff;
    transition: background-color 0.3s;
}

.choices-container label:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* *************************************
    Answer Content
*************************************** */

.answer-content {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.answer-text {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #2c3e50;
}

.answer-text p {
    margin: 0.5rem 0;
}

.answer-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.answer-link:hover {
    background-color: #0056b3;
    text-decoration: none;
}


/* #################################################################### */
/* #################### RESPONSIVE / MOBILE ########################### */
/* #################################################################### */

/* Responsive table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Phone portrait (up to 480px) */
@media (max-width: 480px) {
    .top-qr {
        height: 50px;
        top: 5px;
        right: 5px;
    }

    .frame {
        width: 96vw;
        padding: 10px;
        margin: 10px 0;
        border-radius: 10px;
    }

    .top-text {
        min-height: 8vh;
    }

    .top-text img {
        width: 100vw;
    }

    table {
        font-size: 0.8rem;
    }
    th, td {
        padding: 0.5rem;
    }

    .table-title-bar {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .status-text {
        font-size: 1rem;
    }
}

/* Phone landscape / small tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .top-qr {
        height: 70px;
    }

    .frame {
        width: 94vw;
        padding: 15px;
    }

    .top-text {
        min-height: 10vh;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .top-qr {
        height: 100px;
    }

    .frame {
        width: 85vw;
    }
}

/* Ensure inputs don't zoom on iOS (font-size >= 16px) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
    font-size: 16px;
}
