/* General Styles */
body {
    background: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background: #1e1e1e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
}

h1 {
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 3em;
    font-weight: bold;
}

/* Buttons */
button {
    padding: 12px 25px;
    font-size: 16px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin: 10px 5px;
    width: auto;
}

button:hover {
    background: #555;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #2a2a2a;
    cursor: not-allowed;
    opacity: 0.5;
}

button:disabled:hover {
    transform: none;
}

.btn {
    padding: 12px 25px;
    font-size: 16px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin: 10px 5px;
    width: auto;
}

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

.btn:active {
    transform: translateY(0);
}

/* Test Area */
.test-area {
    background: #1e1e1e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.1s;
}

.test-area.waiting {
    background: #2a2a2a;
}

.test-area.ready {
    background: #10b981;
}

.test-area.too-early {
    background: #ef4444;
}

.test-area.clicked {
    background: #6366f1;
}

.message {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.stat-box {
    background: #1e1e1e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
}

.stat-box h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 1.1em;
}

.stat-box p {
    margin: 0;
    font-size: 1.5em;
    color: #e0e0e0;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

/* History */
.history {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.history-item:last-child {
    border-bottom: none;
}

/* Back Button */
.back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #666;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
}

.back-btn:hover {
    background: #777;
    transform: translateY(-2px);
    text-decoration: none;
    color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        width: 95%;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
}