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

body {
    font-family: 'Geologica', sans-serif;
    min-height: 100vh;
    background-color: #f5f5f5;
    transition: background-color 0.5s ease, color 0.5s ease;
    color: #333;
}

body.dark {
    background-color: #121212;
    color: #e0e0e0;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    pointer-events: none;
    z-index: 1000;
}

.top-left-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: auto;
}

.control-button {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.9;
}

body.dark .control-button {
    background: rgba(30, 30, 30, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.control-button:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

body.dark .control-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.language-toggle img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.language-toggle img:hover {
    opacity: 1;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.theme-toggle button:hover {
    opacity: 1;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 120px 20px 60px;
    gap: 60px;
}

.hero {
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 500;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.85;
}

.container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 40px 30px;
    border-radius: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 560px;
    text-align: center;
}

body.dark .container {
    background: rgba(30, 30, 30, 0.8);
}

.timer-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 40px auto;
}

.progress-ring__circle-bg {
    stroke: #e0e0e0;
    stroke-width: 12;
    fill: transparent;
}

body.dark .progress-ring__circle-bg {
    stroke: #333;
}

.progress-ring__circle {
    stroke: #4caf50;
    stroke-width: 12;
    fill: transparent;
    stroke-dasharray: 880;
    stroke-dashoffset: 880;
    transition: stroke-dashoffset 1s linear;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4.8rem;
    font-weight: 300;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 40px 0 30px;
}

button {
    background: rgba(76, 175, 80, 0.15);
    color: #333;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

body.dark button {
    background: rgba(100, 200, 120, 0.2);
    color: #e0e0e0;
}

button:hover {
    background: #4caf50;
    color: white;
    transform: translateY(-3px);
}

.primary-button {
    background: #4caf50;
    color: white;
    padding: 18px 44px;
    margin: 0 15px;
}

.controls {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.custom-session, .task-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 30px 0;
    align-items: center;
}

input[type="text"], input[type="number"] {
    padding: 14px;
    border-radius: 24px;
    border: 1px solid #ddd;
    background: rgba(255,255,255,0.6);
    width: 100%;
    max-width: 340px;
    font-size: 1.1rem;
}

body.dark input {
    background: rgba(255,255,255,0.1);
    border-color: #444;
    color: white;
}

#taskList {
    list-style: none;
    margin-top: 20px;
    width: 100%;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 24px;
    padding: 14px;
    margin-bottom: 12px;
}

body.dark .task-item {
    background: rgba(255,255,255,0.1);
}

.task-item span.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.delete-button {
    margin-left: auto;
    background: #ff5252;
    padding: 8px 16px;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .timer-wrapper {
        width: 260px;
        height: 260px;
    }
    .timer-display {
        font-size: 3.8rem;
    }
    .preset-buttons {
        gap: 12px;
    }
    .controls {
        flex-direction: column;
        gap: 20px;
    }
    .primary-button {
        margin: 0;
    }
}