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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #d94d4d, #ff5757);
    color: #fff;
    min-height: 100vh;
    transition: background-color 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 0.5rem;
}

.logo-text {
    color: #fff;
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
}

.nav-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.nav-btn:hover {
    background: rgba(255,255,255,0.25);
}

.timer-section {
    width: 100%;
    max-width: 500px;
    background: rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    text-align: center;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.mode-btn.active {
    border: 2px solid #fff;
    background: rgba(255, 255, 255, 0.3);
}

.time-display {
    font-size: 5rem;
    font-weight: bold;
    margin: 1rem 0;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.8rem 0;
}

.start-btn, .reset-btn {
    background: #fff;
    color: #d94d4d;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.start-btn:hover, .reset-btn:hover {
    transform: translateY(-2px);
    background: #f8f8f8;
}

.progress-bar {
    width: 100%;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    margin-top: 1.2rem;
    height: 10px;
    overflow: hidden;
}
.progress-inner {
    width: 0%;
    height: 100%;
    background: #fff;
    border-radius: 6px;
    transition: width 0.5s linear;
}

.quote {
    margin-top: 1rem;
    font-size: 1rem;
    font-style: italic;
    opacity: 0.8;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.modal.hidden {
    display: none;
}
.modal-content {
    background: #fff;
    color: #333;
    padding: 1.5rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.modal-header button {
    border: none;
    background: none;
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-content input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin: 0.4rem 0;
    outline: none;
}

.save-settings-btn, .save-login-btn {
    width: 100%;
    padding: 0.7rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    margin-top: 1rem;
    cursor: pointer;
}
.color-options {
    margin-top: 1rem;
}
.color-options label {
    margin-right: 1rem;
}
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nav-buttons {
        margin-top: 0.5rem;
    }

    .timer-section {
        max-width: 90%;
        padding: 1rem 1rem;
    }

    .time-display {
        font-size: 3.5rem;
    }

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

    .start-btn, .reset-btn {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .timer-section {
        margin-top: 1rem;
        max-width: 95%;
    }

    .time-display {
        font-size: 2.5rem;
    }

    .mode-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .mode-btn {
        flex: 1 1 40%;
        margin-top: 0.3rem;
    }

    .control-buttons {
        flex-direction: column;
        gap: 0.6rem;
    }

    .start-btn, .reset-btn {
        width: 100%;
        font-size: 0.9rem;
    }

    .quote {
        font-size: 0.85rem;
    }
}
