* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background-color: white;
    transition: background-color 0.3s ease;
}

body.game-active {
    background-color: #4CAF50; /* Green */
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

#header {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    z-index: 10;
}

#video-container {
    width: 66%;
    height: 66%;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

#youtube-video {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#settings-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.setting-group {
    margin-bottom: 10px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.setting-group select,
.setting-group input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
    cursor: pointer;
}

#reaction-key-input {
    text-transform: uppercase;
    text-align: center;
    font-weight: bold;
}

#stats-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 20;
}

#reaction-times-list {
    margin-bottom: 10px;
}

.reaction-time-item {
    padding: 5px;
    margin: 3px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.reaction-time-item.fail {
    color: #d32f2f;
    font-weight: bold;
}

#average-time {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #4CAF50;
    font-size: 16px;
    font-weight: bold;
    color: #1976D2;
}

#game-status {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 20;
}

#current-status {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

#strikes-count {
    font-size: 16px;
    color: #666;
}

/* Scrollbar styling */
#stats-panel::-webkit-scrollbar {
    width: 8px;
}

#stats-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#stats-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#stats-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}
