:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --button-hover: #3a5a80;
    --progress-bg: #e0e0e0;
}

[data-theme="dark"] {
    --primary-color: #5e81ac;
    --secondary-color: #4c566a;
    --accent-color: #88c0d0;
    --text-color: #eceff4;
    --bg-color: #2e3440;
    --card-bg: #3b4252;
    --button-hover: #81a1c1;
    --progress-bg: #434c5e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}


.back-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.timer-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
}

.timer-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.timer {
    font-size: 96px;
    font-weight: 300;
    margin: 30px 0;
    color: var(--primary-color);
}

.progress-container {
    width: 100%;
    height: 10px;
    background-color: var(--progress-bg);
    border-radius: 5px;
    margin: 30px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    width: 100%;
    border-radius: 5px;
    transition: width 0.5s linear;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.time-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.time-option {
    padding: 10px 25px;
    border-radius: 50px;
    background-color: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.time-option.active {
    background-color: var(--primary-color);
    color: white;
}

.container button {
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

#start {
    background-color: var(--primary-color);
    color: white;
}

#start:hover:not(:disabled) {
    background-color: var(--button-hover);
}

#stop {
    background-color: #e74c3c;
    color: white;
}

#stop:hover:not(:disabled) {
    background-color: #c0392b;
}

#reset {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

#reset:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    text-decoration: none;
}

@media (max-width: 768px) {
    .timer {
        font-size: 72px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        max-width: 250px;
    }

    .time-options {
        flex-direction: column;
        align-items: center;
    }

    .time-option {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .timer {
        font-size: 48px;
    }

    .timer-card {
        padding: 30px 20px;
    }
}