html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #1d2630;
    color: white;
    overflow-x: hidden;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    width: 100%;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1em 2em;
    background: rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    text-transform: uppercase;
    font-weight: bold;
    flex-shrink: 0;
}

#headerText a {
    color: white;
    text-decoration: none;
}

.top-nav {
    display: flex;
    gap: 1.5em;
}

.top-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5em 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.top-nav a:hover, .top-nav a.active {
    color: #a3dafd;
    border-bottom-color: #a3dafd;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.github-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.github-text {
    display: inline-block;
}

.timer-section {
    display: none; /* Hidden by default, shown by JS */
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    padding: 2rem 1rem;
}

.timer-section.active {
    display: flex;
}

.glass-container {
    background: rgba(50, 60, 75, 0.5);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2.5rem;
    width: auto;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.timer-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.timer-display span {
    font-size: 5.5rem;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(163, 218, 253, 0.7);
    color: #e0f7ff;
}

.presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.preset-btn small {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.save-preset-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#save-preset-btn {
    background: #28a745;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

#save-preset-btn:hover {
    background: #218838;
}

#custom-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.custom-time-setter {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ccc;
    width: 100%;
    justify-content: center;
}

.time-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.custom-time-setter input[type="text"] {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
}

.custom-time-setter button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.6em 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 40px;
}

.custom-time-setter button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.countdown-label {
    display: none;
}
.controls button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    min-width: 100px;
}

.controls button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1em;
        justify-content: space-between;
    }

    #headerText {
        flex-grow: 1;
    }

    .top-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        background: rgba(29, 38, 48, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 100;
    }

    .top-nav.active {
        display: flex;
    }

    .top-nav a {
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .github-link {
        justify-content: center;
    }

    .github-icon {
        display: inline-block; /* Show icon on mobile */
    }

    .github-text {
        display: none; /* Hide text on mobile */
    }

    .hamburger-menu {
        display: block;
        z-index: 101;
    }

    .glass-container {
        padding: 1.5rem;
        margin: 0 1rem;
        gap: 1rem;
    }

    .timer-title {
        font-size: 1.5rem;
    }

    .timer-display span {
        font-size: 4rem;
    }

    .presets {
        gap: 0.5rem;
    }

    .custom-time-setter {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .time-inputs {
        justify-content: center;
        width: 100%;
    }

    .custom-time-setter button {
        width: 100%;
    }
    .countdown-label {
        display: block;
    }
    .controls {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }

    .controls button {
        width: 100%;
    }
}
