:root {
    --primary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --background-color: #ecf0f1;
    --button-hover: #3498db;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --nav-height: 60px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--nav-height);
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: white;
    box-shadow: 0 2px 4px var(--shadow-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--accent-color);
}

.nav-logo i {
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.stopwatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

canvas {
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 1rem;
}

#digital-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover:not(:disabled) {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn i {
    font-size: 1.1rem;
}

.btn.start { background-color: #27ae60; }
.btn.stop { background-color: #e74c3c; }
.btn.lap { background-color: #f39c12; }
.btn.reset { background-color: #7f8c8d; }

.lap-times {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.lap-times h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.lap-list {
    max-height: 300px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.lap-item:hover {
    background-color: #f8f9fa;
}

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

.lap-number {
    font-weight: 600;
    color: var(--primary-color);
}

.lap-time {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-color);
}

footer {
    margin-top: 3rem;
    text-align: center;
}

.keyboard-shortcuts {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: inline-block;
}

.keyboard-shortcuts h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.keyboard-shortcuts ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

kbd {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-family: 'Courier New', Courier, monospace;
    margin: 0 0.2rem;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    #digital-display {
        font-size: 2rem;
    }

    .controls {
        flex-wrap: wrap;
    }

    .btn {
        padding: 0.5rem 1rem;
    }

    .keyboard-shortcuts ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}
