@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --pixel-border: 3px;
    --border-radius: 0;
    --transition: all 0.2s ease;
}

.light-theme {
    --bg-primary: #f5e6d3;
    --bg-secondary: #fff8f0;
    --bg-window: #faebd7;
    --border-dark: #8b7355;
    --border-light: #d4c4b0;
    --text-primary: #4a3f36;
    --text-secondary: #6b5d54;
    --block-work: #235c2b;
    --block-work-light: rgba(35, 92, 43, 0.15);
    --block-break: #d97757;
    --block-break-light: rgba(217, 119, 87, 0.15);
    --block-border-work: #235c2b;
    --block-border-break: #d97757;
    --accent-play: #95e77e;
    --accent-warning: #ffd93d;
    --shadow-color: rgba(139, 115, 85, 0.3);
    --progress-bg: #e5d4c1;
    --progress-fill: #95e77e;
    --checkbox-checked: #4ecdc4;
    --btn-hover: #ffe4cc;
}

.dark-theme {
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --bg-window: #2d2d2d;
    --border-dark: #4a4a4a;
    --border-light: #3a3a3a;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --block-work: #4a7c59;
    --block-work-light: rgba(74, 124, 89, 0.15);
    --block-break: #8b6f47;
    --block-break-light: rgba(139, 111, 71, 0.15);
    --block-border-work: #4a7c59;
    --block-border-break: #8b6f47;
    --accent-play: #6ab04c;
    --accent-warning: #f39c12;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --progress-bg: #1a1a1a;
    --progress-fill: #6ab04c;
    --checkbox-checked: #6ab04c;
    --btn-hover: #3a3a3a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.5;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            var(--border-light) 2px,
            var(--border-light) 4px
        );
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-logo {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-shadow: 2px 2px 0 var(--shadow-color);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--accent-play);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.app-container {
    width: 90%;
    max-width: 1200px;
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-dark);
    box-shadow:
        4px 4px 0 var(--shadow-color),
        8px 8px 0 var(--shadow-color),
        12px 12px 0 var(--shadow-color);
    position: relative;
}

.app-header {
    background-color: var(--bg-secondary);
    border-bottom: var(--pixel-border) solid var(--border-dark);
    padding: 0;
}

.title-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-window));
    position: relative;
}

.window-controls {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 15px;
}

.control {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border-dark);
    display: block;
}

.control.close {
    background-color: #ff6b6b;
}

.control.minimize {
    background-color: #ffd93d;
}

.control.maximize {
    background-color: #95e77e;
}

.app-title {
    flex: 1;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow: 2px 2px 0 var(--shadow-color);
}

.theme-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-btn {
    background-color: transparent;
    border: 2px solid var(--border-dark);
    padding: 4px 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-btn:hover {
    background-color: var(--bg-window);
    transform: scale(1.1);
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-btn {
    background: var(--bg-secondary);
    border: var(--pixel-border) solid var(--border-dark);
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.auth-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow:
        4px 4px 0 var(--shadow-color),
        8px 8px 0 rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: var(--pixel-border) solid var(--border-dark);
}

.sign-out-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.hidden {
    display: none !important;
}

.pixel-btn {
    background-color: var(--bg-secondary);
    border: var(--pixel-border) solid var(--border-dark);
    color: var(--text-primary);
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.pixel-btn:hover {
    background-color: var(--btn-hover);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.pixel-btn:active {
    transform: translate(0, 0);
    box-shadow: none;
}


.hidden {
    display: none;
}

.main-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: var(--pixel-border) dashed var(--border-light);
    color: var(--text-primary);
}

.time-blocks-container {
    background-color: var(--bg-secondary);
    border: var(--pixel-border) solid var(--border-dark);
    padding: 20px;
}

.controls-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-light);
    flex-wrap: wrap;
    min-height: 70px;
}

.play-btn {
    background-color: var(--accent-play);
    border-color: var(--border-dark);
    min-width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.play-btn:hover {
    background-color: var(--accent-play);
    opacity: 0.9;
}


.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-primary);
}

.time-separator {
    margin: 0 5px;
    opacity: 0.5;
}

.current-block-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-secondary);
    padding: 5px 10px;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-light);
}

.current-block-type {
    font-weight: bold;
    color: var(--text-primary);
}

.timeline-container {
    margin-bottom: 20px;
}

.timeline-track {
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-dark);
    padding: 0;
    position: relative;
    overflow: visible;
    height: 80px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-blocks {
    display: flex;
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
}


.timeline-block {
    flex: 0 0 auto;
    background-color: var(--bg-window);
    border-left: 3px solid;
    text-align: center;
    transition: var(--transition);
    position: relative;
    cursor: move;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.timeline-block:first-child {
    border-left: 3px solid;
}

.timeline-block:last-child {
    border-right: 3px solid;
}

.timeline-block:hover {
    z-index: 10;
    background-color: var(--bg-secondary);
}

.timeline-block.dragging {
    opacity: 0.5;
    z-index: 100;
}

.timeline-block.drag-over {
    background-color: var(--bg-secondary);
}


.work-block {
    background: linear-gradient(135deg, var(--block-work-light) 0%, var(--block-work-light) 100%);
    border-left-color: var(--block-border-work);
    box-shadow: inset 0 2px 6px rgba(35, 92, 43, 0.1);
}

.work-block:last-child {
    border-right-color: var(--block-border-work);
}

.break-block {
    background: linear-gradient(135deg, var(--block-break-light) 0%, var(--block-break-light) 100%);
    border-left-color: var(--block-border-break);
    box-shadow: inset 0 2px 6px rgba(217, 119, 87, 0.1);
}

.break-block:last-child {
    border-right-color: var(--block-border-break);
}


.block-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 2;
    padding: 4px;
}


.block-type {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    opacity: 0.85;
}

.block-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0;
    opacity: 1;
}

.resize-handle {
    position: absolute;
    width: 16px;
    height: 100%;
    top: 0;
    cursor: ew-resize;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.2s;
}

.resize-handle.left {
    left: -8px;
}

.resize-handle.right {
    right: -8px;
}

.timeline-block:hover .resize-handle {
    opacity: 1;
}

.resize-handle:hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 30px;
    background-color: var(--border-dark);
    border-radius: 2px;
    opacity: 0.6;
}

.timeline-block.resizing {
    z-index: 20;
    box-shadow: 0 0 0 2px var(--border-dark);
}


.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--bg-window);
    border: 2px solid var(--border-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    cursor: pointer;
    display: none;
    z-index: 10;
    padding: 0;
}

.timeline-block:hover .remove-btn {
    display: block;
}

.remove-btn:hover {
    background-color: var(--bg-secondary);
}

.timeline-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.timeline-blocks:not(:empty) + .timeline-placeholder {
    display: none;
}

.timeline-ruler {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 0 3px;
}

.ruler-mark {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ruler-mark::before {
    content: '';
    width: 1px;
    height: 6px;
    background-color: var(--border-light);
    margin-bottom: 2px;
}

.ruler-mark span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-secondary);
    opacity: 0.8;
}

.block-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    transition: width 0.1s linear;
    z-index: 2;
    pointer-events: none;
}

.progress-indicator {
    position: absolute;
    top: 0;
    left: 0%;
    width: 3px;
    height: 100%;
    background-color: var(--accent-play);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    transition: left 0.1s linear;
    z-index: 20;
    pointer-events: none;
}

.block-presets {
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-light);
    padding: 15px;
    margin-top: 0;
}

.preset-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.preset-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.preset-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-window);
}

.preset-block:hover {
    transform: translateY(-1px);
    border-color: var(--border-dark);
    box-shadow: 2px 2px 0 var(--shadow-color);
}

.work-preset {
    background-color: var(--block-work-light);
    border-color: var(--block-border-work);
}

.work-preset:hover {
    background-color: rgba(35, 92, 43, 0.25);
}

.break-preset {
    background-color: var(--block-break-light);
    border-color: var(--block-border-break);
}

.break-preset:hover {
    background-color: rgba(217, 119, 87, 0.25);
}


.preset-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tasks-container {
    background-color: var(--bg-secondary);
    border: var(--pixel-border) solid var(--border-dark);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.task-list-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 15px;
    padding-right: 10px;
    height: 400px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom scrollbar styling */
.task-list-wrapper::-webkit-scrollbar {
    width: 12px;
}

.task-list-wrapper::-webkit-scrollbar-track {
    background: var(--bg-window);
    border: 2px solid var(--border-dark);
}

.task-list-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border: 2px solid var(--border-dark);
    box-shadow: inset 0 0 0 2px var(--bg-window);
}

.task-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Firefox scrollbar */
.task-list-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) var(--bg-window);
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-light);
    transition: var(--transition);
    flex-shrink: 0;
}

.task-item:hover {
    border-color: var(--border-dark);
    transform: translateX(5px);
}

.pixel-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: var(--pixel-border) solid var(--border-dark);
    background-color: var(--bg-window);
    cursor: pointer;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.pixel-checkbox:checked {
    background-color: var(--checkbox-checked);
}

.pixel-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: var(--bg-window);
}

.task-item label {
    flex: 1;
    cursor: text;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.5;
    color: var(--text-primary);
    user-select: text;
    -webkit-user-select: text;
    outline: none;
    padding: 4px 4px 4px 0;
    border-radius: 2px;
}

.task-item label:focus {
    background-color: rgba(66, 135, 245, 0.1);
    outline: 1px solid var(--accent);
}

.pixel-checkbox:checked + label {
    text-decoration: line-through;
    opacity: 0.6;
}

.add-task {
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background-color: var(--bg-secondary);
    padding-top: 10px;
    border-top: var(--pixel-border) dashed var(--border-light);
}

.add-task-btn {
    padding: 10px 15px !important;
    font-size: 20px !important;
    font-weight: bold;
}

.pixel-input {
    flex: 1;
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-dark);
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.pixel-input:focus {
    outline: none;
    border-color: var(--accent-play);
}

.app-footer {
    background-color: var(--bg-secondary);
    border-top: var(--pixel-border) solid var(--border-dark);
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.footer-left {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-dark);
    gap: 15px;
    min-height: 48px;
    transition: var(--transition);
}

.footer-left.notification-active {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-icon {
    font-size: 18px;
    line-height: 1;
}

.notification-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.notification-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.notification-btn {
    padding: 6px 14px !important;
    font-size: 12px !important;
    white-space: nowrap;
}

/* Notification type styles */
.footer-left.notification-session-resume {
    border-color: var(--accent-play);
    background: linear-gradient(to right, var(--bg-window), rgba(149, 231, 126, 0.1));
}

.footer-left.notification-session-complete {
    border-color: var(--accent-play);
    background: linear-gradient(to right, var(--bg-window), rgba(149, 231, 126, 0.15));
}

.footer-left.notification-achievement {
    border-color: var(--accent-warning);
    background: linear-gradient(to right, var(--bg-window), rgba(255, 217, 61, 0.1));
}

.footer-left.notification-success {
    border-color: var(--checkbox-checked);
    background: linear-gradient(to right, var(--bg-window), rgba(78, 205, 196, 0.1));
}

.footer-left.notification-warning {
    border-color: var(--accent-warning);
    background: linear-gradient(to right, var(--bg-window), rgba(255, 217, 61, 0.1));
}

.footer-left.notification-error {
    border-color: #ff6b6b;
    background: linear-gradient(to right, var(--bg-window), rgba(255, 107, 107, 0.1));
}

.footer-left.notification-info {
    border-color: var(--border-dark);
}

.footer-right {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--bg-window);
    border: var(--pixel-border) solid var(--border-dark);
    min-width: 150px;
}

.footer-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.sound-btn {
    padding: 8px 12px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-btn:hover {
    background-color: var(--btn-hover);
}

.sound-icon {
    font-size: 20px;
    line-height: 1;
}

/* Tablet styles */
@media (max-width: 768px) {
    .app-container {
        width: 100%;
        max-width: none;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .tasks-container {
        height: 400px;
    }

    .task-list-wrapper {
        height: 280px;
    }

    .controls-bar {
        flex-direction: column;
        gap: 12px;
        min-height: auto;
        padding: 12px;
    }

    .time-display {
        font-size: 18px;
    }

    .app-footer {
        flex-direction: column;
        gap: 10px;
    }

    .footer-left {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .footer-right {
        min-width: auto;
        width: 100%;
    }

    .notification-content {
        width: 100%;
        justify-content: flex-start;
    }

    .notification-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    body {
        font-size: 13px;
        background-image: none;
        background-color: var(--bg-primary);
    }

    .app-container {
        border-top: none;
        border-bottom: none;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .app-header {
        padding: 0;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .title-bar {
        padding: 8px 12px;
    }

    .window-controls {
        display: none;
    }

    .app-title {
        font-size: 16px;
        letter-spacing: 2px;
        text-shadow: none;
    }

    .theme-toggle {
        right: 12px;
    }

    .theme-btn {
        padding: 4px 6px;
        border-width: 2px;
    }

    .main-content {
        padding: 15px;
        gap: 15px;
        flex: 1;
        overflow-y: auto;
    }

    .section-title {
        font-size: 11px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .time-blocks-container,
    .tasks-container {
        padding: 15px;
        border-width: 2px;
    }

    .controls-bar {
        padding: 10px;
        gap: 10px;
        align-items: stretch;
    }

    .play-btn {
        min-width: 50px;
        height: 36px;
        padding: 6px 12px;
    }

    .time-display {
        font-size: 16px;
        text-align: center;
    }

    .current-block-info {
        font-size: 11px;
        padding: 4px 8px;
        text-align: center;
        justify-content: center;
    }

    .timeline-container {
        margin-bottom: 15px;
    }

    .timeline-track {
        height: 60px;
        border-width: 2px;
    }

    .timeline-block {
        border-left-width: 2px;
    }

    .timeline-block:last-child {
        border-right-width: 2px;
    }

    .block-type {
        font-size: 9px;
        letter-spacing: 0.2px;
    }

    .block-time {
        font-size: 12px;
    }

    .resize-handle {
        width: 20px;
    }

    .resize-handle.left {
        left: -10px;
    }

    .resize-handle.right {
        right: -10px;
    }

    .remove-btn {
        width: 18px;
        height: 18px;
        top: 3px;
        right: 3px;
        font-size: 14px;
        line-height: 14px;
        border-width: 1px;
    }

    .timeline-ruler {
        margin-top: 8px;
        margin-bottom: 15px;
    }

    .ruler-mark span {
        font-size: 9px;
    }

    .block-presets {
        padding: 12px;
        border-width: 2px;
    }

    .preset-title {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .preset-buttons {
        gap: 8px;
    }

    .preset-block {
        padding: 5px 10px;
        border-width: 2px;
    }

    .preset-label {
        font-size: 10px;
    }

    .tasks-container {
        height: auto;
        max-height: 350px;
        padding: 15px;
    }

    .task-list-wrapper {
        height: auto;
        max-height: 220px;
        margin-bottom: 12px;
        padding-right: 5px;
    }

    .task-list {
        gap: 8px;
    }

    .task-item {
        padding: 10px;
        border-width: 2px;
    }

    .task-item label {
        font-size: 13px;
    }

    .pixel-checkbox {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }

    .pixel-checkbox:checked::after {
        font-size: 14px;
    }

    .add-task {
        gap: 8px;
        padding-top: 8px;
    }

    .pixel-input {
        padding: 6px 10px;
        font-size: 13px;
        border-width: 2px;
    }

    .add-task-btn {
        padding: 6px 12px !important;
        font-size: 16px !important;
        border-width: 2px;
    }

    .pixel-btn {
        font-size: 11px;
        padding: 6px 12px;
        border-width: 2px;
    }

    .app-footer {
        padding: 10px;
        border-top-width: 2px;
        position: sticky;
        bottom: 0;
        z-index: 100;
        flex-direction: column;
        gap: 8px;
    }

    .footer-left {
        padding: 8px;
        gap: 8px;
        border-width: 2px;
        min-height: auto;
    }

    .footer-right {
        padding: 8px;
        border-width: 2px;
        min-width: auto;
        width: 100%;
    }

    .notification-icon {
        font-size: 16px;
    }

    .notification-message {
        font-size: 12px;
    }

    .sound-btn {
        padding: 6px 10px;
        min-width: 40px;
    }

    .sound-icon {
        font-size: 18px;
    }

    .notification-btn {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    /* Adjust task list wrapper scrollbar for mobile */
    .task-list-wrapper::-webkit-scrollbar {
        width: 8px;
    }

    .task-list-wrapper::-webkit-scrollbar-track {
        border-width: 1px;
    }

    .task-list-wrapper::-webkit-scrollbar-thumb {
        border-width: 1px;
    }

    /* Optimize for touch interactions */
    .preset-block,
    .pixel-btn,
    .pixel-checkbox,
    .add-task-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .app-title {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .main-content {
        padding: 12px;
        gap: 12px;
    }

    .time-display {
        font-size: 14px;
    }

    .tasks-container {
        max-height: 300px;
    }

    .task-list-wrapper {
        max-height: 180px;
    }
}