* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.timer-display {
    font-size: 2.5rem;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    color: #2c3e50;
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    padding: 15px 0;
    z-index: 100;
    border-bottom: 2px solid #ddd;
}

button {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    min-width: 120px;
}

.btn-start {
    background-color: #2ecc71;
    color: white;
}

.btn-start.active {
    background-color: #3498db;
    color: white;
}

.btn-pause {
    background-color: #2ecc71;
    color: white;
}

.btn-pause.active {
    background-color: #3498db;
    color: white;
}

.btn-finish {
    background-color: #2ecc71;
    color: white;
}

.btn-finish.pressed {
    background-color: #e74c3c;
    color: white;
}

.btn-reset {
    background-color: #95a5a6;
    color: white;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.7;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #3498db;
    color: white;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

.lap-time {
    font-weight: bold;
    color: #2c3e50;
}

.pause-time {
    color: #e74c3c;
}

.net-time {
    color: #27ae60;
}

.total-time {
    color: #3498db;
}

.status-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.running {
    background-color: #2ecc71;
}

.paused {
    background-color: #f39c12;
}

.stopped {
    background-color: #e74c3c;
}

.instructions {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    position: relative;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

.toggle-instructions {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #3498db;
    padding: 5px;
}

.instructions.hidden .instructions-content {
    display: none;
}

.instructions.hidden .toggle-instructions::after {
    content: "Показать инструкцию";
    font-size: 0.9rem;
}

.instructions:not(.hidden) .toggle-instructions::after {
    content: "Скрыть инструкцию";
    font-size: 0.9rem;
}

.action-indicator {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
    display: none;
}

#finish-indicator {
    background-color: #ffeaa7;
    color: #2d3436;
}

#reset-indicator {
    background-color: #dfe6e9;
    color: #2d3436;
}

.summary {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-label {
    font-weight: bold;
    color: #2c3e50;
}

.summary-value {
    color: #3498db;
    font-weight: bold;
}

/* Стиль заголовков таблиц */
#lapsTableContainer h3,
#summaryTableContainer h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

/* Кнопка экспорта */
.btn.export {
    background-color: #607d8b;
    color: white;
}

