:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    --progress-bg: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 2rem 0;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 1rem;
}

.top-nav {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

#menu-btn {
    border: none;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#menu-btn:hover {
    opacity: 1;
    background: transparent;
}

#menu-btn svg {
    width: 32px;
    height: 32px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

#round-display {
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

#timer-display {
    font-size: clamp(5rem, 20vw, 8rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 0.9;
    margin-bottom: 1rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--progress-bg);
    margin: 2rem 0;
    border-radius: 4px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent-color);
    transition: width 0.1s linear;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 3rem;
}

button {
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

button:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

button svg {
    width: 28px;
    height: 28px;
}

#play-pause-btn {
    padding: 1.2rem;
}

#play-pause-btn svg {
    width: 40px;
    height: 40px;
}

.hidden {
    display: none;
}

/* Menu Drawer Styles */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

#menu-drawer {
    position: absolute;
    right: 0;
    top: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: #111;
    padding: 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    text-align: left;
}

#menu-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#menu-overlay.hidden #menu-drawer {
    transform: translateX(100%);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.menu-header h2 {
    font-weight: 900;
    font-size: 1.5rem;
}

#close-menu-btn {
    border: none;
    font-size: 2.5rem;
    padding: 0;
    line-height: 1;
    opacity: 0.5;
}

#close-menu-btn:hover {
    background: transparent;
    color: white;
    opacity: 1;
}

.menu-section {
    margin-bottom: 3rem;
}

.menu-section h3 {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.setting-item input {
    width: 100%;
    background: #222;
    border: 1px solid #333;
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
}

#save-settings {
    width: 100%;
    border-radius: 8px;
    font-weight: 900;
    padding: 1rem;
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    margin-top: 5rem;
    padding: 2rem;
    text-align: left;
    border-top: 1px solid #333;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.about-section:hover {
    opacity: 0.8;
}

.about-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.about-section p {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.about-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.about-section ul {
    font-size: 0.85rem;
    list-style: none;
    opacity: 0.7;
    margin-bottom: 1rem;
    padding-left: 1.2rem;
}

.about-section li {
    margin-bottom: 0.5rem;
}

.hosting-note {
    font-size: 0.7rem !important;
    opacity: 0.3 !important;
    margin-top: 2rem;
}

/* Transitions for phase changes */
.rest-phase {
    --bg-color: #ffffff;
    --text-color: #000000;
    --progress-bg: #e0e0e0;
}

body.rest-phase {
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.rest-phase button {
    border-color: #000000;
}

body.rest-phase #menu-btn svg {
    color: #000;
}

body.rest-phase #menu-drawer {
    background: #f5f5f5;
    color: #000;
}

body.rest-phase .setting-item input {
    background: #fff;
    border-color: #ddd;
    color: #000;
}

body.rest-phase .about-section {
    border-top-color: #ccc;
}