body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.header {
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    z-index: 2;
}

.header h1 {
    margin: 0;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    z-index: 2;
}

.footer p {
    margin: 0;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.background-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, #ff6e7f, #bfe9ff);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    z-index: -1;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

.stopwatch-container {
    position: relative;
    z-index: 1;
    text-align: center;
}


@keyframes titleFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stopwatch {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#display {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.controls button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #0056b3;
}

#laps {
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

#laps li {
    margin: 5px 0;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
