/* Basic Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Disable tap highlight on mobile */
}

html, body {
    height: 100%;
    overflow: hidden; /* Prevents scrolling */
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Aptos replacement */
    background-color: #a0d2eb; /* Light Blue Background */
    color: #333;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px; /* Small border around usable screen */
}

.app-container {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    width: 100%;
    height: 100%;
    max-width: 800px; /* Max width for tablets/desktops, scales down for mobile */
    align-items: stretch; /* Children will stretch to fill width */
    gap: 10px; /* Space between elements */
}

/* Buzzer Buttons Styling */
.buzzer-button {
    flex-grow: 1; /* Each buzzer takes up available vertical space */
    flex-basis: 0; /* Distribute space evenly */
    font-size: clamp(1.8rem, 7vw, 2.8rem); /* Responsive font size for taller buttons */
    font-weight: bold;
    border-radius: 25px; /* Nice rounded edges */
    border: 3px solid black; /* Small black border */
    cursor: pointer;
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    
    transition: background-color 0.2s ease-in-out, transform 0.1s ease, box-shadow 0.2s ease-in-out;
    user-select: none; /* Prevent text selection on rapid clicks */
    overflow: hidden; /* Ensure glow doesn't break layout too much */
    position: relative; /* For potential pseudo-elements or positioning text */
    min-height: 150px; /* Minimum height for very short screens */
}

.buzzer-button .button-text {
    pointer-events: none; /* Ensure clicks go to the button */
}

/* Player Specific Colors (can be overridden by JS Control Panel) */
#buzzer1 { background-color: #e74c3c; /* Pomegranate Red */ }
#buzzer1:hover:not(.winner):not(.game-over) { background-color: #c0392b; }

#buzzer2 { background-color: #3498db; /* Peter River Blue */ }
#buzzer2:hover:not(.winner):not(.game-over) { background-color: #2980b9; }

/* Button Click Animation */
.buzzer-button:active:not(.game-over),
.reset-button:active {
    transform: translateY(10px);
}

/* Winning Button Styles */
.buzzer-button.winner {
    /* Brighten up and glow are applied by JS using control panel colors */
    animation: winnerGlow 1.5s infinite alternate;
}

.buzzer-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Vibrating Glow Animation for Winner */
@keyframes winnerGlow {
  from {
    box-shadow: 0 0 5px #fff, 
                0 0 10px #fff, 
                0 0 15px var(--glow-color, #ffdd57), 
                0 0 20px var(--glow-color, #ffdd57),
                0 0 25px var(--glow-color, #ffdd57);
  }
  to {
    box-shadow: 0 0 10px #fff, 
                0 0 20px #fff, 
                0 0 30px var(--glow-color, #ffdd57), 
                0 0 40px var(--glow-color, #ffdd57),
                0 0 50px var(--glow-color, #ffdd57);
  }
}

/* Middle Controls Area */
.middle-controls {
    display: flex;
    flex-direction: column; /* Stack "Buzzer" text above Reset button */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    padding: 10px 0; /* Add some vertical padding */
    flex-shrink: 0; /* Prevent this area from shrinking */
}

.buzzer-label-text {
    font-family: 'Gabriela', serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem); /* Responsive font size */
    color: #2c3e50; /* Dark Slate Blue */
    text-shadow: 1px 1px 1px rgba(255,255,255,0.7), 1px 1px 2px rgba(0,0,0,0.2);
    margin-bottom: 8px; /* Space between "Buzzer" text and Reset button */
}

/* Reset Button Styling */
.reset-button {
    padding: 10px 20px; /* Slightly smaller padding */
    font-size: clamp(0.9rem, 3.5vw, 1.3rem);
    font-weight: bold;
    border-radius: 15px;
    border: 2px solid black;
    cursor: pointer;
    background-color: #7f8c8d; /* Asbestos Grey */
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    min-width: 120px; /* Minimum width for the reset button */
}

.reset-button:hover {
    background-color: #95a5a6; /* Clouds Grey */
}