@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Roboto+Mono:wght@500&family=Poppins:wght@700&display=swap');

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

body {
    background: linear-gradient(135deg, #1a1f25 0%, #2c3e50 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 95%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stopwatch {
    text-align: center;
}

.display {
    font-family: 'Roboto Mono', monospace;
    font-size: 3.2rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(82, 190, 255, 0.3);
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

#startBtn {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    border: none;
}

#pauseBtn {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    border: none;
}

#resetBtn {
    background: linear-gradient(135deg, #e44d26 0%, #f16529 100%);
    border: none;
}

#lapBtn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.laps {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.laps::-webkit-scrollbar {
    width: 8px;
}

.laps::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.laps::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.laps h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

#lapTimes {
    list-style: none;
}

#lapTimes li {
    color: white;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin: 0.3rem 0 1rem 0;
    padding: 0.3rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #a5d6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    animation: titleFadeIn 0.8s ease-out;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
/* Large devices (laptops/desktops) */
@media (min-width: 1024px) {
    .container {
        padding: 2rem;
        max-width: 450px;
    }

    .site-title {
        font-size: 2.5rem;
        margin: 0.4rem 0 1.2rem 0;
        padding: 0.4rem;
    }

    .display {
        font-size: 3.8rem;
    }

    .controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Medium devices (tablets) */
@media (max-width: 1023px) and (min-width: 768px) {
    .container {
        padding: 1.8rem;
        max-width: 400px;
    }

    .site-title {
        font-size: 2.2rem;
        margin: 0.3rem 0 1rem 0;
        padding: 0.3rem;
    }

    .display {
        font-size: 3.4rem;
    }
}

/* Small tablets and large phones */
@media (max-width: 767px) and (min-width: 481px) {
    .container {
        padding: 1.5rem;
        width: 90%;
    }

    .site-title {
        font-size: 2rem;
        margin: 0.2rem 0 0.8rem 0;
        padding: 0.2rem;
    }

    .display {
        font-size: 3rem;
    }

    .controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .btn {
        padding: 0.8rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 1.2rem;
        width: 95%;
        border-radius: 16px;
    }

    .site-title {
        font-size: 1.8rem;
        margin: 0.2rem 0 0.6rem 0;
        padding: 0.2rem;
    }

    .display {
        font-size: 2.6rem;
        margin-bottom: 1.5rem;
    }

    .controls {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .laps {
        padding: 1rem;
        max-height: 180px;
    }

    #lapTimes li {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.6rem;
        font-size: 0.85rem;
    }
}

/* Extra small phones */
@media (max-width: 320px) {
    .container {
        padding: 1rem;
    }

    .site-title {
        font-size: 1.6rem;
        margin: 0.15rem 0 0.5rem 0;
        padding: 0.15rem;
    }

    .display {
        font-size: 2.2rem;
        margin-bottom: 1.2rem;
    }

    .btn {
        padding: 0.7rem;
        font-size: 0.85rem;
    }
}

/* Landscape mode for phones */
@media (max-height: 480px) and (orientation: landscape) {
    .container {
        padding: 1rem;
        max-height: 95vh;
        overflow-y: auto;
    }

    .site-title {
        font-size: 1.6rem;
        margin: 0.15rem 0 0.4rem 0;
        padding: 0.15rem;
    }

    .display {
        font-size: 2.4rem;
        margin-bottom: 1rem;
    }

    .controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.6rem;
    }

    .laps {
        max-height: 120px;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .display {
        text-shadow: 0 0 15px rgba(82, 190, 255, 0.25);
    }
} 