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

/* Accessibility Helpers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Enhanced Focus Indicators */
*:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

button:focus {
    outline: 3px solid #FFD700;
    outline-offset: 3px;
}

input:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #2c3e50;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

@media (max-height: 700px) {
    body {
        min-height: 700px;
    }
}

.container {
    text-align: center;
    width: 100vw;
    height: 100vh;
    min-height: 700px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

/* Desktop minimum width */
@media (min-width: 1025px) {
    body {
        min-width: 1024px;
    }

    .container {
        min-width: 1024px;
        min-height: 600px;
    }
}

.title-overlay {
    position: absolute;
    top: max(30px, env(safe-area-inset-top, 0px));
    left: max(40px, env(safe-area-inset-left, 0px));
    z-index: 20;
    animation: fadeInDown 0.6s ease;
}

.title-logo {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.4));
    image-rendering: pixelated;
}

.title-twig {
    font-size: 3.5rem;
    font-weight: 800;
    color: #8B4513;
    text-shadow:
        3px 3px 0 #654321,
        -1px -1px 0 #A0522D,
        1px 1px 0 #6B4423,
        2px 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    position: relative;
    display: inline-block;
}

.pixel-art-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 700px;
    animation: fadeIn 0.8s ease;
}

#beaverCanvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.timer-overlay {
    position: absolute;
    top: max(80px, calc(env(safe-area-inset-top, 0px) + 50px));
    right: max(40px, env(safe-area-inset-right, 0px));
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.7rem 1rem;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 15;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    min-width: 80px;
    width: auto;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

/* Bottom Toolbar Container */
.toolbar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    pointer-events: none;
}

.toolbar-trigger {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 50px;
    pointer-events: all;
}

.toolbar {
    position: absolute;
    bottom: -550px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 16px 16px 0 0;
    padding: 1.5rem 2rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 2rem;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 1rem;
    align-items: start;
    justify-content: center;
}

@media (max-height: 600px) {
    .toolbar {
        max-height: 60vh;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .toolbar-section {
        gap: 0.5rem;
    }

    .toolbar-section-mode,
    .toolbar-section-controls {
        padding-bottom: 0.5rem;
    }
}

.toolbar::-webkit-scrollbar {
    width: 8px;
}

.toolbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.toolbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.toolbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.toolbar-container:hover .toolbar {
    bottom: 0;
}

.toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toolbar-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.toolbar-content {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Mode Section */
.toolbar-section-mode {
    grid-column: 1;
    grid-row: 1;
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.toolbar-section-mode .toolbar-content {
    flex-direction: row;
    justify-content: center;
}

/* Task Section */
.toolbar-section-task {
    grid-column: 1;
    grid-row: 2;
    min-width: auto;
}

.toolbar-section-task .toolbar-content {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
}

/* Controls Section */
.toolbar-section-controls {
    grid-column: 1;
    grid-row: 3;
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.toolbar-section-controls .toolbar-content {
    justify-content: center;
}

/* Stats Section */
.toolbar-section-stats {
    grid-column: 1;
    grid-row: 4;
    min-width: auto;
}

.toolbar-section-stats .toolbar-content {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.toolbar-section-stats .stats-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}

.toolbar-section-stats .stat-item {
    text-align: center;
}

.toolbar-section-stats .stat-number {
    font-size: 1.3rem;
}

.toolbar-section-stats .stat-label {
    font-size: 0.55rem;
    white-space: nowrap;
}

.toolbar-section-stats .goal-progress-container {
    width: 100%;
}

.toolbar-section-stats .goal-header {
    font-size: 0.6rem;
}

.toolbar-section-stats .goal-progress-bar {
    height: 6px;
}

.toolbar-section-stats .streak-container {
    padding: 0.3rem 0.5rem;
}

.toolbar-section-stats .streak-icon {
    font-size: 1.2rem;
}

.toolbar-section-stats .streak-number {
    font-size: 0.9rem;
}

.toolbar-section-stats .streak-label {
    font-size: 0.55rem;
}

.task-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#taskInput {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    min-width: 0;
    flex: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#taskInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#taskInput:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#taskInput.saved {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    animation: taskSaved 0.5s ease;
}

@keyframes taskSaved {
    0% {
        border-color: rgba(255, 255, 255, 0.3);
    }
    50% {
        border-color: #10b981;
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.4);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.save-task-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.2rem;
    font-size: 1.2rem;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-task-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.save-task-btn:active {
    transform: translateY(0);
}

/* To-Do Dropdown Button */
.todo-dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.todo-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.todo-dropdown-btn:active {
    transform: translateY(0);
}

.todo-dropdown-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

/* To-Do Dropdown Menu */
.todo-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.todo-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.todo-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.todo-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.todo-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.todo-dropdown-item {
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.todo-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(2px);
}

.todo-dropdown-item-priority {
    font-size: 0.9rem;
}

.todo-dropdown-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-dropdown-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.todo-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.todo-dropdown-empty-action {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-dropdown-empty-action:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
}

/* Todo Metadata Display */
.todo-metadata-display {
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.todo-metadata-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.todo-metadata-priority {
    font-size: 1rem;
}

.todo-metadata-separator {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

/* Task Tags Selector */
.task-tags-selector {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.task-tag-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.task-tag-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.task-tag-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.task-tag-btn:active {
    transform: translateY(0);
}

/* Task Tag Display in History */
.task-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    border: 1px solid;
}

.task-tag-badge.tag-work {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.task-tag-badge.tag-study {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
}

.task-tag-badge.tag-creative {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.4);
    color: #f9a8d4;
}

.task-tag-badge.tag-health {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.task-tag-badge.tag-meditation {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.4);
    color: #5eead4;
}

.task-tag-badge.tag-chores {
    background: rgba(120, 53, 15, 0.2);
    border-color: rgba(120, 53, 15, 0.4);
    color: #d97706;
}

.task-tag-badge.tag-personal {
    background: rgba(251, 146, 60, 0.2);
    border-color: rgba(251, 146, 60, 0.4);
    color: #fdba74;
}

.task-tag-badge.tag-fun {
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.4);
    color: #fde047;
}

.task-tag-badge.tag-other {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.4);
    color: #cbd5e1;
}

/* Removed old overlay positioning - now in toolbar */

.time {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: 2px;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    text-rendering: optimizeSpeed;
}

.session-type {
    font-size: 0.65rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    font-family: 'Courier New', 'Consolas', monospace;
}

/* Goal Progress */
.goal-progress-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.goal-label {
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goal-count {
    color: rgba(255, 255, 255, 0.95);
    font-variant-numeric: tabular-nums;
}

.goal-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.goal-progress-fill.complete {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    animation: goalPulse 1.5s ease-in-out infinite;
}

@keyframes goalPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }
}

/* Streak Counter */
.streak-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.streak-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.streak-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.streak-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1;
}

.streak-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Custom Control Buttons */
.btn {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 80px;
    width: 80px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.btn-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-start:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-pause {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-pause:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-reset {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    color: #4682B4;
}

.btn-reset:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 100%);
}

/* Custom Mode Buttons */
.mode-btn {
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 80px;
    width: 80px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mode-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.mode-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.1;
}

.mode-time {
    font-size: 0.55rem;
    opacity: 0.8;
    line-height: 1;
}

.mode-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    color: #4682B4;
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3), inset 0 1px 2px rgba(74, 130, 180, 0.2);
}

.mode-btn.active:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4), inset 0 1px 2px rgba(74, 130, 180, 0.2);
}

.stat-item {
    color: white;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.stat-label {
    font-size: 0.6rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pixel-art-container.pulse {
    animation: pulse 1s ease-in-out;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 16px;
    max-width: 500px;
    width: 85%;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-export-btn {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
    font-size: 1.3rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-export-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
    transform: scale(1.1);
}

.modal-export-btn:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) 1.5rem;
}

.stats-section, .settings-section {
    margin-bottom: 1.25rem;
}

.stats-section h3, .settings-section h3 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card-number {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.35rem;
    line-height: 1;
}

.stat-card-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.setting-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.setting-item label {
    font-size: 0.9rem;
    font-weight: 500;
}

.setting-item input[type="number"],
.setting-item input[type="range"] {
    padding: 0.4rem;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    width: 80px;
}

.setting-item input[type="range"] {
    width: 120px;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#volumeValue {
    margin-left: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.enable-notifications-btn {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.enable-notifications-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.enable-notifications-btn.enabled {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.enable-notifications-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.enable-notifications-btn.disabled {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    opacity: 0.7;
}

.notification-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

.setting-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.theme-btn {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-btn.active {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    border-color: #A0522D;
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.4);
}

.theme-btn .theme-icon {
    font-size: 2rem;
    line-height: 1;
}

.theme-btn .theme-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sound Theme Selector */
.sound-theme-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sound-theme-btn {
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: white;
    min-width: 70px;
    min-height: 70px;
}

.sound-theme-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sound-theme-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #34d399;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* Graphics Tier Selector */
.graphics-tier-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.tier-btn {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    position: relative;
}

.tier-btn:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tier-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #60a5fa;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.tier-btn.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.tier-icon {
    font-size: 2rem;
    line-height: 1;
}

.tier-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    gap: 0.1rem;
}

.tier-name {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-bits {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.tier-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.free {
    background: rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #86efac;
}

.tier-badge.locked {
    background: rgba(107, 114, 128, 0.3);
    border: 1px solid rgba(107, 114, 128, 0.6);
    font-size: 0.85rem;
}

/* Companion Selector */
.companion-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.companion-btn {
    padding: 0.9rem 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    position: relative;
}

.companion-btn:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.companion-btn.active {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    border-color: #A0522D;
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.4);
}

.companion-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.companion-icon {
    font-size: 2rem;
    line-height: 1;
}

.companion-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.companion-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.companion-activity {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
}

.companion-lock {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.sound-theme-btn .sound-theme-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.sound-theme-btn .sound-theme-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pomodoro Variation Selector */
.variation-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.variation-btn {
    padding: 0.8rem 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: white;
}

.variation-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.variation-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #5dade2;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.4);
}

.variation-btn.active:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
}

.variation-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.variation-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variation-times {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

.custom-durations {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.custom-durations .setting-item {
    margin-bottom: 0.8rem;
}

.custom-durations .setting-item:last-child {
    margin-bottom: 0;
}

/* Task History */
.task-history-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.task-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.9rem;
}

.task-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.task-search:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(0, 0, 0, 0.4);
}

.task-filter {
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.task-filter:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
}

.clear-tasks-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-tasks-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.7);
}

.task-analytics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.task-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.task-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.task-stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Stats */
.category-stats {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-stats-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    text-align: center;
}

.category-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.category-stat-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.6rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-stat-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.category-stat-item.has-tasks {
    border-color: rgba(255, 255, 255, 0.2);
}

.category-stat-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.category-stat-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.category-stat-name {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-history-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-history-list::-webkit-scrollbar {
    width: 8px;
}

.task-history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.task-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.task-history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.task-item {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(59, 130, 246, 0.6);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.task-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.task-item-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
}

.task-item-notes {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 4px;
    line-height: 1.4;
}

.task-note-indicator {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
    cursor: help;
}

.task-item-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.task-item-delete {
    padding: 0.25rem 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-item-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.empty-message.hidden {
    display: none;
}

.section-description {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-style: italic;
}

/* To-Do List Styles */
.todo-add-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.todo-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.todo-input:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.todo-tags-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.todo-tags-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.freeform-tags-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.add-todo-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-todo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.todo-list::-webkit-scrollbar {
    width: 8px;
}

.todo-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.todo-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.todo-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.todo-item {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(59, 130, 246, 0.6);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.todo-item.completed {
    opacity: 0.6;
    border-left-color: rgba(34, 197, 94, 0.6);
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.todo-checkbox:hover {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.1);
}

.todo-checkbox.checked {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
}

.todo-checkbox.checked::after {
    content: '✓';
    color: #86efac;
    font-weight: bold;
    font-size: 0.9rem;
}

.todo-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.todo-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
}

.todo-delete {
    padding: 0.25rem 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.todo-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

/* Todo Metadata Row */
.todo-metadata-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 4.5rem;
}

.todo-meta-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 0.5rem;
    font-weight: 600;
}

/* Priority Selector */
.todo-priority-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.todo-priority-selector .todo-meta-label {
    position: absolute;
    right: 100%;
    margin-right: 0.75rem;
    white-space: nowrap;
}

.todo-priority-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.todo-priority-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.todo-priority-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    color: white;
    font-weight: 600;
}

/* Estimate Selector */
.todo-estimate-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    justify-content: flex-start;
    min-width: 200px;
}

.todo-estimate-selector .todo-meta-label {
    position: absolute;
    right: 100%;
    margin-right: 0.75rem;
    white-space: nowrap;
}

.todo-pomodoro-input {
    width: 60px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    text-align: center;
}

.todo-pomodoro-input:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.pomodoro-icon {
    font-size: 1rem;
}

/* Todo Item Enhancements */
.todo-drag-handle {
    color: rgba(255, 255, 255, 0.3);
    cursor: grab;
    user-select: none;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 0.25rem;
    transition: color 0.2s ease;
}

.todo-drag-handle:hover {
    color: rgba(255, 255, 255, 0.6);
}

.todo-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.todo-item.dragging .todo-drag-handle {
    cursor: grabbing;
}

.todo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.todo-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.todo-priority,
.todo-estimate {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Category Insights Styles */
.category-insights-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.category-insight-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.category-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.category-insight-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.category-insight-icon {
    font-size: 1rem;
}

.category-insight-stats {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.category-insight-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.category-insight-bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(59, 130, 246, 0.8));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
}

.category-insight-bar.tag-work {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0.7));
}

.category-insight-bar.tag-study {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0.7));
}

.category-insight-bar.tag-creative {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.5), rgba(236, 72, 153, 0.7));
}

.category-insight-bar.tag-health {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.5), rgba(34, 197, 94, 0.7));
}

.category-insight-bar.tag-meditation {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.5), rgba(20, 184, 166, 0.7));
}

.category-insight-bar.tag-chores {
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.5), rgba(120, 53, 15, 0.7));
}

.category-insight-bar.tag-personal {
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.5), rgba(251, 146, 60, 0.7));
}

.category-insight-bar.tag-fun {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.5), rgba(234, 179, 8, 0.7));
}

.category-insight-bar.tag-other {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.5), rgba(148, 163, 184, 0.7));
}

.category-insight-percentage {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Journal Styles */
.journal-header {
    margin-bottom: 1.5rem;
}

.journal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.journal-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.journal-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
}

.journal-search:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.journal-filters-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.journal-filter {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    height: 2.25rem;
    min-width: 140px;
}

.journal-filter:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
}

.journal-btn-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
}

.journal-export-btn,
.journal-new-btn,
.journal-review-btn,
.journal-month-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    flex: 1;
    max-width: 180px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.journal-review-btn {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.4);
}

.journal-review-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
}

.journal-export-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
}

.journal-export-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
}

.journal-new-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}

.journal-new-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

.journal-month-btn {
    background: rgba(236, 72, 153, 0.2);
    color: #f9a8d4;
    border-color: rgba(236, 72, 153, 0.4);
}

.journal-month-btn:hover {
    background: rgba(236, 72, 153, 0.3);
    border-color: rgba(236, 72, 153, 0.6);
}

.journal-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.journal-timeline::-webkit-scrollbar {
    width: 8px;
}

.journal-timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.journal-timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.journal-timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.journal-date-group {
    margin-bottom: 1rem;
}

.journal-date-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.journal-entry {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid rgba(59, 130, 246, 0.6);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.journal-entry:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(59, 130, 246, 0.8);
}

.journal-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.journal-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.journal-entry-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 500;
}

.journal-entry-task {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.journal-entry-delete {
    padding: 0.25rem 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.journal-entry-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.journal-entry-notes {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.journal-entry-freeform {
    border-left-color: rgba(139, 92, 246, 0.6);
}

.journal-entry-freeform:hover {
    border-left-color: rgba(139, 92, 246, 0.8);
}

/* Week in Review Styles */
.week-review-content {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.week-review-content::-webkit-scrollbar {
    width: 8px;
}

.week-review-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.week-review-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.week-review-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.week-review-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.4);
}

.week-review-dates {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.week-review-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.week-review-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.week-review-stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.week-review-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(139, 92, 246, 0.9);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.week-review-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-review-section {
    margin-bottom: 2rem;
}

.week-review-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.week-review-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.week-review-category-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
}

.week-review-category-icon {
    font-size: 1.5rem;
}

.week-review-category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.week-review-category-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.week-review-category-stats {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.week-review-journal-entries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.week-review-day-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.week-review-day-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(139, 92, 246, 0.9);
    margin-bottom: 0.75rem;
}

.week-review-entry {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid rgba(139, 92, 246, 0.6);
}

.week-review-entry:last-child {
    margin-bottom: 0;
}

.week-review-entry-task {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.4rem;
}

.week-review-entry-notes {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    white-space: pre-wrap;
}

.week-review-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.week-review-achievement {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Month in Review Styles */
.month-review-content {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.month-review-content::-webkit-scrollbar {
    width: 8px;
}

.month-review-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.month-review-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.month-review-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Firefox scrollbar styling */
.toolbar,
.todo-dropdown-menu,
.task-history-list,
.todo-list,
.journal-timeline,
.week-review-content,
.month-review-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.month-review-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(236, 72, 153, 0.4);
}

.month-review-dates {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.month-review-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.month-review-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.month-review-stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.month-review-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(236, 72, 153, 0.9);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.month-review-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.month-review-section {
    margin-bottom: 2rem;
}

.month-review-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.month-review-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.month-review-category-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
}

.month-review-category-icon {
    font-size: 1.5rem;
}

.month-review-category-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.month-review-category-stats {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.month-review-journal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.month-review-day-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.month-review-day-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(236, 72, 153, 0.9);
    margin-bottom: 0.75rem;
}

.month-review-entry {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid rgba(236, 72, 153, 0.6);
}

.month-review-entry:last-child {
    margin-bottom: 0;
}

.month-review-entry-task {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.4rem;
}

.month-review-entry-notes {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    white-space: pre-wrap;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.achievement-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.achievement-badge.unlocked {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.3) 100%);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.achievement-badge.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 0.35rem;
    display: block;
}

.achievement-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.achievement-description {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.2;
}

.achievement-badge.unlocked .achievement-icon {
    animation: pulse 2s infinite;
}

/* Calendar Heatmap Styles */
.heatmap-container {
    margin-top: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, 12px);
    gap: 3px;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.3);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.legend-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.legend-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legend-square:hover {
    transform: scale(1.2);
}

/* Heatmap intensity levels */
.heatmap-cell.level-0,
.legend-square.level-0 {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.heatmap-cell.level-1,
.legend-square.level-1 {
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.heatmap-cell.level-2,
.legend-square.level-2 {
    background: rgba(16, 185, 129, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.6);
}

.heatmap-cell.level-3,
.legend-square.level-3 {
    background: rgba(16, 185, 129, 0.7);
    border: 1px solid rgba(16, 185, 129, 0.8);
}

.heatmap-cell.level-4,
.legend-square.level-4 {
    background: rgba(16, 185, 129, 0.9);
    border: 1px solid rgba(16, 185, 129, 1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Tooltip for heatmap cells */
.heatmap-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Chart Styles */
.chart-container {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

.chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    text-align: center;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 120px;
    gap: 0.5rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, #10b981, #34d399);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-bar:hover {
    background: linear-gradient(to top, #059669, #10b981);
    transform: translateY(-2px);
}

.chart-bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.chart-bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.data-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.data-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.export-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.export-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.import-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.import-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.data-info {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 0 0;
    font-style: italic;
    text-align: center;
}

.save-settings-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    margin-top: 0.5rem;
}

.save-settings-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Auto-Hide Sidebar - Drum Machine Style */
.sidebar-container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

.sidebar-trigger {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100vh;
    pointer-events: all;
}

.sidebar {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 12px 0 0 12px;
    padding: 1rem env(safe-area-inset-right, 0px) 1rem 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
}

.sidebar-container:hover .sidebar {
    right: 0;
}

.sidebar-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem 0.3rem;
    font-weight: 700;
}

.sidebar-copyright {
    font-size: 0.55rem;
    color: #fff;
    text-align: center;
    padding: 1rem 0.5rem 0.5rem;
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: 0.5px;
}

.sidebar-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-btn.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, transparent 100%);
    border-left: 3px solid #3b82f6;
    color: #60a5fa;
}

.sidebar-btn.active .sidebar-icon {
    transform: scale(1.1);
}

.sidebar-icon {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.2s ease;
    min-width: 24px;
    text-align: center;
}

.sidebar-text {
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* Focus Mode */
.focus-exit-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 101;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.focus-exit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

body.focus-mode .focus-exit-btn {
    display: flex;
}

body.focus-mode .sidebar-container {
    display: none;
}

body.focus-mode .toolbar-container {
    display: none;
}

body.focus-mode .title-overlay {
    opacity: 0;
    pointer-events: none;
}

body.focus-mode .timer-overlay {
    top: 80px;
    right: 40px;
    bottom: auto;
    transform: none;
}

/* Fullscreen Mode */
.fullscreen-exit-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 101;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.fullscreen-exit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

body.fullscreen-mode .fullscreen-exit-btn {
    display: flex;
}

body.fullscreen-mode .sidebar-container .sidebar {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.7) 0%, rgba(20, 20, 20, 0.7) 100%);
}

body.fullscreen-mode .toolbar {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

body.fullscreen-mode .toolbar-container:hover .toolbar {
    opacity: 1;
}

body.fullscreen-mode .title-overlay {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

body.fullscreen-mode .title-overlay:hover {
    opacity: 1;
}

/* Widget Mode */
.widget-bar {
    display: none;
    position: fixed;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 18px 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    font-family: 'Courier New', monospace;
}

.widget-logo {
    width: 80px;
    height: auto;
    image-rendering: pixelated;
}

.widget-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.widget-timer {
    font-size: 0.9rem;
    font-weight: bold;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.widget-session {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.widget-expand-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.widget-expand-btn:hover {
    color: #FFFFFF;
}

/* When page is loaded as a popup widget window */
body.widget-popup {
    background: #1a1a2e;
    margin: 0;
    padding: 6px 0 0;
    min-height: auto;
    overflow: visible;
}

body.widget-popup .container {
    display: none;
}

body.widget-popup .toolbar-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.widget-popup .sidebar-container {
    display: none;
}

body.widget-popup .widget-bar {
    display: flex;
    position: static;
    transform: none;
    margin: 0 auto;
    width: fit-content;
    padding-top: 4px;
}

body.widget-mode .container {
    display: none;
}

body.widget-mode .toolbar-container {
    display: none;
}

body.widget-mode .sidebar-container {
    display: none;
}

body.widget-mode .widget-bar {
    display: flex;
}

body.widget-mode {
    background: #1a1a2e;
}

/* Duration settings button in toolbar */
.mode-btn-settings {
    background: transparent !important;
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
    opacity: 0.7;
}

.mode-btn-settings:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

/* Onboarding Styles */
.onboarding-content {
    max-width: 600px;
    text-align: center;
}

.onboarding-step {
    padding: 2rem;
}

.onboarding-step.hidden {
    display: none;
}

.onboarding-step h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.onboarding-step p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.onboarding-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-style: italic;
}

.onboarding-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.onboarding-list li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.onboarding-list li:last-child {
    border-bottom: none;
}

.onboarding-list kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.onboarding-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.onboarding-btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-btn, .finish-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.next-btn:hover, .finish-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.back-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    transform: translateY(-2px);
}

.onboarding-preview {
    margin: 1.5rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Break Suggestion Overlay */
.break-suggestion-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.95) 0%, rgba(101, 67, 33, 0.95) 100%);
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 150;
    text-align: center;
    animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.break-suggestion-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.break-suggestion-close-btn {
    position: absolute;
    top: -1rem;
    right: -1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.break-suggestion-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.break-suggestion-close-btn:active {
    transform: scale(0.95);
}

.break-suggestion-icon {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

.break-suggestion-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    max-width: 500px;
}

.break-suggestion-next-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.break-suggestion-next-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.break-suggestion-next-btn:active {
    transform: translateY(0);
}

@keyframes slideInBounce {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

body.focus-mode .break-suggestion-overlay {
    display: none !important;
}

/* Game Picker Styles */
.break-picker-label {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.break-picker-divider {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0.5rem 0;
    letter-spacing: 0.5px;
}

.break-picker-games {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 280px;
}

.break-picker-games-full {
    width: 280px;
}

.break-game-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    min-width: 80px;
}

.break-game-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.break-game-btn:active {
    transform: translateY(0);
}

.break-game-emoji {
    font-size: 1.5rem;
}

.break-game-name {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Session Notes Modal */
.session-notes-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    text-align: center;
    animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 85%;
}

.session-notes-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.session-notes-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.session-task-display {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0;
    text-align: center;
}

.session-notes-prompt {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.session-notes-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.session-notes-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.session-notes-input:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.freeform-task-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.freeform-task-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.freeform-task-input:focus {
    outline: 2px solid #FFD700;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.todo-complete-option {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
}

.todo-complete-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.todo-complete-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #22c55e;
}

.session-notes-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.session-notes-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.session-notes-skip {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.session-notes-skip:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.session-notes-save {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.session-notes-save:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.session-notes-btn:active {
    transform: translateY(0);
}

body.focus-mode .session-notes-modal {
    display: none !important;
}

@media (max-width: 1024px) and (orientation: portrait) {
    .title-overlay {
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
    }

    .title-logo {
        height: 45px;
    }

    .title-twig {
        font-size: 2rem;
    }

    .timer-overlay {
        padding: 0.4rem 0.8rem;
        top: 85px;
        right: 50%;
        bottom: auto;
        transform: translateX(50%);
        min-width: auto;
        width: auto;
        max-width: 180px;
    }

    .time {
        font-size: 1.2rem;
    }

    .session-type {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .toolbar {
        width: calc(100% - 2rem);
        padding: 1rem;
        gap: 0.75rem 1rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        bottom: -500px;
    }

    .toolbar-section {
        gap: 0.5rem;
    }

    .toolbar-section-mode {
        grid-column: 1;
        grid-row: 1;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.75rem;
    }

    .toolbar-section-task {
        grid-column: 1;
        grid-row: 2;
        min-width: auto;
    }

    .toolbar-section-controls {
        grid-column: 1;
        grid-row: 3;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.75rem;
    }

    .toolbar-section-stats {
        grid-column: 1;
        grid-row: 4;
        min-width: auto;
    }

    .toolbar-section-mode .toolbar-content,
    .toolbar-section-controls .toolbar-content {
        justify-content: center;
    }

    .toolbar-label {
        font-size: 0.6rem;
    }

    .mode-btn {
        padding: 0.5rem 0.8rem;
        min-width: 80px;
        width: 80px;
    }

    .mode-icon {
        font-size: 1.3rem;
    }

    .mode-label {
        font-size: 0.7rem;
    }

    .mode-time {
        font-size: 0.65rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        min-width: 65px;
        width: 65px;
    }

    .btn-icon {
        font-size: 1.1rem;
    }

    .btn-label {
        font-size: 0.7rem;
    }

    .toolbar-section-stats .stat-number {
        font-size: 1.1rem;
    }

    .toolbar-section-stats .stat-label {
        font-size: 0.5rem;
    }

    .task-tags-selector {
        justify-content: center;
    }

    .task-tag-btn {
        min-width: 32px;
        min-height: 32px;
        padding: 0.3rem 0.5rem;
        font-size: 1rem;
    }
}

/* Mobile Landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .title-overlay {
        top: 10px;
        left: 10px;
    }

    .title-logo {
        height: 30px;
    }

    .title-twig {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .timer-overlay {
        top: 10px;
        right: 200px;
        bottom: auto;
        transform: none;
    }

    .toolbar {
        bottom: -500px;
        padding: 0.5rem 1rem;
        gap: 0.5rem 1rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    .toolbar-trigger {
        height: 40px;
    }

    .toolbar-section {
        gap: 0.4rem;
    }

    .toolbar-section-mode {
        grid-column: 1;
        grid-row: 1;
        padding-right: 1rem;
    }

    .toolbar-section-controls {
        grid-column: 2;
        grid-row: 1;
        padding-right: 1rem;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .toolbar-section-stats {
        grid-column: 3;
        grid-row: 1;
    }

    .toolbar-section-task {
        display: none;
    }

    .mode-btn {
        padding: 0.4rem 0.6rem;
        min-width: 60px;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        min-width: 55px;
    }

    .sidebar {
        width: 160px;
    }

    .sidebar-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .sidebar-icon {
        font-size: 1.1rem;
    }

    .break-suggestion-overlay {
        padding: 1.5rem 2rem;
    }

    .break-suggestion-text {
        font-size: 1.2rem;
    }

    .break-suggestion-icon {
        font-size: 2.5rem;
    }
}

/* Tablets and Medium Screens */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container {
        overflow-x: hidden;
    }

    .title-logo {
        height: 45px;
    }

    .title-twig {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .timer-overlay {
        right: 50%;
        bottom: auto;
        top: 60px;
        transform: translateX(50%);
    }

    .time {
        font-size: 1.2rem;
    }

    .session-type {
        font-size: 0.7rem;
    }

    .task-overlay {
        bottom: 140px;
        width: 90%;
        max-width: 400px;
    }

    #taskInput {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    .save-task-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0 0.8rem;
    }

    .toolbar {
        bottom: -500px;
        padding: 0.75rem 1rem;
        gap: 0.75rem 1rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    .toolbar-section-mode {
        grid-column: 1;
        grid-row: 1;
        border-right: none;
        padding-right: 0;
    }

    .toolbar-section-task {
        grid-column: 1;
        grid-row: 2;
    }

    .toolbar-section-controls {
        grid-column: 1;
        grid-row: 3;
        border-right: none;
        padding-right: 0;
    }

    .toolbar-section-stats {
        grid-column: 1;
        grid-row: 4;
        min-width: auto;
    }

    .toolbar-section-mode .toolbar-content {
        flex-wrap: wrap;
    }

    .mode-btn {
        padding: 0.6rem 1rem;
        min-width: 90px;
        min-height: 44px;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        min-width: 75px;
        min-height: 44px;
    }

    .btn-icon {
        font-size: 1.2rem;
    }

    .sidebar {
        width: 150px;
        border-radius: 8px 0 0 8px;
    }

    .sidebar-btn {
        padding: 0.65rem 0.75rem;
    }

    .break-suggestion-overlay {
        width: 90%;
        max-width: 500px;
        padding: 2rem;
    }

    .break-suggestion-text {
        font-size: 1.5rem;
    }

    .break-suggestion-next-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1rem;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
    }

    .settings-section,
    .stats-section {
        padding: 1rem;
    }

    .theme-selector,
    .sound-theme-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .variation-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .title-overlay {
        top: 10px;
    }

    .title-logo {
        height: 30px;
    }

    .title-twig {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .timer-overlay {
        top: 50px;
    }

    .time {
        font-size: 1.2rem;
    }

    .session-type {
        font-size: 0.7rem;
    }

    .toolbar {
        padding: 0.5rem;
        gap: 0.5rem;
        bottom: -500px;
    }

    .toolbar-section {
        gap: 0.3rem;
    }

    .toolbar-section-mode,
    .toolbar-section-controls {
        padding-right: 0;
    }

    #taskInput {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem;
        width: 100%;
    }

    .toolbar-section-mode .toolbar-content {
        gap: 0.4rem;
    }

    .mode-btn {
        padding: 0.5rem 0.7rem;
        min-width: 70px;
        font-size: 0.85rem;
    }

    .mode-icon {
        font-size: 1.1rem;
    }

    .mode-label {
        font-size: 0.65rem;
    }

    .mode-time {
        font-size: 0.6rem;
    }

    .toolbar-section-controls .toolbar-content {
        gap: 0.7rem;
    }

    .btn {
        padding: 0.7rem 1rem;
        min-width: 65px;
    }

    .btn-icon {
        font-size: 1rem;
    }

    .btn-label {
        font-size: 0.75rem;
    }

    .sidebar {
        width: 140px;
    }

    .sidebar-btn {
        padding: 0.6rem;
        font-size: 0.75rem;
    }

    .sidebar-icon {
        font-size: 1rem;
    }

    .break-suggestion-overlay {
        width: 95%;
        padding: 1.5rem 1rem;
    }

    .break-suggestion-icon {
        font-size: 3rem;
    }

    .break-suggestion-text {
        font-size: 1.2rem;
    }

    .break-suggestion-content {
        gap: 1rem;
    }

    .break-suggestion-next-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 98%;
        max-width: 98%;
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .theme-selector,
    .sound-theme-selector {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .theme-btn,
    .sound-theme-btn {
        padding: 0.8rem;
    }

    .variation-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .variation-btn {
        padding: 0.7rem 0.5rem;
    }

    .variation-icon {
        font-size: 1.5rem;
    }

    .variation-name {
        font-size: 0.7rem;
    }

    .variation-times {
        font-size: 0.65rem;
    }
}

/* Extra Small Devices and Focus Mode Mobile Adjustments */
@media (max-width: 360px) {
    .title-logo {
        height: 23px;
    }

    .title-twig {
        font-size: 1.2rem;
    }

    .time {
        font-size: 1.2rem;
    }

    .mode-btn {
        min-width: 60px;
        padding: 0.4rem 0.5rem;
    }

    .btn {
        min-width: 55px;
        padding: 0.6rem 0.8rem;
    }

}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Toolbar stays hidden until tapped — trigger area is larger for touch */
    .toolbar-trigger {
        height: 60px;
    }

    .toolbar {
        max-height: 50vh;
        padding: 0.75rem 1rem;
    }

    .btn,
    .mode-btn,
    .sidebar-btn,
    .theme-btn,
    .sound-theme-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .btn:active,
    .mode-btn:active,
    .sidebar-btn:active,
    .close-btn:active,
    .theme-btn:active,
    .sound-theme-btn:active,
    .variation-btn:active,
    .break-suggestion-next-btn:active,
    .onboarding-btn:active,
    .modal-export-btn:active {
        transform: scale(0.95);
    }

    /* Sidebar stays hidden until tapped — trigger area is larger for touch */
    .sidebar-trigger {
        width: 60px;
    }
}

/* Lock modal/settings layout regardless of viewport orientation or width.
   The modal has its own max-width and scrolls, so it doesn't need responsive grid changes. */
.modal .theme-selector {
    grid-template-columns: repeat(2, 1fr);
}

.modal .sound-theme-selector {
    grid-template-columns: repeat(3, 1fr);
}

.modal .graphics-tier-selector {
    grid-template-columns: repeat(2, 1fr);
}

.modal .variation-selector {
    grid-template-columns: repeat(3, 1fr);
}

.modal .sound-theme-btn {
    min-width: 0;
    min-height: 60px;
}

.modal .modal-content {
    max-width: 500px;
    width: 90%;
}

/* Mobile toolbar hint — subtle chevron that fades out after first interaction */
.toolbar-hint {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.5;
    animation: hintBounce 2s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.toolbar-hint span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.6rem;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.5px;
}

.toolbar-hint::before {
    content: '‹';
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    line-height: 1;
    transform: rotate(-90deg);
    display: block;
}

@keyframes hintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

.toolbar-hint.fading {
    opacity: 0;
}

@media (hover: none) and (pointer: coarse) {
    .toolbar-hint {
        display: flex;
    }
}

/* Reduced motion for users with vestibular disorders */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
