/* ============================================
   GLOBAL STYLES & CSS VARIABLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* CSS custom properties for theme colors */
    --maincolor: white;
    --background-image: url('/images/background.png');
    --buttonColor: rgba(0, 123, 255, 0.9);
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================
   MAIN CONTAINER & LAYOUT
   ============================================ */

/* Full viewport container with dynamic background */
.main-container {
    height: 100vh;
    width: 100vw;
    background-size: 100% 100%; /* ✅ Changed from 'cover' to stretch */
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--maincolor);
    background-image: var(--background-image);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

    /* Preload default background */
    .main-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('/images/background.png');
        background-size: cover;
        background-position: center;
        opacity: 0;
        pointer-events: none;
        z-index: -1;
    }

/* Smooth transition for background changes */
.main-container {
    transition: background-image 0.3s ease-in-out;
}

/* ============================================
   DROPDOWN COMPONENT STYLES
   ============================================ */

.dropdown {
    width: 200px;
    font-weight: bolder;
}

    .dropdown .dropdown-menu {
        min-width: 200px;
        max-width: 400px;
        font-weight: bold;
    }

    .dropdown .dropdown-toggle {
        width: 100%;
        text-align: center;
    }

/* ✅ UPDATED: Horizontal flex container for team score labels - centered at bottom */
.team-labels {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 999;
    pointer-events: none; /* Allow clicks to pass through empty space */
    width: fit-content; /* Container shrinks to fit labels */
}


/* Individual team label/score display */
.team-label {
    font-size: 32px;
    font-weight: bold;
    padding: 10px 20px;
    background-color: transparent;
    border-radius: 8px;
    min-width: 220px;
    text-align: center;
    flex-shrink: 0;
    pointer-events: auto; /* Re-enable clicks on the labels themselves */
}


/* ============================================
   BUTTON STYLES
   ============================================ */

/* Horizontal button container */
.button-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Standard action button (Reset, Projects, etc.) */
.action-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    background-color: var(--buttonColor);
    color: white;
    border: none;
    width: 175px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

    .action-btn:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translateY(-2px);
    }

/* pass button at bottom of question panel */
.pass-btn {
    position: relative;
    bottom: 20px;
    left: 50%;
    width: clamp(80px, 10vw, 120px);
    transform: translate(-50%, 50%);
    padding: clamp(8px, 1vh, 12px) clamp(15px, 2vw, 30px);
    font-size: clamp(12px, 1vw, 16px);
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .pass-btn:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translate(-50%, 48%);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }

/* Answer selection button for multiple choice */
.answer-btn {
    padding: clamp(8px, 1vh, 15px) clamp(15px, 2vw, 30px);
    font-size: clamp(12px, 1.2vw, 18px);
    font-weight: bold;
    text-align: center;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    min-height: clamp(40px, 5vh, 60px);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: clamp(5px, 1vh, 10px);
}

    .answer-btn:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translateY(-2px);
    }

/* Centered bottom button (used for "Start Game") - FIXED SIZE */
.btn-center-bottom {
    width: 150px !important; /* Fixed width */
    height: 50px !important; /* Fixed height */
    padding: 0; /* Remove padding since we have fixed dimensions */
    font-size: 18px; /* Fixed font size */
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    grid-column: 1 / -1; /* Span all columns in grid */
    justify-self: center; /* Center in grid cell */
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-center-bottom:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }

/* Fixed position button (bottom-right - Quit button) */
.btn-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    background-color: var(--buttonColor);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .btn-bottom-right:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }

/* Fixed position button (bottom-left - Quit Game button) */
.btn-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    background-color: var(--buttonColor);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .btn-bottom-left:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }

/* Fixed position button (top-left - Settings button) */
.btn-upper-left {
    position: fixed;
    left: 20px;
    top: 20px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    background-color: var(--buttonColor);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .btn-upper-left:hover {
        background-color: rgba(0, 86, 179, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }

/* Theme button for project selection */
.theme-button {
    background-color: var(--buttonColor);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .theme-button:hover {
        background-color: rgba(0, 86, 179, 0.9);
    }

/* ============================================
   CONTENT PANELS & LAYOUT
   ============================================ */

/* Main content area containing left and right panels */
.content-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

/* Right panel - displays media (video, audio, images) */
.right-panel {
    /* 4:3 aspect ratio, as large as possible within 80vh height and fitting side-by-side */
    height: min(80vh, calc(40vw * 3 / 4)); /* Don't exceed 80% viewport height */
    width: min(40vw, calc(80vh * 4 / 3)); /* Don't exceed 40% width (for side-by-side) */
    max-height: 80vh;
    max-width: 40vw;
    background-color: red;
    /*background-color: rgba(0, 0, 0, 0.7); */
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Left panel - displays questions or start screen */
.left-panel {
    /* 4:3 aspect ratio, as large as possible within 80vh height and fitting side-by-side */
    height: min(80vh, calc(40vw * 3 / 4)); /* Don't exceed 80% viewport height */
    width: min(40vw, calc(80vh * 4 / 3)); /* Don't exceed 40% width (for side-by-side) */
    max-height: 80vh;
    max-width: 40vw;
    display: flex;
    background-color: darkgray;
    flex-direction: column;
    padding: 10px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Inner panel for start screen with team inputs */
.start-inset-panel {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2x2 grid */
    grid-template-rows: auto auto auto; /* 3 rows: 2 for inputs, 1 for button */
    row-gap: 5px; /* Fixed row padding */
    column-gap: clamp(8px, 1.5vw, 15px);
    margin: clamp(5px, 1vh, 10px);
    padding: clamp(8px, 1.5vh, 15px);
    overflow-y: auto;
    background-color: whitesmoke;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: calc(100% - 2 * clamp(5px, 1vh, 10px));
    width: calc(100% - 2 * clamp(5px, 1vh, 10px));
}

/* Inner panel for displaying questions */
.question-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 5px;
    padding: clamp(10px, 2vw, 20px);
    overflow-y: auto;
    background-color: whitesmoke;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Project selection box */
.project-selection-box {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MEDIA & IMAGE STYLES
   ============================================ */

/* Full cover image that fills container */
.full-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* stretch cover image that fills container */
.full-stretch-image {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    display: block;
}

/* Video player styling - 10px from top only */
.video-player {
    width: 100%;
    height: calc(100% - 10px);
    max-width: 100%;
    max-height: calc(100% - 10px);
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    object-fit: fill;
}

/* ============================================
   FORM INPUTS & CONTROLS
   ============================================ */

/* Team input form group */
.team-input-group {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.8vh, 8px);
}

/* Question text display box */
.question-text-box {
    font-weight: bold;
    color: #333;
    font-size: clamp(12px, 1.5vw, 18px);
    background-color: transparent;
    width: 100%;
    margin-bottom: clamp(10px, 1.5vh, 20px);
}

/* Input field labels */
.input-label {
    font-weight: bold;
    color: #333;
    font-size: clamp(10px, 1.2vw, 18px);
    background-color: transparent;
}

/* Team name input fields */
.team-input {
    width: 100%;
    padding: clamp(6px, 1vh, 10px);
    font-size: clamp(10px, 1vw, 16px);
    border: 2px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

    .team-input:focus {
        outline: none;
        border-color: #007bff;
    }

/* Question text styling */
.question-text {
    font-size: clamp(14px, 1.2vw, 20px);
    line-height: 1.6;
    margin-bottom: clamp(15px, 2vh, 25px);
}

/* Button container spanning full width in its own row */
.button-row {
    grid-column: 1 / -1; /* Span all columns */
    display: flex;
    justify-content: center;
    margin-top: clamp(5px, 1vh, 10px);
}

/* ============================================
   OVERLAY & MODAL STYLES
   ============================================ */

/* Loading overlay - displays during API calls */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    z-index: 9999;
}

/* Generic modal overlay container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: auto;
}

/* Modal content box */
.modal-content {
    position: relative;
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

    .modal-content h2 {
        margin-bottom: 20px;
        color: #333;
    }

    .modal-content p {
        margin-bottom: 30px;
        color: #666;
    }

/* ============================================
   Game Summary Overlay - full-screen dark backdrop with centered content
    Used for end-of-game summary
   ============================================ */
.game-summary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); /* Dark backdrop */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Above everything else */
    backdrop-filter: blur(5px); /* Optional: blur background */
}

.game-summary-container {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 20px;
    animation: fadeInScale 0.3s ease-out;
}

/* ============================================
   BLAZORISE MODAL VERTICAL CENTERING FIX
   ============================================ */

/* Force modal to use flexbox for vertical centering */
.modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure the modal dialog uses full height for centering */
.modal-dialog {
    margin: 0 auto;
    max-width: 500px;
    width: 100%;
}

/* Vertical centering for all modal sizes */
.modal-dialog-centered {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
}

/* Remove default transform that might interfere */
.modal.show .modal-dialog {
    transform: none !important;
}

/* Ensure modal content doesn't stretch */
.modal-content {
    width: auto;
    max-width: 100%;
}

/* ============================================
   TOAST NOTIFICATION STYLES
   ============================================ */

.toast-container {
    position: fixed !important;
    z-index: 999999 !important;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    z-index: 999999 !important;
    opacity: 1 !important;
    min-width: 300px;
}

.toast-header {
    background-color: #007bff;
    color: white;
}

/* Success toast variant */
.bg-success .toast-header {
    background-color: #28a745 !important;
}

/* Error toast variant */
.bg-danger .toast-header {
    background-color: #dc3545 !important;
}

/* ============================================
   CONTEXT MENU (RIGHT-CLICK MENU)
   ============================================ */

/* Context menu container */
.custom-context-menu {
    position: fixed;
    background: white;
    border: 2px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10001;
    min-width: 200px;
    padding: 5px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Context menu header */
.context-menu-header {
    padding: 10px 15px;
    font-weight: bold;
    font-size: 14px;
    color: #007bff;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

/* Individual context menu item */
.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
}

    .context-menu-item:hover {
        background-color: #007bff;
        color: white;
    }

    .context-menu-item span {
        font-size: 16px;
    }

/* Context menu divider line */
.context-menu-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 5px 0;
}

/* Invisible backdrop to close menu when clicking outside */
.context-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: transparent;
}

/* ============================================
   JEOPARDY BOARD (JBOARD) COMPONENT
   ============================================ */

.jboard-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* JBoard grid layout */
.jboard-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 2px solid #333;
}

/* JBoard row (category headers + question rows) */
.jboard-row {
    display: flex;
    flex: 1;
}

    /* Header row with category names - fixed height */
    .jboard-row.header-row {
        flex: 0 0 60px;
        height: 100px;
    }

/* Individual JBoard cell */
.jboard-cell {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #333;
    padding: 10px;
}

/* Category header cell */
.header-cell {
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

/* Question cell (contains button) */
.data-cell {
    padding: 0;
}

/* JBoard question button (shows point value) */
.jboard-button {
    width: 90%;
    height: 90%;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: rgba(0, 0, 139, 0.8);
    color: gold;
    border: 2px solid gold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .jboard-button:hover {
        background-color: rgba(0, 0, 139, 1);
        transform: scale(1.05);
    }

    .jboard-button:active {
        transform: scale(0.95);
    }

/* JBoard full-screen overlay */
.jboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* JBoard content wrapper */
.jboard-wrapper {
    position: relative;
    background-color: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* JBoard close button */
.close-jboard {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: red;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
}

    .close-jboard:hover {
        background-color: darkred;
    }

/* ============================================
   INTERMISSION COMPONENT
   ============================================ */

/* Intermission overlay - full-screen darkened background */
.intermission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Intermission container - 1/3 viewport dimensions, centered */
.intermission-container {
    width: 33vw;
    height: 33vh;
    min-width: 400px;
    min-height: 400px;
    max-width: 800px;
    max-height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Video section - fills available space above prompt */
.intermission-video-section {
    flex: 1;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Video player - stretches side to side */
.intermission-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder when no video provided */
.intermission-placeholder {
    text-align: center;
    color: white;
    padding: 20px;
}

    .intermission-placeholder h2 {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .intermission-placeholder p {
        font-size: 1.2em;
        opacity: 0.9;
    }

/* Prompt section - bottom 100px with question and buttons */
.intermission-prompt-section {
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,1));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    gap: 10px;
}

/* Prompt text styling */
.intermission-prompt-text {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin: 0;
    text-align: center;
}

/* Button group container */
.intermission-button-group {
    display: flex;
    gap: 20px;
}

/* Base button styles */
.intermission-btn {
    padding: 10px 25px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

    .intermission-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }

    .intermission-btn:active {
        transform: translateY(0);
    }

/* Yes button - green theme */
.intermission-btn-yes {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

    .intermission-btn-yes:hover {
        background: linear-gradient(135deg, #0d7a6f 0%, #2dd168 100%);
    }

/* No button - red theme */
.intermission-btn-no {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

    .intermission-btn-no:hover {
        background: linear-gradient(135deg, #c72837 0%, #d94a3a 100%);
    }

/* ============================================
   ADJUST POINTS COMPONENT
   ============================================ */

/* Adjust Points overlay background */
.adjust-points-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Adjust Points modal container */
.adjust-points-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 500px;
    max-width: 700px;
}

/* Grid of team adjustment rows */
.teams-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

/* Individual team row (name + input + button) */
.team-row {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    btn-center-bottom-assessment gap: 15px;
    align-items: center;
}

/* Team name label */
.team-name-label {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

/* Points input field (cyan background) */
.points-input {
    background-color: cyan;
    border: 2px solid #00bcd4;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

    .points-input:focus {
        outline: none;
        border-color: #0097a7;
    }

/* Update button for each team */
.update-btn {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .update-btn:hover {
        background-color: #45a049;
        transform: translateY(-2px);
    }

/* Close button */
.close-btn {
    width: 100%;
    padding: 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .close-btn:hover {
        background-color: #da190b;
    }


/*
assessment box text
*/ 
.assessment-box {
    font-size: 20px;
    color: steelblue;
    background-color: transparent;
    width: fit-content;
    margin: 20px;
    padding-top: 10px;
    text-align: left;
}

.btn-center-bottom-assessment {
    width: 240px;
    height: 50px;
    font-size: 16px;
    color: whitesmoke;
    background-color: steelblue;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

    .btn-center-bottom-assessment:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }

    .btn-center-bottom-assessment:active {
        transform: translateY(0);
    }

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
/* Mobile portrait - stack and use more space */
@media (max-width: 768px) and (orientation: portrait) {
    .start-inset-panel {
        grid-template-columns: 1fr 1fr;
        row-gap: 25px; /* Fixed row padding */
        column-gap: 8px;
        margin: 5px;
        padding: 8px;
    }
    /* Button stays fixed size - no changes */
    .assessment-box {
        font-size: 12px;
    }

    .left-panel,
    .right-panel {
        /* 4:3 aspect ratio, use up to 80% width when stacked */
        height: min(50vh, calc(80vw * 3 / 4));
        width: min(80vw, calc(50vh * 4 / 3));
        max-height: 50vh;
        max-width: 80vw;
    }
    /* Start panel scaling */
    .start-inset-panel {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 5px;
        padding: 8px;
    }

    .team-input-group {
        gap: 4px;
    }

    .input-label {
        font-size: 10px;
    }

    .team-input {
        padding: 6px;
        font-size: 10px;
    }

    .button-row {
        margin-top: 5px;
    }

    .btn-center-bottom {
        width: clamp(100px, 20vw, 150px); /* Width scales */
        /* Height stays fixed - no font-size or vertical padding changes */
    }
    /* Question panel scaling */
    .question-panel {
        padding: 10px;
    }

    .question-text-box {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .question-text {
        font-size: 9px;
        margin-bottom: 12px;
    }

    .answer-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
        margin-bottom: 5px;
    }

    .pass-btn {
        width: 80px;
        padding: 8px 15px;
        font-size: 11px;
    }

    .team-labels {
        gap: 10px;
        margin-left: 10px;
        flex-wrap: wrap;
    }

    .team-label {
        font-size: 18px;
        min-width: 120px;
        padding: 5px 10px;
    }
}

/* Mobile landscape - keep side-by-side but adjust sizing */
@media (max-width: 768px) and (orientation: landscape) {
    .start-inset-panel {
        grid-template-columns: 1fr 1fr;
        row-gap: 25px; /* Fixed row padding */
        column-gap: 6px;
        margin: 4px;
        padding: 6px;
    }

    /* Button stays fixed size - no changes */
}

    .left-panel,
    .right-panel {
        /* 4:3 aspect ratio, use up to 70% height */
        height: min(70vh, calc(35vw * 3 / 4));
        width: min(35vw, calc(70vh * 4 / 3));
        max-height: 70vh;
        max-width: 35vw;
    }

    /* Start panel scaling */
    .start-inset-panel {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin: 4px;
        padding: 6px;
    }

    .team-input-group {
        gap: 3px;
    }

    .input-label {
        font-size: 9px;
    }

    .team-input {
        padding: 5px;
        font-size: 9px;
    }

    .button-row {
        margin-top: 4px;
    }

    /* Mobile landscape */
    @media (max-width: 768px) and (orientation: landscape) {
        .btn-center-bottom {
            width: clamp(90px, 15vw, 130px); /* Width scales */
            /* Height stays fixed */
        }
    }

.assessment-box {
    font-size: 12px;
}

    /* Question panel scaling */
    .question-panel {
        padding: 8px;
    }

    .question-text-box {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .question-text {
        font-size: 9px;
        margin-bottom: 10px;
    }

    .answer-btn {
        padding: 6px 10px;
        font-size: 9px;
        min-height: 30px;
        margin-bottom: 4px;
    }

    .pass-btn {
        width: 70px;
        padding: 6px 12px;
        font-size: 10px;
    }
}



/* Tablet portrait mode - stack panels vertically */
@media (max-width: 1024px) and (orientation: portrait) {
    .start-inset-panel {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 25px; /* Fixed row padding */
        column-gap: 12px;
        margin: 8px;
        padding: 12px;
    }

 
    .assessment-box {
        font-size: 12px;
    }

        .left-panel,
        .right-panel {
            /* 4:3 aspect ratio, fit within 60% of viewport when stacked */
            height: min(60vh, calc(60vw * 3 / 4));
            width: min(60vw, calc(60vh * 4 / 3));
            max-height: 60vh;
            max-width: 60vw;
        }

        /* Start panel scaling - Keep 2x2 grid */
        .start-inset-panel {
            grid-template-columns: 1fr 1fr; /* Keep 2x2 grid */
            grid-template-rows: auto auto auto; /* 3 rows: 2 for inputs, 1 for button */
            gap: 8px;
            margin: 5px;
            padding: 8px;
            overflow-y: auto; /* Allow scrolling if needed */
        }

        .team-input-group {
            gap: 3px;
        }

        .input-label {
            font-size: 9px;
        }

        .team-input {
            padding: 5px;
            font-size: 9px;
        }

        .button-row {
            margin-top: 4px;
            grid-column: 1 / -1; /* Button spans both columns */
        }

        .btn-center-bottom {
            width: clamp(90px, 15vw, 130px);
            padding: 8px 15px;
            font-size: 14px;
        }

        /* Question panel scaling */
        .question-panel {
            padding: 8px;
            overflow-y: auto; /* Allow scrolling if content is too tall */
        }

        .question-text-box {
            font-size: 11px;
            margin-bottom: 8px;
        }

        .question-text {
            font-size: 10px;
            margin-bottom: 10px;
            line-height: 1.4;
        }

        .answer-btn {
            padding: 6px 10px;
            font-size: 9px;
            min-height: 30px;
            margin-bottom: 4px;
        }

        .pass-btn {
            width: 70px;
            padding: 6px 12px;
            font-size: 11px;
        }
    }

/* Tablet landscape mode - keep side-by-side */
@media (max-width: 1024px) and (orientation: landscape) {
    .start-inset-panel {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 25px; /* Fixed row padding */
        column-gap: 10px;
        margin: 6px;
        padding: 10px;
    }

    .assessment-box {
        font-size: 13px;
    }
        /* Button stays fixed size - no changes */
        /* Start panel scaling - Keep 2x2 grid */
        .start-inset-panel {
            grid-template-columns: 1fr 1fr; /* Keep 2x2 grid */
            grid-template-rows: auto auto auto;
            gap: 5px;
            margin: 3px;
            padding: 5px;
            overflow-y: auto;
        }

        .team-input-group {
            gap: 2px;
        }

        .input-label {
            font-size: 8px;
        }

        .team-input {
            padding: 4px;
            font-size: 8px;
        }

        .button-row {
            margin-top: 3px;
            grid-column: 1 / -1;
        }

        .btn-center-bottom {
            width: clamp(80px, 12vw, 110px);
            padding: 6px 12px;
            font-size: 12px;
        }
        /* Question panel scaling */
        .question-panel {
            padding: 6px;
            overflow-y: auto;
        }

        .question-text-box {
            font-size: 11px;
            margin-bottom: 6px;
        }

        .question-text {
            font-size: 10px;
            margin-bottom: 8px;
            line-height: 1.3;
        }

        .answer-btn {
            padding: 5px 8px;
            font-size: 9px;
            min-height: 35px;
            margin-bottom: 3px;
        }

        .pass-btn {
            width: 65px;
            padding: 5px 10px;
            font-size: 10px;
        }
    }

/* Desktop - larger screens */
@media (min-width: 1025px) {
    .start-inset-panel {
        grid-template-columns: 1fr;
        row-gap: 5px; /* Fixed row padding */
        column-gap: 15px;
        margin: 10px;
        padding: 15px;
        grid-template-columns: 1fr; /* 2x2 grid */
        grid-template-rows: auto auto auto auto auto; /* 5 rows: 4 for inputs, 1 for button */
    }

    /* Button stays fixed size - no changes */

    .assessment-box {
        font-size: 18px;
    }
    .team-input-group {
        /*    gap: 8px;*/
        display: flex;
        flex-direction: column;
        gap: 5px; /* Reduced gap between label and input */
        margin: 0; /* Remove any default margins */
    }

    /*    .input-label {
        font-size: 18px;
    }*/

    .input-label {
        font-weight: bold;
        color: #333;
        font-size: clamp(10px, 1.2vw, 18px);
        background-color: transparent;
        margin: 0; /* Remove margin */
        padding: 0; /* Remove padding */
    }

    /*    .team-input {
        padding: 10px;
        font-size: 16px;
    }*/
    /* Team name input fields */
    .team-input {
        width: 100%;
        padding: clamp(6px, 1vh, 10px);
        font-size: clamp(10px, 1vw, 16px);
        border: 2px solid #ccc;
        border-radius: 6px;
        transition: border-color 0.3s ease;
        margin: 0; /* Remove margin */
    }

        .team-input:focus {
            outline: none;
            border-color: #007bff;
        }

    .button-row {
        margin-top: 10px;
    }


    .btn-center-bottom {
        width: clamp(120px, 15vw, 200px); /* Width scales */
        font-size: 18px;
        /* Height stays fixed */
    }


    /* Question panel scaling */
    .question-panel {
        padding: 20px;
    }

    .question-text-box {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .question-text {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .answer-btn {
        padding: 15px 30px;
        font-size: 16px;
        min-height: 45px;
        margin-bottom: 10px;
    }

    .pass-btn {
        width: 120px;
        padding: 12px 30px;
        font-size: 16px;
    }

    .team-labels {
        gap: 40px;
        margin-left: 200px;
    }

    .team-label {
        font-size: 32px;
        min-width: 220px;
        padding: 10px 20px;
    }
}

    /* Adjust font sizes when viewport drops below 1600px */
    @media (max-width: 1500px) {
        /* Button stays fixed size - no changes */
        .assessment-box {
            font-size: 12px;
        }
        .input-label {
            font-size: 10px !important;
        }

        .team-input {
            font-size: 10px !important;
        }
        .answer-btn {
            padding: 5px 5px;
            font-size: 11px;
            min-height: 30px;
            margin-bottom: 5px;
        }
    }

    /* Viewport width display at center top */
    .viewport-width-display {
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        font-size: 12px;
        font-weight: bold;
        z-index: 1000;
        pointer-events: none;
    }

    /* Team labels container with 150px left/right margins */
    .team-labels-container {
        position: fixed;
        bottom: 20px;
        left: 175px;
        right: 175px;
        height: 40px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 40px;
        z-index: 999;
        pointer-events: none;
        background: linear-gradient(to bottom, whitesmoke, lightgray);
        padding: 5px 5px;
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        opacity: 0.5;
    }

    /* Individual team label/score display */
    .team-label {
        font-size: 32px;
        font-weight: bold;
        padding: 10px 20px;
        background-color: transparent;
        border-radius: 8px;
        min-width: 220px;
        text-align: center;
        flex-shrink: 0;
        pointer-events: auto;
    }

/* ============================================
   ASSESSMENT ID MODAL
   ============================================ */

.assessment-id-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.assessment-id-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

.assessment-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

    .assessment-modal-header h2 {
        margin: 15px 0 0 0;
        font-size: 24px;
        font-weight: 600;
    }

.assessment-modal-body {
    padding: 30px;
}

.assessment-instruction {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: center;
}

.assessment-input-container {
    margin-bottom: 20px;
}

.assessment-id-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 8px;
    border: 3px solid #667eea;
    border-radius: 12px;
    transition: all 0.3s ease;
}

    .assessment-id-input:focus {
        outline: none;
        border-color: #764ba2;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
        transform: scale(1.02);
    }

    .assessment-id-input::placeholder {
        color: #ccc;
        letter-spacing: 8px;
    }

.assessment-error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.assessment-modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.assessment-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.assessment-btn-cancel {
    background: #6c757d;
    color: white;
}

    .assessment-btn-cancel:hover {
        background: #5a6268;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    }

.assessment-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

    .assessment-btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
}
