/* The CSS is retained, but the styles for .judge-display and .system-title are now unused. */
body {
    font-family: 'Arial Black', Arial, sans-serif;
    text-align: center;
    background-color: #000000;
    color: white;
    margin: 0;
    padding: 5px; /* Reduced from 10px */
    min-height: 95vh; /* INCREASED from 90vh to 95vh */
    box-sizing: border-box;
}
/* Style to make the overall results link look disabled */
.disabled-link {
    opacity: 0.5; /* Dim the link */
    cursor: default; /* Change cursor to default */
    text-decoration: none; /* Remove underline */
}





#scoreboard {
    width: 100%;             /* Changed from 98% */
    max-width: none;         /* Changed from 1920px to none */
    min-height: 100vh;       /* Fill the full height */
    margin: 0;               /* Remove auto margin */
    border: none;            /* Optional: remove border to maximize space */
    padding: 10px; 
    background-color: #000000;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* --- TITLE FIX: Top priority and prevents clipping --- */
#main-title {
    font-size: clamp(22px, 2.75vw, 44px); /* SLIGHTLY INCREASED from 2.5vw to 2.75vw */
    font-weight: 900;
    color: lime; 
    text-shadow: 0 0 8px lime; /* Reduced shadow */
    margin: 0 0 2px 0; /* Reduced margin */
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: clip;
}

#sub-title {
    font-size: 1.2vw; /* Reduced from 1.5vw */
    font-weight: 700;
    color: white; 
    margin: 0 0 3px 0; /* Reduced margin */
}

#sub-title .yellow-green-text {
    color: white; 
    text-shadow: 0 0 8px #ADFF2F; /* Reduced shadow */
    font-weight: 900; 
}

/* --- Navigation Tabs (NEW) --- */
.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 5px; /* Reduced margin */
    margin-top: 3px; /* Reduced margin */
    border-bottom: 1px solid #333; /* Reduced border thickness */
}

.nav-link {
    padding: 6px 10px; /* Reduced padding */
    text-decoration: none;
    color: #bbb;
    font-size: 0.9em; /* Reduced font size */
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s, border-bottom 0.3s;
    border-radius: 4px 4px 0 0; /* Reduced border radius */
}

.nav-link:hover {
    color: #fff;
}

.nav-link.active {
    color: #FFD700; /* Gold color for active tab */
    border-bottom: 2px solid #FFD700; /* Reduced border thickness */
}

.nav-tabs a {
    color: #bbb;
}

/* --- TOP DISPLAY AREA (Scores and Timer) --- */
.matchup-display {
    
    display: flex;
    justify-content: space-between;
    flex-grow: 1; 
    background-color: black;
    margin-bottom: 5px; /* Reduced margin */
}

.competitor {
    flex: 1;                 /* Changed from width: 40% */
    padding: 0.5% 1%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 3px;
}

.red {
    background: linear-gradient(to right, #4d0000, #000000);
}

.blue {
    background: linear-gradient(to left, #00004d, #000000);
}

.score-label {
    font-size: 1.2vw; /* Reduced from 1.5vw */
    font-weight: bold;
    margin-bottom: 3px; /* Reduced margin */
    color: gold; 
    text-shadow: 0 0 3px gold; /* Reduced shadow */
}

.score-input {
    font-size: 17em; /* INCREASED from 12vw to 13vw */
    font-weight: 900;
    width: 100%;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8); /* Reduced shadow */
    cursor: default;
    line-height: 1; 
}

.center-display {
    width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    padding: 5px 0; /* Reduced padding */
}

.round-box {
    margin-bottom: 3px; /* Reduced margin */
}
.round-label {
    font-size: 2.7vw; /* Reduced from 0.9vw */
    color: white;
     margin-top: -1  em;
}
#round-display {
    font-size: 5.5vw; /* Reduced from 2.8vw */
    font-weight: bold;
    color: gold;
    text-shadow: 0 0 8px gold; /* Reduced shadow */
    margin: 0;
    margin-top: -1  em;
}

.dfp-display {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 2px; /* Reduced gap */
    margin-bottom: 3px; /* Reduced margin */
    top: -3;
}
.dfp-item {
    font-size: 1.9vw; /* Reduced from 1.1vw */
    font-weight: bold;
    padding: 2px; /* Reduced padding */
    border-radius: 3px; /* Reduced border radius */
    color: white;
    display: flex;
    justify-content: center;
}

.red-dfp {
    background-color: #990000;
}
.blue-dfp {
    background-color: #000099;
}
.dfp-label {
    margin-left: 5px; /* Reduced margin */
    color: white;
}
.dfp-count {
    margin-right: 10px; /* Reduced margin */
    color: white;
   
}

#timer-input {
    font-size: 5.0vw; /* Reduced from 2.3vw */
    font-weight: bold;
    width: 90%;
    text-align: center;
    background-color: #333;
    color: #00ff00; 
    border: 1px solid #006600; /* Reduced border thickness */
    border-radius: 3px; /* Reduced border radius */
    cursor: pointer;
    padding: 2px 0; /* Reduced padding */
    margin-top: 3px; /* Reduced margin */
}

/* --- MATCH TOTALS DISPLAY --- */
.match-totals-display {
    display: flex;
    justify-content: space-around;
    padding: 6px 0; /* Reduced padding */
    background-color: #111;
    border-top: 1px solid #333; /* Reduced border thickness */
    border-bottom: 1px solid #333; /* Reduced border thickness */
    margin-bottom: 5px; /* Reduced margin */
}

.total-label {
    font-size: 2.0vw; /* INCREASED from 1.8vw to 2.0vw */
    font-weight: bold;
    margin: 0;
}

.red-total-label {
    color: #FF6347;
}

.blue-total-label {
    color: #4169E1;
}

/* --- CONTROLS AREA --- */
.controls-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 3px 0; /* Reduced padding */
    gap: 8px; /* Reduced gap */
}

.score-controls {
    width: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.central-controls {
    width: 30%;
}

.score-controls h3 {
    font-size: 1.0vw; /* Reduced from 1.2vw */
    margin: 0 0 3px 0; /* Reduced margin */
}

.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px; /* Reduced gap */
}

.control-btn {
    padding: 4px 8px; /* Reduced padding */
    font-size: 0.9vw; /* Reduced from 1.0vw */
    font-weight: bold;
    border: none;
    border-radius: 4px; /* Reduced border radius */
    cursor: pointer;
    transition: background-color 0.2s;
    width: 10%;
}

.primary-btn {
    background-color: gold;
    color: black;
    width: 5em;
}

.secondary-btn {
    background-color: #555;
    color: white;
    width: 5em;
}

.danger-btn {
    background-color: #d9534f;
    color: white;
}

.control-btn:disabled {
    background-color: #333;
    color: #999;
    cursor: not-allowed;
}

.dfp-button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px; /* Reduced gap */
    margin-bottom: 8px; /* Reduced margin */
    width: 100%;
}

.dfp-btn {
    padding: 2px 5px; /* Reduced padding */
    font-size: 0.8vw; /* Reduced from 1.0vw */
    font-weight: bold;
    border: none;
    border-radius: 3px; /* Reduced border radius */
    cursor: pointer;
    transition: background-color 0.2s;
    flex-basis: 22%; /* To fit four buttons per row */
}

.red-control {
    background-color: #cc3333;
    color: white;
}

.blue-control {
    background-color: #3333cc;
    color: white;
}

.subtract-dfp-btn {
    background-color: #555;
    color: #ccc;
}

.subtract-dfp-btn:hover {
    background-color: #444;
}

.score-buttons {
    display: flex;
    justify-content: center;
    gap: 5px; /* Reduced gap */
    width: 100%;
}

.score-btn {
    padding: 4px 8px; /* Reduced padding */
    font-size: 1.5vw; /* Reduced from 1.8vw */
    font-weight: bold;
    border: none;
    border-radius: 4px; /* Reduced border radius */
    cursor: pointer;
    transition: background-color 0.2s;
    flex-grow: 1;
}

.score-btn[data-team="red"] {
    background-color: #ff6666;
    color: black;
}

.score-btn[data-team="blue"] {
    background-color: #6666ff;
    color: black;
}

.subtract-btn {
    background-color: #555;
    color: #ccc;
}

.subtract-btn:hover {
    background-color: #444;
}


/* --- MESSAGES --- */
#message-container {
    padding: 3px; /* Reduced padding */
    margin: 0;
    font-size: 1.0vw; /* Reduced from 1.2vw */
    font-weight: bold;
    display: none;
    text-align: center;
    border-radius: 4px; /* Reduced border radius */
}

/* --- MODAL STYLES (Winner Display) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Increased opacity */
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #1a1a1a; /* Darker background */
    padding: 20px; /* Reduced padding */
    border-radius: 8px; /* Reduced border radius */
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5); /* Gold shadow */
    width: 80%;
    max-width: 500px; /* Reduced max-width */
}

#modal-title {
    color: gold;
    font-size: 2.5vw; /* Reduced font size */
    margin-bottom: 5px; /* Reduced margin */
}

#modal-winner-text {
    font-size: 4vw; /* Reduced font size */
    font-weight: 900;
    margin: 5px 0; /* Reduced margin */
}

.modal-scores {
    font-size: 3vw; /* Reduced font size */
    font-weight: bold;
    margin: 5px 0 10px 0; /* Reduced margin */
}

.modal-red {
    color: #FF6347;
}

.modal-blue {
    color: #4169E1;
}

.vs {
    margin: 0 10px; /* Reduced margin */
    color: white;
    font-size: 0.8em;
}

#modal-message {
    color: #ccc;
    font-size: 1.2vw; /* Reduced font size */
    margin-bottom: 15px; /* Reduced margin */
}

.modal-content .control-btn {
    width: 45%;
    margin: 0 5px; /* Reduced margin */
    font-size: 1.0vw; /* Reduced font size */
}


/* --- Match History Styles (match_history.php) --- */
.history-title {
    font-size: 2.0vw !important; /* Larger title for history view */
    margin-bottom: 10px !important;
}

.match-history-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.match-number {
    font-size: 1.5vw;
    color: gold;
    margin: 0;
    flex-grow: 1;
    text-align: left;
}

.match-totals {
    display: flex;
    flex-direction:row;
    align-items: center;
    font-size: 1.3em; /* Reduced font size */
    color: #ccc;
}

.winner-label {
    margin-top: 3px; /* Reduced margin */
    font-size: 2.2em; /* Reduced font size */
    color: #ccc;

}

.red-total {
    color: #FF6347; 
}

.blue-total {
    color: #4169E1; 
}

/* Text colors for winners (in history table) */
.red-text {
    color: #FF6347;
}

.blue-text {
    color: #4169E1;
}

.tie-text {
    color: #FFD700; /* Gold */
}

/* --- Rounds Table --- */
.rounds-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px; /* Reduced margin */
    text-align: center;
}

.rounds-table th, .rounds-table td {
    padding: 8px; /* Reduced padding */
    border: 1px solid #333;
}

.rounds-table th {
    background-color: #2a2a2a;
    color: white;
}

/* --- ADDITIONS FOR PRINTING FEATURE --- */

.print-btn {
    margin-left: 15px; /* Separate it from the links */
    background-color: #4CAF50; /* Green color for print button */
    color: white;
    font-size: 0.9em;
    padding: 6px 10px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.print-btn:hover {
    background-color: #45a049;
}


/* NEW STYLES: Logo positioning for both screen and print */
#print-logo {
    width: 100px; /* Adjust size as needed */
    height: auto;
    margin: 10px auto; /* Center it below the title */
    display: block; /* Ensures it takes up full width for centering */
}

/* NEW STYLES: Watermark preparation (invisible by default) */
#print-watermark {
    display: none; /* Hide the watermark on screen */
}


/* ------------------------------------------------ */
/* FIX 1: EXPLICITLY SET PAGE MARGINS */
/* ------------------------------------------------ */
@page {
    /* Define a generous, consistent margin for all browsers/printers */
    margin: 8mm; /* Reduced to 8mm for more space */
}

/* ------------------------------------------------ */
/* IMPROVED: Print Styles for Elegant History Printout with MARGIN OVERFLOW FIX */
/* ------------------------------------------------ */
@media print {
    /* Hide navigation, buttons, and status messages for clean printout */
    .nav-tabs, 
    #print-history-btn,
    .status-message { 
        display: none !important;
    }

    /* Adjust main container for printing */
    body {
     font-family: 'Arial Black', Arial, sans-serif;
    text-align: center;
    background-color: #000000;
    color: white;
    margin: 0;
    padding: 0;              /* Changed from 5px to 0 */
    overflow: hidden;        /* Prevents scrollbars */
    }
    
/* ENHANCEMENT 2: Page Numbering and Margins */
/* This MUST be placed OUTSIDE any selectors, at the start of the @media print block. */
@page {
    /* Set page margins for a cleaner printout */
    margin: 20mm 15mm 25mm 15mm; 
    /* Add page counter to the bottom right */
    @bottom-right {
        content: "Page " counter(page) " of " counter(pages);
        font-size: 10pt;
        color: #333;
    }
}

/* ENHANCEMENT 3: Prevent Matches from Splitting Across Pages */
.match-box {
    /* Important: Keeps the entire match summary on one page if possible */
    page-break-inside: avoid; 
}

/* ENHANCEMENT 4: Styles for the Report Details (Title/Date) */
.report-details {
    text-align: center;
    margin-bottom: 20px;
    color: #000; /* Ensure text is black for printing */
}
.report-main-title {
    font-size: 16pt;
    margin-bottom: 5px;
    padding: 0;
}
.report-date {
    font-size: 10pt;
    font-style: italic;
    margin: 0;
    padding: 0;
}

    
    #scoreboard {
        border: none;
        width: 100%; /* Rely on @page margins */
        margin: 0 !important; 
        padding: 0 !important; 
        box-shadow: none;
        min-height: initial; 
    }

    /* 1. ELEGANT LOGO/HEADER STYLES */
    /* NEW CONTAINER TO ALIGN TITLE AND LOGO SIDE-BY-SIDE */
    .print-header-container {
        display: flex;
        /* FIX: Gap reduced to 2mm for minimum space */
        justify-content: flex-start; 
        gap: 2mm; 
        align-items: center; 
        margin-bottom: 5mm; 
        /* FIX: Removed top padding to pull header up */
        padding-top: 0; 
        border-bottom: 2px solid #aaa; 
    }
    
    .history-title {
        font-size: 16pt !important;
        font-weight: bold;
        text-transform: uppercase;
        /* Ensure title has no vertical margin/padding contributing to spacing */
        margin: 0; 
        padding: 0; 
        border-bottom: none; 
    }

    #print-logo {
        /* Ensure logo has no vertical margin/padding contributing to spacing */
        margin: 0 !important; 
        width: 60px; 
        flex-shrink: 0; 
    }

    /* 2. ELEGANT WATERMARK STYLES */
    #print-watermark {
        display: block !important; 
        position: fixed; 
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('logo.jpg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 60%; 
        opacity: 0.05; 
        z-index: -1; 
    }

    /* 3. ELEGANT TABLE/MATCH STYLES */
    
    .match-history-container {
        background-color: transparent !important; 
        padding: 3mm 0 !important;
        margin: 5mm 0 !important;
        border: none !important; 
        border-bottom: 1px solid #ddd; 
        page-break-inside: avoid; 
    }

    .rounds-table {
        width: 100%; 
        table-layout: fixed; 
        font-size: 9pt;
        border: 1px solid #ccc; 
        border-collapse: collapse; 
        margin-top: 10px;
    }

    .rounds-table th, .rounds-table td {
        padding: 2px 3px; 
        border: 1px solid #e0e0e0; 
        word-wrap: break-word;
    }
    
    /* TIGHT COLUMN WIDTHS (Previous tightest configuration is retained to prevent overflow) */
    /* 10 + 11 + 11 + 16 + 26 + 26 = 100% */
    .rounds-table th:nth-child(1), /* Round */
    .rounds-table td:nth-child(1) {
        width: 10%; 
    }

    .rounds-table th:nth-child(2), /* Red Score */
    .rounds-table td:nth-child(2) {
        width: 11%; 
    }
    
    .rounds-table th:nth-child(3), /* Blue Score */
    .rounds-table td:nth-child(3) {
        width: 11%; 
    }
    
    .rounds-table th:nth-child(4), /* Round Winner */
    .rounds-table td:nth-child(4) {
        width: 16%; 
    }
    
    .rounds-table th:nth-child(5), /* Red D/F (Disarm/Falls) */
    .rounds-table td:nth-child(5) {
        width: 26%; 
    }
    
    .rounds-table th:nth-child(6), /* Blue D/F */
    .rounds-table td:nth-child(6) {
        width: 26%; 
    }


    .rounds-table th {
        background-color: #f5f5f5 !important; 
        color: #000 !important;
        text-transform: uppercase;
        font-size: 8.5pt; 
    }
    
    /* Final cleanup of text and borders */
    .rounds-table th, .rounds-table td,
    .match-header h3, .match-totals, .winner-label, .archived-date,
    .red-total, .blue-total, .red-text, .blue-text, .tie-text,
    h2, h3, p, span, div, a {
        color: #000 !important;
        border-color: #ccc !important; 
        text-shadow: none !important;
        background-color: transparent !important;
    }

}
/* --- Signature Block Styles (Modified for Left Alignment) --- */
.signature-block {
    display: flex;
    justify-content: space-between; /* Use space-between to push them to the sides */
    width: 90%; /* Increase to push blocks further out */
    max-width: 1200px;
    margin: 40px auto 20px auto; /* Keep the block centered on the page */
    padding: 0 5%; /* Add internal padding to keep content off the edges */
    box-sizing: border-box;
    text-align: left; /* Ensures text inside is left-aligned */
    
}

.prepared-by, .approved-by {
    flex: 0 0 auto; /* Prevent them from growing or shrinking, only take needed width */
    width: 300px; /* Give them a fixed width for consistent spacing */
    padding: 10px;
    margin: 0;
}

.prepared-by p, .approved-by p {
    margin: 5px 0;
    padding: 0;
}

/* --- Signature Block Styles (Revised to Fit Name Length) --- */
.prepared-by strong, .approved-by strong {
 /* Change to block to force full line width */
    display: block !important; 
    /* Set a consistent width for a professional signature line */
    width: 250px !important; 
    /* Ensure the line is solid black for printing */
    border-bottom: 1px solid #000 !important; 
    padding-bottom: 5px;
    margin-bottom: 10px; /* More space before position */
    text-align: center; /* Center the name above the line */
}
.signature-block p {
    margin: 2px 0; /* Tighten up spacing for print */
    color: #000; /* Ensure text is black for printing */
}

/* Ensure the parent paragraph or container allows for left alignment of the inline-block */
.prepared-by p, .approved-by p {
    margin: 5px 0;
    padding: 0;
    text-align: left; /* Essential to keep everything left-aligned */
}

.header-group {
    display: flex; 
    align-items: center; 
    justify-content: center; /* This centers the logo+text block */
    margin-bottom: 20px; 
}

#print-logo {
    width: 80px; /* Adjust size as necessary */
    height: auto;
    margin-right: 20px; /* Space between logo and text */
    margin-left: 0; 
}

#sub-title {
    text-align: left; /* Align the text correctly */
    margin-top: 0;
    margin-bottom: 0;
}
/* --- Signature Block Styles (Modified for Left Alignment - FIX START) --- */
.signature-block {
    /* FIX FOR OVERLAP: Ensures the block starts below all preceding content (like tables/match containers) 
       and handles any previous floats correctly. */
    clear: both; 
    
    display: flex;
    justify-content: space-between; /* Use space-between to push them to the sides */
    width: 90%; /* Increase to push blocks further out */
    max-width: 1200px;
    
    /* FIX FOR OVERLAP: Use a specific margin-top (50px) to separate from the last table, plus auto for centering */
    margin: 50px auto 20px auto; 
    
    padding: 0 5%; /* Add internal padding to keep content off the edges */
    box-sizing: border-box;
    text-align: left; /* Ensures text inside is left-aligned */
}

.prepared-by, .approved-by {
    flex: 0 0 auto; /* Prevent them from growing or shrinking, only take needed width */
    width: 300px; /* Give them a fixed width for consistent spacing */
    padding: 10px;
    margin: 0;
}

.prepared-by p, .approved-by p {
    margin: 5px 0;
    padding: 0;
}

/* --- Signature Block Styles (Revised to Fit Name Length) --- */
/* This targets the <strong> tag wrapping the name within the <p class="signature-name"> */
.prepared-by strong, .approved-by strong {
    /* Change to block to force full line width */
    display: block !important; 
    /* Set a consistent width for a professional signature line */
    width: 250px !important; 
    /* Ensure the line is solid black for printing */
    border-bottom: 1px solid #000 !important; 
    padding-bottom: 5px;
    margin-bottom: 10px; /* More space before position */
    text-align: center; /* Center the name above the line */
}

.signature-block p {
    margin: 2px 0; /* Tighten up spacing for print */
    color: #000; /* Ensure text is black for printing */
}

/* Ensure the parent paragraph or container allows for left alignment of the inline-block */
.prepared-by p, .approved-by p {
    margin: 5px 0;
    padding: 0;
    text-align: left; /* Essential to keep everything left-aligned */
}

/* Print Specific Adjustment (Ensures the block is not fixed/absolute in print media) */
@media print {
    /* Critical: Ensures the block flows naturally and isn't stuck in a fixed/absolute position when printing */
    .signature-block {
        position: static !important;
        /* Re-apply clear just in case other elements have print-specific float */
        clear: both !important; 
        margin-top: 15mm !important; /* Adjust margin for print */
    }
}
/* --- NEW: STYLES FOR HIDING TOTAL SCORE UNTIL MATCH OVER --- */

/* Ensure the match-totals-display container has a defined space for the placeholder */
.match-totals-display {
    min-height: 100px; /* Ensures the display doesn't collapse when scores are hidden */
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

/* Container for the total score value and placeholder */
.score-display-container {
    position: relative; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50%;
}

/* Hide the actual score SPAN when the container does NOT have the 'match-over' class */
.score-display-container:not(.match-over) #match-total-red,
.score-display-container:not(.match-over) #match-total-blue {
    /* Hiding the score span (the "0") */
    display: none; 
}

/* Show the placeholder text when scores are hidden */
.score-display-container:not(.match-over)::after {
    content: "TOTALS HIDDEN";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white; 
    font-size: 3.5vw; /* Adjust size to fit your design */
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}
/* --- HIDE TOTAL SCORE CONTAINER INITIALLY --- */
#match-totals-container {
    display: none; /* Hide by default */
}

#match-totals-container.match-over {
    display: flex; /* Show only when the match is over */
}
/* PLAYER NAMES - Increased by 30% */
.name-input {
    display: block;
    font-size: 80%; /* Increased from 7rem to 9.1rem */
    font-weight: 900;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    font-family: 'Arial Black', sans-serif;
    line-height: 0.9; /* Slightly tighter to keep layout compact */
    margin-bottom: 15px;
    letter-spacing: -3px;
}

/* "POINTS" WORD - Increased by 30% */
.score-label {
    font-size: 1.6rem; /* Increased from ~1.2rem to 1.6rem */
    color: #888;
    margin-top: 5px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Maintain the specific corner colors */
.red .name-input {
    color: #FF4D4D;
    text-shadow: 3px 3px 0px #000;
}

.blue .name-input {
    color: #4D94FF;
    text-shadow: 3px 3px 0px #000;
}
/* MASSIVE NAME LABELS (+30% from your previous 7rem = 9.1rem) */
.name-label-display {
    display: block;
    font-size: 9.1rem; 
    font-weight: 900;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    font-family: 'Arial Black', sans-serif;
    line-height: 0.9;
    margin-bottom: 5px;
}

.red .name-label-display { color: #FF4D4D; }
.blue .name-label-display { color: #4D94FF; }

/* POINTS WORD (+30% from 1.2rem = 1.6rem) */
.score-label {
    font-size: 1.6rem !important; 
    color: #888;
    margin-top: 5px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
}
/* HUGE NAME (cris) STYLE */
.huge-name-input {
    display: block;
    font-size: 8rem; 
    font-weight: 900;
    text-align: center;
    width: 100%;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    text-transform: lowercase;
    font-family: 'Arial Black', sans-serif;
    pointer-events: none;
}

/* GLOWING YELLOW "POINTS" STYLE */
.huge-points-label {
    font-size: 6rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    text-transform: uppercase;
    margin: 10px 0;
}

/* MASSIVE WHITE SCORE "0" STYLE */
.huge-score-input {
    display: block;
    font-size: 20rem; /* Original Massive Size */
    font-weight: 900;
    text-align: center;
    width: 100%;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Arial', sans-serif;
    pointer-events: none;
}
/* Reduced Name Size */
.compact-name {
    display: block;
    font-size: 3.5rem; 
    font-weight: 900;
    text-align: center;
    width: 100%;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    text-transform: lowercase;
    font-family: 'Arial Black', sans-serif;
    pointer-events: none;
}

/* Reduced Yellow Label */
.compact-points-label {
    font-size: 2.5rem;
    font-weight: 900;
    color: #FFD700;
    text-transform: uppercase;
}

/* Reduced Score Size */
.compact-score {
    display: block;
    font-size: 8rem; 
    font-weight: 900;
    text-align: center;
    width: 100%;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    pointer-events: none;
}

.competitor {
    padding: 10px;
    flex: 1;
}
/* PLAYER NAMES - KEPT ORIGINAL SIZE */
.name-label-input {
    display: block;
    font-size: 3.5rem; 
    font-weight: 900;
    text-align: center;
    width: 100%;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    text-transform: uppercase;
    font-family: 'Arial Black', sans-serif;
    pointer-events: none;
}

/* POINTS LABEL - KEPT ORIGINAL SIZE */
.score-label {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
    letter-spacing: 2px;
    margin: 5px 0;
}

/* ACTUAL SCORE - MADE 30% LARGER */
.main-score-display {
    display: block;
    font-size: 15.6rem; /* Increased by 30% from 12rem */
    font-weight: 900;
    text-align: center;
    width: 100%;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Arial Black', sans-serif;
    pointer-events: none;
    line-height: 1;
}

.red .main-score-display { color: #FF4D4D; }
.blue .main-score-display { color: #4D94FF; }
/* Elegant Button Design for View Match Scores */
.view-results-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 255, 0, 0.05); /* Very subtle green tint */
    color: #00ff00;
    text-align: center;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.view-results-btn:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    border-color: #00ff00;
    transform: translateY(-1px);
}