* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e4e4e7;
    overflow-x: hidden;
}

.container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.card {
    background: rgba(30, 30, 46, 0.95);
    border-radius: 24px;
    padding: 40px 32px;
    width: 420px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 40px rgba(94, 234, 212, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 
        0 24px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 50px rgba(94, 234, 212, 0.15);
}

.title-section {
    margin-bottom: 24px;
}

.session-title {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 18px;
    color: #e4e4e7;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.session-title::placeholder {
    color: rgba(228, 228, 231, 0.4);
}

.session-title:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5eead4;
    box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}

.subtasks-section {
    margin-bottom: 32px;
}

.add-subtask-btn {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    color: rgba(228, 228, 231, 0.6);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.add-subtask-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #e4e4e7;
}

.subtasks-list {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.subtasks-list:empty {
    display: none;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtask-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.subtask-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.subtask-checkbox:checked {
    background: #5eead4;
    border-color: #5eead4;
}

.subtask-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #1a1a2e;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.subtask-text {
    flex: 1;
    background: transparent;
    border: none;
    color: #e4e4e7;
    font-size: 14px;
    outline: none;
}

.subtask-text.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

.subtask-delete {
    background: transparent;
    border: none;
    color: rgba(228, 228, 231, 0.3);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.subtask-delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.timer-section {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    position: absolute;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: #5eead4;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 628.32;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(94, 234, 212, 0.4));
}

.timer-display {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e4e4e7;
    text-shadow: 0 0 20px rgba(94, 234, 212, 0.3);
    z-index: 1;
}

.mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 12px;
}

.mode-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(228, 228, 231, 0.5);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-tab:hover {
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab.active {
    background: rgba(94, 234, 212, 0.15);
    color: #5eead4;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 100%);
    border: none;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 48px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(94, 234, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(94, 234, 212, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(228, 228, 231, 0.7);
    font-size: 14px;
    font-weight: 500;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e4e7;
}

.session-counter {
    text-align: center;
    font-size: 14px;
    color: rgba(228, 228, 231, 0.5);
    margin-bottom: 24px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.session-counter span {
    color: #5eead4;
    font-weight: 600;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 16px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-btn {
    background: transparent;
    border: none;
    color: rgba(228, 228, 231, 0.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-btn:hover {
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.1);
}

.volume-btn.muted {
    color: #f87171;
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #5eead4;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-value {
    font-size: 12px;
    color: rgba(228, 228, 231, 0.5);
    min-width: 35px;
}

.toggle-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #e4e4e7;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-label input:checked + .toggle-slider {
    background: rgba(94, 234, 212, 0.3);
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: #5eead4;
}

.toggle-text {
    font-size: 13px;
    color: rgba(228, 228, 231, 0.6);
}

.test-notification-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(228, 228, 231, 0.6);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.test-notification-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e4e7;
    border-color: rgba(255, 255, 255, 0.2);
}

.test-notification-btn:active {
    transform: scale(0.95);
}

.keyboard-hint {
    text-align: center;
    font-size: 12px;
    color: rgba(228, 228, 231, 0.3);
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
}

.subtasks-list::-webkit-scrollbar {
    width: 4px;
}

.subtasks-list::-webkit-scrollbar-track {
    background: transparent;
}

.subtasks-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.card.short-break .progress-ring-fill {
    stroke: #a78bfa;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.4));
}

.card.short-break .btn-primary {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
}

.card.short-break .mode-tab.active {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

.card.long-break .progress-ring-fill {
    stroke: #fb923c;
    filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.4));
}

.card.long-break .btn-primary {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 4px 20px rgba(251, 146, 60, 0.3);
}

.card.long-break .mode-tab.active {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

@media (max-width: 480px) {
    .card {
        width: 100%;
        padding: 32px 20px;
        border-radius: 20px;
    }
    
    .timer-display {
        font-size: 48px;
    }
    
    .mode-tabs {
        flex-wrap: wrap;
    }
}
