* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border: 1px solid #ddd;
    padding: 30px;
    max-width: 500px;
    width: 100%;
}

.title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.timer-display {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    padding: 20px;
    border: 1px solid #ccc;
}

.lap-timer-display {
    text-align: center;
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 30px;
    font-family: 'Courier New', monospace;
    padding: 10px;
    border: 1px solid #ccc;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
}

.btn:hover {
    background: #f0f0f0;
}

.btn:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.start-btn.running {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.start-btn.running:hover {
    background: #ff5252;
}

.stats {
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 20px;
}

.stats h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    border: 1px solid #eee;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
}

.laps-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
}

.laps-header {
    background: #f8f8f8;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    position: sticky;
    top: 0;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}

.lap-item:last-child {
    border-bottom: none;
}

.lap-number {
    font-weight: bold;
    color: #333;
    min-width: 60px;
}

.lap-time {
    font-family: 'Courier New', monospace;
    color: #333;
}

.no-laps {
    text-align: center;
    color: #999;
    padding: 30px;
}

/* レスポンシブデザイン */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .timer-display {
        font-size: 2rem;
        padding: 15px;
    }

    .lap-timer-display {
        font-size: 1.2rem;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 200px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}