:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --accent-work: #ff6b6b;
    --accent-custom: #f59e0b;
    --accent-break: #4ecdc4;
    --accent-long: #a855f7;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;
    --border-color: #2d2d44;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --current-accent: var(--accent-work);
}

[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ed;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a6e;
    --text-muted: #8a8a9a;
    --border-color: #d1d1d9;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

/* Scroll margin for anchor links */
[id$="-heading"] {
    scroll-margin-top: 1rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    transition: background 0.5s ease;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* Desktop two-column layout */
@media (min-width: 900px) {
    .container {
        max-width: 900px;
    }

    .app-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }

    .timer-column {
        position: sticky;
        top: 2rem;
    }

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

header {
    text-align: center;
    margin-bottom: 2rem;
}

@media (min-width: 900px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

@media (min-width: 900px) {
    .header-nav {
        margin-top: 0;
    }
}

.nav-link {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    font-family: inherit;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .sun-icon {
    display: none;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-work), var(--accent-break));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timer-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.mode-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    background: var(--bg-tertiary);
    padding: 0.35rem;
    border-radius: 12px;
}

.mode-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.mode-tab:hover {
    color: var(--text-primary);
}

.mode-tab.active {
    background: var(--current-accent);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timer-display {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-ring {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 1.5rem;
}

.timer-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-ring circle {
    fill: none;
    stroke-width: 8;
}

.timer-ring .bg {
    stroke: var(--bg-tertiary);
}

.timer-ring .progress {
    stroke: var(--current-accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
}

.timer-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.timer-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.break-room-link {
    display: none;
    margin-top: 1rem;
    padding: 0.6rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.break-room-link:hover {
    color: var(--current-accent);
    border-color: var(--current-accent);
    background: rgba(78, 205, 196, 0.1);
}

.break-room-link.visible {
    display: inline-block;
}

.timer-task {
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: none;
}

.timer-task.visible {
    display: block;
}

.timer-task span {
    color: var(--text-primary);
    font-weight: 500;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--current-accent);
    color: white;
    min-width: 140px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-icon {
    display: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.85rem;
    min-width: auto;
    border-radius: 12px;
}

.btn-icon:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-icon svg {
    display: block;
}

.btn-icon.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ambient Sounds Card */
.sounds-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.sounds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sounds-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-stop-sound {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-stop-sound:hover {
    color: var(--accent-work);
    background: rgba(255, 107, 107, 0.1);
}

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

.sound-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.sound-btn.active {
    border-color: var(--current-accent);
    background: rgba(255, 107, 107, 0.1);
}

.sound-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sound-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.sound-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: inherit;
}

.sound-btn.active .sound-label {
    color: var(--current-accent);
}

.sound-volume {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sound-volume label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sound-volume input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
}

.sound-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--current-accent);
    cursor: pointer;
    border: none;
}

.sound-volume input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--current-accent);
    cursor: pointer;
    border: none;
}

.tasks-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tasks-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.tasks-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-clear:hover {
    color: var(--accent-work);
    background: rgba(255, 107, 107, 0.1);
}

.task-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.task-input {
    flex: 1;
    padding: 0.85rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.task-input:focus {
    border-color: var(--current-accent);
}

.task-input::placeholder {
    color: var(--text-muted);
}

.btn-add {
    padding: 0.85rem 1.25rem;
    background: var(--current-accent);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: scale(1.05);
}

.task-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

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

.task-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

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

.task-item:hover {
    background: var(--border-color);
}

.task-item.active {
    border-left: 3px solid var(--current-accent);
}

.task-item.active.timer-running {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 12px rgba(255, 107, 107, 0.3); }
}

.task-focus-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--current-accent);
    background: rgba(255, 107, 107, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.task-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.task-checkbox:hover {
    border-color: var(--current-accent);
}

.task-item.completed .task-checkbox {
    background: var(--current-accent);
    border-color: var(--current-accent);
}

.task-checkbox::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.task-item.completed .task-checkbox::after {
    opacity: 1;
    transform: scale(1);
}

.task-text {
    flex: 1;
    font-size: 0.9rem;
    cursor: pointer;
}

.task-pomodoros {
    display: flex;
    gap: 3px;
    margin-right: 0.5rem;
}

.pomodoro-dot {
    width: 8px;
    height: 8px;
    background: var(--border-color);
    border-radius: 50%;
}

.pomodoro-dot.filled {
    background: var(--current-accent);
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-edit,
.task-delete {
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
    background: none;
    border: none;
    font-size: 1rem;
    line-height: 1;
}

.task-edit:hover {
    color: var(--accent-custom);
}

.task-delete:hover {
    color: var(--accent-work);
}

.task-edit-input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--current-accent);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.stats-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stats-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Collapsible sections */
.collapsible-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none;
    border-radius: 24px;
    margin: 0.25rem;
}

.collapsible-header:hover {
    background: var(--bg-tertiary);
}

.collapsible-card:not(.collapsed) .collapsible-header {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.collapsible-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.collapsible-card.collapsed .collapsible-toggle {
    transform: rotate(-90deg);
}

.collapsible-content {
    padding: 0.5rem 1.5rem 1.5rem;
    transition: all 0.3s ease;
}

.collapsible-card.collapsed .collapsible-content {
    display: none;
}

/* Stats inside collapsible */
.collapsible-card .stats-grid {
    margin-top: 0;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--current-accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.floating-btn {
    position: fixed;
    bottom: 2rem;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.floating-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.help-toggle {
    left: 2rem;
}

.help-toggle:hover {
    transform: scale(1.1);
}

.settings-toggle {
    right: 2rem;
}

.settings-toggle:hover {
    transform: rotate(45deg);
}

.settings-panel {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: none;
    width: 280px;
    z-index: 100;
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.settings-panel h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.setting-item input {
    width: 100%;
    padding: 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.setting-item input:focus {
    outline: none;
    border-color: var(--current-accent);
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--current-accent);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

.help-panel {
    position: fixed;
    bottom: 6rem;
    left: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: none;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 100;
}

.help-panel::-webkit-scrollbar {
    width: 6px;
}

.help-panel::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.help-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.help-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.help-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.help-panel h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.faq-answer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-answer kbd {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.site-footer {
    margin-top: 2rem;
    padding: 1.5rem 0 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.site-footer p {
    margin-bottom: 0.25rem;
}

/* Timer Mode Toggle (Quick Start / Playlists) */
.timer-mode-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.timer-mode-toggle-inner {
    display: flex;
    background: var(--bg-tertiary);
    padding: 0.25rem;
    border-radius: 10px;
    gap: 0.25rem;
}

.timer-mode-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.timer-mode-btn:hover {
    color: var(--text-primary);
}

.timer-mode-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Playlist Queue Display */
.playlist-queue {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.playlist-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.playlist-progress {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.playlist-change-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.playlist-change-btn:hover {
    border-color: var(--current-accent);
    color: var(--current-accent);
}

.queue-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.queue-list::-webkit-scrollbar {
    width: 4px;
}

.queue-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.queue-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.35rem;
    transition: all 0.3s ease;
}

.queue-item.completed {
    opacity: 0.5;
}

.queue-item.current {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--current-accent);
}

.queue-item.upcoming {
    color: var(--text-secondary);
}

.queue-item-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.queue-item.completed .queue-item-icon {
    background: var(--current-accent);
    color: white;
}

.queue-item.current .queue-item-icon {
    background: var(--current-accent);
    animation: pulse-icon 2s ease-in-out infinite;
}

.queue-item.upcoming .queue-item-icon {
    border: 2px solid var(--border-color);
}

@keyframes pulse-icon {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(255, 107, 107, 0); }
}

.queue-item-label {
    font-size: 0.85rem;
}

.queue-item-duration {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Playlist Selector Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.playlist-option {
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.playlist-option:hover {
    border-color: var(--border-color);
}

.playlist-option.selected {
    border-color: var(--current-accent);
    background: rgba(255, 107, 107, 0.1);
}

.playlist-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.playlist-option-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.playlist-option-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.playlist-option-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.playlist-option-sessions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.playlist-session-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.playlist-session-pill.focus {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-work);
}

.playlist-session-pill.break {
    background: rgba(78, 205, 196, 0.2);
    color: var(--accent-break);
}

.playlist-session-pill.long-break {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-long);
}

.modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn-primary {
    padding: 0.75rem 1.5rem;
}

@media (max-width: 500px) {
    body {
        padding: 1rem;
    }

    .timer-card {
        padding: 1.5rem;
    }

    .timer-ring {
        width: 180px;
        height: 180px;
    }

    .timer-time {
        font-size: 2.75rem;
    }

    .btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }

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

    .stat-item {
        padding: 0.75rem 0.5rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .mode-tab {
        font-size: 0.7rem;
        padding: 0.75rem 0.25rem;
    }

    .timer-mode-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .playlist-option {
        padding: 0.85rem;
    }
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.sidebar-nav-link {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

/* Learn More Links */
.learn-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.learn-links li {
    margin-bottom: 0.5rem;
}

.learn-links li:last-child {
    margin-bottom: 0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.learn-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.learn-links a:hover {
    color: var(--current-accent);
    background: var(--bg-tertiary);
}

.learn-links li:last-child a {
    color: var(--current-accent);
    font-weight: 500;
    text-align: center;
}

/* Tips Card */

.tip-content {
    margin-bottom: 1rem;
}

.tip-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 3.2em;
    transition: opacity 0.15s ease;
}

.tip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tip-refresh {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-refresh:hover {
    color: var(--current-accent);
    border-color: var(--current-accent);
}

.tip-refresh svg {
    transition: transform 0.3s ease;
}

.tip-refresh:hover svg {
    transform: rotate(180deg);
}

.tip-more-link {
    font-size: 0.8rem;
    color: var(--current-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.tip-more-link:hover {
    background: rgba(255, 107, 107, 0.1);
}

.noscript-message {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin: 2rem auto;
    max-width: 400px;
}

.noscript-message h2 {
    color: var(--accent-work);
    margin-bottom: 1rem;
}

.noscript-message p {
    color: var(--text-secondary);
}
