body {
    margin: 0;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
}

#testContainer {
    width: 100%;
    max-width: 840px;
}

#stats {
    display: flex;
    justify-content: space-between;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-box {
    text-align: center;
    min-width: 110px;
}

.stat-value {
    font-size: 26px;
    font-weight: bold;
    color: #2c3e50;
    margin: 5px 0;
}

#interactive-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
    margin-top: 20px;
}

#clickArea, #chartContainer {
    width: 100%;
    height: 360px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

#clickArea {
    background: linear-gradient(145deg, #f5f7fa, #e4e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    user-select: none;
}

#chartContainer {
    background-color: white;
    position: relative;
    max-width: 800px;
    padding: 20px;
}

#controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 20px;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

#resetBtn {
    background-color: #e74c3c;
    color: white;
}

#resetBtn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.time-btn {
    background-color: #3498db;
    color: white;
    margin: 0 8px;
}

.time-btn.active {
    background-color: #2980b9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.time-btn:hover {
    transform: translateY(-2px);
}

#instructions {
    font-size: 20px;
    color: #4a5568;
    text-align: center;
    padding: 0 20px;
    font-weight: 500;
}

#clickArea.waiting {
    background: linear-gradient(145deg, #f5f7fa, #e4e7eb);
}

#clickArea.active {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
}

#clickArea.finished {
    background: linear-gradient(145deg, #ffebee, #ffcdd2);
    cursor: not-allowed;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#interactive-container {
    animation: fadeIn 0.5s ease-out;
}

/* Добавляем в конец файла */
#savedResults {
    width: 800px;
    margin-top: 30px;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

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

.result-number {
    color: #7f8c8d;
    width: 30px;
}

.result-name {
    color: #34495e;
    width: 120px;
}

.result-date {
    color: #34495e;
    flex: 1;
}

.result-stats {
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.result-cps {
    color: #e74c3c;
    font-weight: bold;
    width: 80px;
    text-align: right;
}

.result-category {
    color: #e74c3c;
    font-weight: bold;
    width: 120px;
    text-align: right;
}

/* Обновленные стили для модального окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

#modalMessage {
    margin-bottom: 15px;
}

#modalMessage p {
    margin: 5px 0;
    font-size: 16px;
    color: #2c3e50;
}

#testResult {
    font-weight: bold;
}

#clickCategory {
    color: #e74c3c;
    font-style: italic;
}

#playerName {
    padding: 10px;
    font-size: 16px;
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
}

.modal-buttons button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
}

#saveNameBtn {
    background-color: #3498db;
    color: white;
}

#saveNameBtn:hover {
    background-color: #2980b9;
}

#skipNameBtn {
    background-color: #7f8c8d;
    color: white;
}

#skipNameBtn:hover {
    background-color: #6c7a89;
}

/* Стили для контейнера кнопки очистки */
.clear-results-container {
    width: 800px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

#clearResultsBtn {
    background-color: #f1c40f;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

#clearResultsBtn:hover {
    background-color: #d4a017;
    transform: translateY(-2px);
}