/* Base Body Styles */
body {
    font-family: Arial, sans-serif;
    background: radial-gradient(circle at center, #1A1A1A 0%, #121212 100%);
    margin: 0;
    padding: 10px;
    color: white;
    text-align: center;
    touch-action: manipulation;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Default Screen (Main Container) */
#defaultScreen {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 10px;
    padding: 10px 0;
}

/* Top Section */
#topSection {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.score-name-row {
    display: flex;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}

.score-name-row:nth-child(1) {
    flex-direction: row; /* Blue: score | name */
}

.score-name-row:nth-child(3) {
    flex-direction: row; /* Red: name | score */
}

.score {
    background-color: #333;
    width: 60px;
    height: 40px;
    padding: 4px;
    border-radius: 6px;
    font-size: 2em;
    font-weight: bold;
    border: 1px solid #666;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent score from shrinking */
}

.blue { color: #0099ff; }
.red { color: #ff3333; }

.fighter-name {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
    flex-grow: 1; /* Stretch to fill remaining space */
    width: 330px; /* Fixed width: 400px - 60px (score) - 10px (gap) */
}

#blueFighterName, #redFighterName {
    color: #0099ff;
    font-size: 1.2em;
    height: 40px;
    padding: 10px;
    margin: 0;
}

#redFighterName {
    color: #ff3333;
}

.timer-round-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#timer {
    font-size: 2em;
    color: #333;
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid #666;
    background: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#roundSelector {
    font-size: 1.5em;
    padding: 5px;
    border-radius: 8px;
    border: 2px solid #666;
    background: #e0e0e0;
}

#swapButton {
    font-size: 1.5em;
    padding: 5px;
    border-radius: 8px;
    border: 2px solid #666;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.swap-blue-arrow { color: #0099ff; font-size: 1.2em; font-weight: bold; }
.swap-red-arrow { color: #ff3333; font-size: 1.2em; font-weight: bold; }

/* Graph Container - Updated for Middle Position */
#graphContainer {
    margin: 10px auto;
    width: 100%;
    max-width: 600px;
}

.graph-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.graph {
    background-color: #1A1A1A;
    width: 45%;
    height: 120px; /* Shorter height to fit in the middle */
    min-width: 250px;
    border-radius: 6px;
    border: 1px solid #444;
}

/* Button Container */
#buttonContainer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin: 5px auto 0;
}

.fighter-button {
    width: 100%;
    max-width: 150px;
    height: 80px;
    border: 1px solid;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 0;
    transition: transform 0.1s;
    flex-shrink: 1;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
}

.blue-button {
    background-color: #0099ff;
    border-color: #0099ff;
}

.red-button {
    background-color: #ff3333;
    border-color: #ff3333;
}

.fighter-button:hover { transform: translateY(-2px); }
.fighter-button:active { transform: translateY(2px); }

#controlButtonContainer {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-grow: 1;
    flex-shrink: 1;
}

#controlButtonContainer button {
    flex: 1;
    max-width: 80px;
    padding: 8px;
    background-color: #666;
    border: 1px solid #666;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.1s;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
}

#controlButtonContainer button:hover { transform: translateY(-2px); }
#controlButtonContainer button:active { transform: translateY(2px); }

/* Bottom Buttons */
#bottomButtons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px auto;
    width: 100%;
    max-width: 600px;
}

#exportCSVButton, #helpButton {
    width: 80%;
    max-width: 300px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid;
    font-size: 1.5em;
    cursor: pointer;
    margin: 0 auto;
    transition: transform 0.1s;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
}

#exportCSVButton {
    background-color: white;
    color: black;
    border-color: white;
}

#helpButton {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#exportCSVButton:hover, #helpButton:hover { transform: translateY(-2px); }
#exportCSVButton:active, #helpButton:active { transform: translateY(2px); }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 20% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

.close {
    color: #000;
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

#editBlueFighterName, #editRedFighterName {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 1.2em;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.dark-grey-button {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.5em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
}

.help-content {
    margin: 10% auto;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;
    text-align: left;
}

.help-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
}

.help-section {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.help-section h3 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    color: #444;
}

.help-section ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.help-section li {
    margin-bottom: 8px;
    line-height: 1.4;
}

#dismissHelp {
    margin-top: 15px;
    padding: 8px 16px;
    font-size: 1.2em;
}

/* Notification */
#notificationContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 999;
}

/* Media Queries for Portrait */
@media (max-width: 768px) {
    #topSection { gap: 13.5px; }
    .score-name-row { gap: 10px; }
    .timer-round-row { grid-template-columns: 1fr 1fr 1fr; }
    .score {
        width: 50px;
        height: 35px;
        font-size: 1.8em;
    }
    .fighter-name {
        font-size: 1.5em;
        height: 35px;
        width: 340px; /* 400px - 50px (score) - 10px (gap) */
    }
    #blueFighterName, #redFighterName {
        font-size: 1.5em;
        height: 35px;
    }
    #buttonContainer {
        flex-direction: row;
        padding: 0 5px;
    }
    .fighter-button {
        max-width: 120px;
        height: 60px;
    }
    #controlButtonContainer button {
        max-width: 60px;
        padding: 5px;
        font-size: 0.9em;
    }
    #swapButton {
        font-size: 1.2em;
        padding: 5px;
    }
    .graph {
        width: 90%;
        height: 100px;
    }
    #exportCSVButton, #helpButton { width: 90%; font-size: 1.2em; }
    
    /* Adjust graph layout for mobile */
    .graph-row {
        flex-direction: column;
        align-items: center;
    }
}

/* Timer Selection Modal */
#timerModal .modal-content {
    max-width: 400px;
}

.timer-options {
    display: flex;
    flex-direction: column; /* Changed from row to column */
    gap: 10px;
    margin: 20px 0;
}

.timer-option {
    background-color: #333;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 1.5em;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    width: 80%; /* Added to control width */
    margin: 0 auto; /* Center the buttons */
}

.timer-option:hover {
    background-color: #555;
    transform: translateY(-2px);
}

.timer-option:active {
    transform: translateY(2px);
}

/* Make timer look clickable */
#timer {
    cursor: pointer;
    position: relative;
}

#timer::after {
    content: "⌄";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.7;
}


























.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 2147483645;
  box-sizing: border-box;
  width: 100%;

  background-color: #F1F6F4;
}

.cookie-consent-banner__inner {     
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 0;
}

.cookie-consent-banner__copy { 
  margin-bottom: 16px;
}

.cookie-consent-banner__actions {    
}

.cookie-consent-banner__header {
  margin-bottom: 8px;
  
  font-family: "CeraPRO-Bold", sans-serif, arial;
  font-weight: normal;
  font-size: 16px;
  line-height: 24px;
}

.cookie-consent-banner__description {
  font-family: "CeraPRO-Regular", sans-serif, arial;
  font-weight: normal;
  color: #838F93;
  font-size: 16px;
  line-height: 24px;
}

.cookie-consent-banner__cta {
  box-sizing: border-box;
  display: inline-block;
  min-width: 164px;
  padding: 11px 13px;
    
  border-radius: 2px;
  
  background-color: #2CE080;
   
  color: #FFF;
  text-decoration: none;
  text-align: center;
  font-family: "CeraPRO-Regular", sans-serif, arial;
  font-weight: normal;
  font-size: 16px;
  line-height: 20px;
}

.cookie-consent-banner__cta--secondary { 
  padding: 9px 13px;
  
  border: 2px solid #3A4649;
  
  background-color: transparent;
  
  color: #2CE080;
}

.cookie-consent-banner__cta:hover {
  background-color: #20BA68;
}

.cookie-consent-banner__cta--secondary:hover {
  border-color: #838F93;
    
  background-color: transparent;
  
  color: #22C870;
}

.cookie-consent-banner__cta:last-child {
  margin-left: 16px;
}



.parent {
  display: flex;
  justify-content: center;
}