/* ============================================
   SEQUENCE TIMER - STYLES
   A beautiful, modern timer application
   ============================================ */

/* CSS Variables */
:root {
    /* Typography */
    --font-display: 'JetBrains Mono', monospace;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Accent Colors (shared) */
    --accent-primary: #06b6d4;
    --accent-secondary: #0891b2;
    --accent-glow: rgba(6, 182, 212, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
}

/* Light Theme (default) */
:root,
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --gradient-bg: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.2);
    
    --card-border: rgba(0, 0, 0, 0.08);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: #1e2a3a;
    --bg-hover: #243447;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --gradient-bg: linear-gradient(180deg, #0f172a 0%, #0a0e17 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
    
    --card-border: rgba(255, 255, 255, 0.05);
}


/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background var(--transition-slow), color var(--transition-normal);
}

/* Background Pattern - Subtle, letting cards own the color */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(148, 163, 184, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: opacity var(--transition-slow);
}

[data-theme="light"] body::before {
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(148, 163, 184, 0.05) 0%, transparent 60%);
}

#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* View System */
.view {
    display: none !important;
    opacity: 0;
}

.view.active {
    display: block !important;
    opacity: 1;
    animation: viewEnter 0.5s ease forwards;
}

.view.exiting {
    display: block !important;
    animation: viewExit 0.4s ease forwards;
}

/* Specific display types for views that need flex */
#creation-view.active,
#creation-view.exiting {
    display: flex !important;
}

#welcome-view.active,
#welcome-view.exiting {
    display: flex !important;
}

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

@keyframes viewExit {
    from { 
        opacity: 1; 
        transform: translateX(0) scale(1);
    }
    to { 
        opacity: 0; 
        transform: translateX(-30px) scale(0.98);
    }
}

/* Mobile-friendly transitions */
@media (max-width: 480px) {
    @keyframes viewEnter {
        from { 
            opacity: 0; 
            transform: translateY(20px);
        }
        to { 
            opacity: 1; 
            transform: translateY(0);
        }
    }
    
    @keyframes viewExit {
        from { 
            opacity: 1; 
            transform: translateY(0);
        }
        to { 
            opacity: 0; 
            transform: translateY(-20px);
        }
    }
}

/* ============================================
   WELCOME VIEW
   ============================================ */

#welcome-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

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

.welcome-content {
    text-align: center;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    animation: float 3s ease-in-out infinite;
}

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

.welcome-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-xs);
    line-height: 1.1;
}

.welcome-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-weight: 300;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    transition: all var(--transition-normal);
}

.feature-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.feature-text span {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.btn-get-started {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: var(--space-lg);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-get-started:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow), 0 10px 40px rgba(6, 182, 212, 0.3);
}

.btn-get-started:active {
    transform: translateY(0) scale(0.96);
    transition: transform 0.1s ease;
}

/* Ripple effect for mobile tap feedback */
.btn-get-started.pressed {
    animation: buttonPress 0.3s ease;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.btn-get-started:hover .btn-arrow {
    transform: translateX(4px);
}

.welcome-footer {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* Welcome responsive */
@media (max-width: 480px) {
    #welcome-view {
        padding: var(--space-md);
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
    
    .welcome-tagline {
        font-size: 1rem;
    }
    
    .feature-item {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .feature-text strong {
        font-size: 0.9rem;
    }
    
    .feature-text span {
        font-size: 0.8rem;
    }
    
    .btn-get-started {
        width: 100%;
        padding: var(--space-md);
    }
}

/* ============================================
   CREATION VIEW
   ============================================ */

#creation-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-header {
    text-align: center;
    padding: var(--space-md) var(--space-md);
    flex-shrink: 0;
}

.app-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
}

.creation-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-md);
    padding: 0 var(--space-md) var(--space-md);
    min-height: 0;
    overflow: hidden;
}

/* Section Styling */
section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Saved Sequences Section */
.saved-sequences-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Saved Sequences List */
.saved-sequences-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: var(--space-xs);
}

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

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

.saved-sequences-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

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

.saved-sequence-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition-normal);
    cursor: pointer;
    flex-shrink: 0;
}

.saved-sequence-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.saved-sequence-info {
    flex: 1;
    min-width: 0;
}

.saved-sequence-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-sequence-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: var(--space-sm);
}

.saved-sequence-actions {
    display: flex;
    gap: 2px;
}

.saved-sequence-actions button {
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.saved-sequence-actions button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.saved-sequence-actions .edit-btn:hover {
    color: var(--accent-primary);
}

.saved-sequence-actions .delete-btn:hover {
    color: var(--danger);
}

.saved-sequence-actions .play-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.saved-sequence-actions .play-btn:hover {
    background: var(--accent-secondary);
    box-shadow: var(--shadow-glow);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
}

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

.empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-xs);
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.85rem;
}

/* Timer Builder Section */
.timer-builder-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Top Controls Row - Name + Sound */
.builder-top-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

/* Sequence Name Input */
.sequence-name-input {
    flex: 1;
    min-width: 0;
}

.sequence-name-input label,
.sound-selection label,
.timer-list-container > label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sequence-name-input input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: all var(--transition-normal);
}

.sequence-name-input input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* Sound Selection */
.sound-selection {
    flex-shrink: 0;
}

.sound-options {
    display: flex;
    gap: 4px;
}

.sound-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.sound-option:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sound-option.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.sound-option .sound-name {
    display: none;
}

.sound-option:hover::after {
    content: attr(data-sound);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    text-transform: capitalize;
    white-space: nowrap;
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
    z-index: 10;
}

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

/* Timer List */
.timer-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: var(--space-sm);
}

.timer-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: var(--space-xs);
}

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

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

.timer-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.timer-list:empty + .empty-state {
    display: block;
}

.timer-list:not(:empty) + .empty-state {
    display: none;
}

.timer-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    cursor: grab;
    flex-shrink: 0;
}

.timer-item:active {
    cursor: grabbing;
}

.timer-item.dragging {
    opacity: 0.5;
    border-color: var(--accent-primary);
}

.timer-item.drag-over {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.timer-item-handle {
    color: var(--text-muted);
    font-size: 1rem;
    cursor: grab;
    user-select: none;
}

.timer-item-number {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.timer-item-time {
    flex: 1;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timer-item-remove {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.timer-item-remove:hover {
    background: var(--danger-glow);
    color: var(--danger);
}

/* Add Timer Section */
.add-timer-section {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    flex-shrink: 0;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.time-input-group input {
    width: 52px;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    transition: all var(--transition-normal);
}

.time-input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.time-input-group label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.time-separator {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 20px var(--success-glow);
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
}

.btn-accent:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--bg-tertiary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

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

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.action-buttons .btn {
    flex: 1;
}

.hidden {
    display: none !important;
}

/* ============================================
   TIMER VIEW (FULLSCREEN)
   ============================================ */

#timer-view {
    position: fixed;
    inset: 0;
    background: var(--gradient-bg);
    z-index: 100;
}

#timer-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

[data-theme="light"] #timer-view::before {
    background-image: 
        radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
}

.timer-view-container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xl);
    padding-bottom: 180px; /* Space for fixed buttons */
    gap: var(--space-lg);
    background: var(--bg-primary);
    z-index: 1000;
    overflow-y: auto;
}

.back-timer-btn {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: 30;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
}

.back-timer-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.timer-stage-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* Back Button */
.back-button {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Sequence Info */
.sequence-info {
    text-align: center;
}

.sequence-info h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Timer Display */
.timer-display-container {
    text-align: center;
}

.timer-display {
    font-family: var(--font-display);
    font-size: clamp(5rem, 25vw, 10rem);
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 0 0 60px var(--accent-glow);
    letter-spacing: 0.1em;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
    margin: var(--space-xl) 0;
}

.timer-display.paused {
    animation: none;
    opacity: 0.7;
}

.timer-display.completed {
    color: var(--success);
    text-shadow: 0 0 60px var(--success-glow);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.timer-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

/* Total Progress */
.total-progress-section {
    width: 100%;
    max-width: 500px;
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s linear;
}

.progress-labels {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-display);
}

/* Sequence Overview */
.sequence-overview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    max-width: 600px;
}

.sequence-overview-item {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.sequence-overview-item.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.1);
}

.sequence-overview-item.completed {
    background: var(--success);
    color: white;
    opacity: 0.7;
}

/* Timer Controls */
.total-time-section {
    width: 100%;
    max-width: 600px;
    margin: var(--space-md) auto;
}

.total-time-remaining {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display);
    margin-bottom: var(--space-sm);
    text-align: center;
}

.total-progress-container {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-sm);
}

.total-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s linear;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.stage-progress-visual {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    max-width: 90%;
}

.stage-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--card-border);
    transition: all var(--transition-normal);
}

.stage-indicator.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
    transform: scale(1.3);
}

.stage-indicator.completed {
    background: var(--success);
    border-color: var(--success);
    opacity: 0.7;
}

.timer-controls-fullscreen {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
    border-top: 1px solid var(--card-border);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.control-btn-fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 100px;
    box-shadow: var(--shadow-md);
}

.control-btn-fullscreen:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.control-btn-fullscreen.control-btn-primary {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    min-width: 120px;
}

.control-btn-fullscreen.control-btn-primary:hover {
    box-shadow: var(--shadow-glow);
}


.control-btn-fullscreen .control-icon {
    font-size: 2.5rem;
}

.control-btn-fullscreen .control-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 80px;
    box-shadow: var(--shadow-sm);
}

.control-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.control-btn-primary {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    min-width: 100px;
}

.control-btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px) scale(1.05);
}

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

.control-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Completed Overlay */
.completed-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 23, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
    z-index: 20;
    pointer-events: auto;
}

.completed-overlay.hidden {
    display: none;
    pointer-events: none;
}

[data-theme="light"] .completed-overlay {
    background: rgba(248, 250, 252, 0.97);
}

.completed-content {
    text-align: center;
    padding: var(--space-2xl);
    position: relative;
    z-index: 21;
    pointer-events: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 90%;
    margin: 0 auto;
}

.completed-icon {
    font-size: 5rem;
    display: block;
    margin-bottom: var(--space-lg);
    animation: bounce 1s ease infinite;
}

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

.completed-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.completed-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.completed-feedback-form {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-align: left;
}

.completed-feedback-form .feedback-form-group {
    margin-bottom: var(--space-md);
}

.completed-feedback-form .feedback-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.completed-feedback-form .feedback-form-group textarea,
.completed-feedback-form .feedback-form-group input[type="email"] {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    box-sizing: border-box;
}

.completed-feedback-form .feedback-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.completed-feedback-form .feedback-form-group textarea:focus,
.completed-feedback-form .feedback-form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.completed-feedback-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-md);
}

.completed-feedback-actions .btn {
    min-width: 180px;
}

/* Feedback Prompt */
.feedback-prompt {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.feedback-prompt.hidden {
    display: none;
}

.feedback-question {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    text-align: center;
}

.feedback-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
}

.feedback-option {
    background: var(--bg-card);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-full);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.feedback-option:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    transform: scale(1.1);
}

.feedback-option:active {
    transform: scale(0.95);
}

.feedback-emoji {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
}

.completed-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

.completed-actions .btn {
    min-width: 220px;
}

.completed-actions .btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

[data-theme="light"] .completed-actions .btn-ghost {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.completed-actions .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .completed-actions .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet - Switch to vertical layout */
@media (max-width: 900px) {
    #creation-view {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    
    .creation-main {
        grid-template-columns: 1fr;
        overflow: visible;
    }
    
    section {
        max-height: none;
        overflow: visible;
    }
    
    .saved-sequences-list,
    .timer-list {
        max-height: 200px;
    }
    
    .builder-top-row {
        flex-direction: column;
    }
    
    .sound-options {
        justify-content: flex-start;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .app-header {
        padding: var(--space-sm);
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .creation-main {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    section {
        padding: var(--space-sm);
    }
    
    .add-timer-section {
        flex-wrap: wrap;
    }
    
    .time-input-group input {
        width: 48px;
        font-size: 1rem;
    }
    
    .time-separator {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .timer-view-container {
        padding: var(--space-md);
        gap: var(--space-md);
    }
    
    .back-button {
        top: var(--space-sm);
        left: var(--space-sm);
        font-size: 0.8rem;
    }
    
    .sequence-info h2 {
        font-size: 1.1rem;
    }
    
    .timer-display {
        font-size: clamp(4rem, 22vw, 8rem);
    }
    
    .timer-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
    }
    
    .control-btn {
        min-width: 60px;
        padding: var(--space-sm);
    }
    
    .control-icon {
        font-size: 1.2rem;
    }
    
    .control-label {
        font-size: 0.65rem;
    }
    
    .sequence-overview {
        gap: var(--space-xs);
    }
    
    .sequence-overview-item {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8rem;
    }
    
    .completed-icon {
        font-size: 3rem;
    }
    
    .completed-content h2 {
        font-size: 1.75rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .timer-item,
    .saved-sequence-item,
    .btn,
    .control-btn {
        min-height: 44px;
    }
    
    .timer-item-remove,
    .saved-sequence-actions button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .timer-view-container {
        padding: var(--space-sm);
        padding-bottom: 100px;
        gap: var(--space-xs);
        overflow-y: auto;
    }
    
    .timer-display {
        font-size: clamp(5rem, 20vw, 8rem);
        margin: var(--space-xs) 0;
    }
    
    .sequence-info,
    .sequence-overview {
        display: none;
    }
    
    .timer-controls {
        margin-top: var(--space-xs);
    }
    
    .timer-controls-fullscreen {
        padding: var(--space-xs) var(--space-sm);
        height: auto;
        min-height: 70px;
    }
    
    .control-btn {
        padding: var(--space-xs) var(--space-sm);
        min-width: 60px;
    }
    
    .control-btn-primary {
        min-width: 70px;
    }
    
    .control-icon {
        font-size: 1.2rem;
    }
    
    .control-label {
        font-size: 0.65rem;
    }
    
    .control-btn-fullscreen {
        padding: var(--space-xs) var(--space-sm);
        min-width: 70px;
    }
    
    .control-btn-fullscreen.control-btn-primary {
        min-width: 80px;
    }
    
    .control-btn-fullscreen .control-icon {
        font-size: 1.5rem;
    }
    
    .control-btn-fullscreen .control-label {
        font-size: 0.7rem;
    }
    
    .total-progress-section,
    .total-time-section {
        display: block;
        margin: var(--space-xs) auto var(--space-sm) auto;
        max-width: 90%;
        position: relative;
        z-index: 10;
    }
    
    .total-progress-container,
    .progress-bar-container {
        height: 14px;
        margin-top: var(--space-xs);
        margin-bottom: var(--space-xs);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        background: rgba(0, 0, 0, 0.25);
        border: 2px solid var(--card-border);
        border-radius: var(--radius-full);
    }
    
    .total-progress-bar,
    .progress-bar {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
        height: 100%;
        min-height: 14px;
    }
    
    .total-time-remaining {
        font-size: 1rem;
        margin-bottom: var(--space-xs);
        font-weight: 700;
    }
    
    .progress-labels {
        font-size: 0.75rem;
        margin-top: var(--space-xs);
        font-weight: 600;
    }
}

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

/* Focus States */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   DASHBOARD VIEW
   ============================================ */

#dashboard-view {
    min-height: 100vh;
    padding: var(--space-lg);
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.dashboard-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dashboard-header .logo img {
    height: 60px;
    width: auto;
    display: block;
    max-width: none;
}

.sync-devices-btn {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sync-devices-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.sync-devices-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.sync-modal-content {
    padding: var(--space-xl);
}

.sync-coming-soon {
    margin-bottom: var(--space-xl);
}

.sync-message {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.sync-question {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.sync-email-section {
    margin-top: var(--space-xl);
}

.sync-email-section.hidden {
    display: none;
}

.sync-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

.sync-buttons.hidden {
    display: none;
}

.sync-buttons .btn {
    flex: 1;
    max-width: 200px;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-feedback {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-feedback:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.btn-new {
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr 350px;
    gap: var(--space-xl);
    align-items: start;
}

/* Sidebar */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.category-list,
.tag-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.category-item,
.tag-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
    width: 100%;
}

.category-item:hover,
.tag-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.category-item.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

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

.tag-item {
    justify-content: center;
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-sm);
}

/* Main Content */
/* Intentions Section - Top Level (outside dashboard-main) */
.intentions-section {
    margin-bottom: var(--space-2xl);
    width: 100%;
}

.explore-section {
    width: 100%;
}

.explore-section .preset-library-header {
    margin-top: 0;
}

.intentions-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    letter-spacing: -0.02em;
}

.intentions-container {
    width: 100%;
}

.intentions-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
    justify-content: center;
}

.intention-card {
    flex: 1 1 140px;
    max-width: 200px;
    min-height: 200px;
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* Decorative line drawings with gradients */
.intention-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    border-radius: var(--radius-lg);
}

/* Calm - Soft sage to teal gradient */
.intention-card[data-intention="calm"]::before {
    background: 
        radial-gradient(
            ellipse at 30% 20%,
            rgba(168, 213, 186, 0.25) 0%,
            transparent 50%
        ),
        linear-gradient(
            135deg,
            rgba(111, 177, 160, 0.12) 0%,
            rgba(168, 213, 186, 0.08) 100%
        );
}

/* Focus - Indigo to electric blue gradient */
.intention-card[data-intention="focus"]::before {
    background: 
        radial-gradient(
            ellipse at 70% 30%,
            rgba(63, 81, 181, 0.2) 0%,
            transparent 50%
        ),
        linear-gradient(
            135deg,
            rgba(33, 150, 243, 0.1) 0%,
            rgba(63, 81, 181, 0.15) 100%
        );
}

/* Reset - Fresh green gradient */
.intention-card[data-intention="reset"]::before {
    background: 
        radial-gradient(
            ellipse at 50% 80%,
            rgba(16, 185, 129, 0.2) 0%,
            transparent 50%
        ),
        linear-gradient(
            180deg,
            rgba(6, 182, 212, 0.08) 0%,
            rgba(16, 185, 129, 0.12) 100%
        );
}

/* Wind-down - Calming purple to deep blue gradient */
.intention-card[data-intention="wind-down"]::before {
    background: 
        radial-gradient(
            ellipse at 80% 20%,
            rgba(139, 92, 246, 0.18) 0%,
            transparent 50%
        ),
        linear-gradient(
            150deg,
            rgba(59, 130, 246, 0.1) 0%,
            rgba(139, 92, 246, 0.12) 100%
        );
}

/* Quick-break - Light teal gradient */
.intention-card[data-intention="quick-break"]::before {
    background: 
        radial-gradient(
            ellipse at 40% 60%,
            rgba(20, 184, 166, 0.15) 0%,
            transparent 50%
        ),
        linear-gradient(
            120deg,
            rgba(34, 197, 94, 0.08) 0%,
            rgba(20, 184, 166, 0.1) 100%
        );
}

.intention-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.intention-card:active {
    transform: translateY(0);
    box-shadow: none;
}

.intention-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.intention-icon .zenowel-icon {
    width: 100%;
    height: 100%;
}

.intention-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.intention-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.intention-description {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0;
}

.intention-start-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--text-primary);
    color: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-body);
    display: inline-block;
    transition: all var(--transition-normal);
    align-self: flex-start;
    margin-top: auto;
    pointer-events: none;
}

.intention-card:hover .intention-start-btn {
    background: var(--accent-primary);
    color: white;
}

/* Desktop: Show more cards horizontally with larger sizes */
@media (min-width: 768px) {
    .intention-card {
        flex: 1 1 160px;
        max-width: 220px;
        min-height: 220px;
    }
    
    .intention-icon {
        width: 48px;
        height: 48px;
    }
    
    .intention-label {
        font-size: 1.05rem;
    }
    
    .intention-description {
        font-size: 0.85rem;
    }
    
    .intentions-title {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .intention-card {
        flex: 1 1 180px;
        max-width: 240px;
        min-height: 240px;
        padding: var(--space-xl);
    }
    
    .intention-icon {
        width: 56px;
        height: 56px;
    }
    
    .intention-label {
        font-size: 1.1rem;
    }
    
    .intention-description {
        font-size: 0.875rem;
    }
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.preset-library-header {
    margin-bottom: var(--space-md);
}

.library-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
}

.library-search {
    margin-bottom: var(--space-md);
}

.search-input {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    width: 100%;
    max-width: 400px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.preset-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
}

.filter-row {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.preset-library {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    flex: 1;
}

.preset-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    min-height: 160px;
    height: auto;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.preset-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.preset-card.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.preset-card-builtin {
    border-color: var(--accent-primary);
    border-width: 2px;
}

.preset-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
    flex-shrink: 0;
}

.preset-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    width: 100%;
    justify-content: flex-start;
    min-height: 0;
    overflow: hidden;
}

.preset-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.preset-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.7rem;
    color: var(--text-muted);
    width: 100%;
}

.preset-headline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    justify-content: center;
}

.preset-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    white-space: nowrap;
}

.preset-tag-effort {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.preset-tag-effort-very-low {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.preset-tag-effort-low {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.preset-tag-effort-medium {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.preset-tag-effort-high {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.preset-tag-effort-very-high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.preset-tag-session {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.preset-stages {
    font-family: var(--font-display);
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    max-width: 100%;
}

.preset-duration {
    font-weight: 600;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.preset-card-actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.preset-start-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex: 1;
    min-width: 80px;
    white-space: nowrap;
}

.preset-start-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.preset-use-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex: 1;
    min-width: 60px;
    white-space: nowrap;
}

.preset-use-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

.preset-delete-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
}

.preset-delete-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.preset-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* Preview Panel */
.dashboard-preview {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    height: fit-content;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: var(--space-lg);
    align-self: start;
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.preview-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.preview-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-sm);
    opacity: 0.5;
}

.preview-timer {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.preview-header {
    text-align: center;
}

.preview-icon-large {
    font-size: 4rem;
    text-align: center;
    margin-bottom: var(--space-sm);
}

.preview-timer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

.preview-headline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    text-align: center;
    margin: var(--space-xs) 0;
}

.preview-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
    margin-bottom: var(--space-xs);
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin: var(--space-xs) 0;
    max-height: 40px;
    overflow: hidden;
    align-content: flex-start;
    line-height: 1.2;
}

.preview-tag {
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    margin: 1px 0;
}

.preview-tag-effort {
    font-weight: 600;
}

.preview-tag-effort-very-low {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.preview-tag-effort-low {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.preview-tag-effort-medium {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.preview-tag-effort-high {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.preview-tag-effort-very-high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.preview-tag-session {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.preview-usecases {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--card-border);
}

.preview-usecases-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.preview-usecases-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-usecases-list li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
}

.preview-usecases-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.preview-stages-detail {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--card-border);
}

.preview-stages-detail-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.preview-stages-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-stage-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    padding: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.preview-stage-number {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.preview-stage-label {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.preview-stage-time {
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.75rem;
}

.preview-stages-visual {
    display: flex;
    gap: 2px;
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.stage-bar {
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}

.preview-stages-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-family: var(--font-display);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-total {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-align: center;
    font-family: var(--font-display);
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.btn-preview-start,
.btn-preview-use,
.btn-preview-edit,
.btn-preview-delete,
.btn-preview-favorite {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-preview-start {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-preview-start:hover {
    box-shadow: var(--shadow-glow);
}

.btn-preview-use,
.btn-preview-edit,
.btn-preview-delete,
.btn-preview-favorite {
    background: var(--bg-secondary);
}

.btn-preview-use:hover,
.btn-preview-edit:hover,
.btn-preview-delete:hover,
.btn-preview-favorite:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

/* ============================================
   TIMER CREATION VIEW
   ============================================ */

#creation-view {
    min-height: 100vh;
    padding: var(--space-xl);
    overflow-y: auto;
    position: relative;
}

.creation-container {
    max-width: 700px;
    margin: 0 auto;
}

.creation-header {
    margin-bottom: var(--space-xl);
}

/* Back button in creation view uses same style as timer view */
#creation-view .back-timer-btn {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: 30;
}

#creation-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.creation-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

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

/* Stages List */
.stages-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 100px;
    max-height: none;
}

.stages-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-md);
}

.stage-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    cursor: move;
    transition: all var(--transition-normal);
}

.stage-item.dragging {
    opacity: 0.5;
}

.stage-item.drag-over {
    border-color: var(--accent-primary);
    border-width: 2px;
    background: var(--bg-hover);
}

.stage-drag-handle {
    color: var(--text-muted);
    font-size: 1rem;
    cursor: grab;
    user-select: none;
    padding: var(--space-xs);
    opacity: 0.5;
    transition: opacity var(--transition-normal);
}

.stage-item:hover .stage-drag-handle {
    opacity: 1;
}

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

.stage-label-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--transition-normal);
}

.stage-label-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.stage-time-picker-container {
    position: relative;
}

.stage-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.stage-time-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex: 0 0 auto;
}

.stage-time-inputs input {
    width: 65px;
    padding: var(--space-sm) var(--space-xs);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-normal);
}

.stage-time-inputs input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
    background: var(--bg-card);
}

.stage-time-inputs span {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.125rem;
    padding: 0 var(--space-xs);
}

/* Checkbox for Repeat Option */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    cursor: pointer;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.checkbox-label:hover {
    border-color: var(--accent-primary);
    background: rgba(6, 182, 212, 0.02);
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    margin-top: 2px;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
}

.checkbox-text strong {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Apple-style Time Picker */
.stage-time-picker {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.stage-time-picker.hidden {
    display: none;
}

.time-picker-wheel {
    width: 80px;
    height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    position: relative;
    scroll-snap-type: y mandatory;
    /* Add selection indicator */
    position: relative;
}

.time-picker-wheel::before,
.time-picker-wheel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 30px;
    pointer-events: none;
    z-index: 1;
}

.time-picker-wheel::before {
    top: 60px;
    border-top: 1px solid var(--accent-primary);
    background: linear-gradient(to bottom, rgba(6, 182, 212, 0.1), transparent);
}

.time-picker-wheel::after {
    bottom: 60px;
    border-bottom: 1px solid var(--accent-primary);
    background: linear-gradient(to top, rgba(6, 182, 212, 0.1), transparent);
}

.time-picker-wheel::-webkit-scrollbar {
    width: 4px;
}

.time-picker-wheel::-webkit-scrollbar-track {
    background: transparent;
}

.time-picker-wheel::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
}

.wheel-content {
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-option {
    padding: 8px 4px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    scroll-snap-align: center;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    user-select: none;
}

.wheel-option:hover {
    color: var(--text-primary);
}

.wheel-option.selected {
    color: var(--accent-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.time-separator {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.time-picker-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-left: var(--space-sm);
}

.time-picker-cancel,
.time-picker-done {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.time-picker-done {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.time-picker-cancel:hover {
    background: var(--bg-hover);
}

.time-picker-done:hover {
    background: var(--accent-secondary);
}

.stage-actions {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.stage-duplicate-btn,
.stage-remove-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.stage-duplicate-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.stage-remove-btn {
    font-size: 1.2rem;
}

.stage-remove-btn:hover {
    background: var(--danger-glow);
    color: var(--danger);
    border-color: var(--danger);
}

.btn-add-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 2px dashed var(--card-border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: var(--space-xs);
}

.btn-add-stage span:first-child {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--accent-primary);
}

.btn-add-stage:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(6, 182, 212, 0.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-add-stage:active {
    transform: translateY(0);
}

/* Sound Selector */
.sound-selector {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.sound-option-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    flex: 0 0 auto;
    min-width: 140px;
}

.sound-option-row:hover {
    background: var(--bg-hover);
    border-color: var(--card-border);
}

.sound-option-row.selected {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--accent-primary);
}

.sound-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sound-option-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.sound-option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sound-preview-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}

.sound-preview-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.creation-actions {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--card-border);
}

.creation-actions .btn {
    flex: 1;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
}

.creation-actions .btn:disabled {
    cursor: not-allowed;
    pointer-events: auto; /* Still allow clicks for debugging */
    opacity: 0.5;
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 200px 1fr 300px;
        gap: var(--space-lg);
    }
    
    .dashboard-preview {
        max-height: calc(100vh - 200px);
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--space-lg);
    overflow-y: auto;
}

.mobile-menu-overlay.hidden {
    display: none;
}

.mobile-menu-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--card-border);
}

.mobile-menu-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mobile-category-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Mobile Preview View */
.mobile-preview-view {
    /* Inherits .view display: none by default */
    min-height: 100vh;
    background: var(--bg-primary);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.mobile-preview-view.hidden {
    display: none !important;
}

/* Override .view display: none for mobile preview when active */
.mobile-preview-view.active {
    display: block !important;
}

/* Show mobile preview view on mobile when active */
@media (max-width: 900px) {
    .mobile-preview-view.active {
        display: block !important;
    }
}

.mobile-preview-container {
    max-width: 100%;
    padding: var(--space-md);
    min-height: 100vh;
}

.mobile-preview-header {
    margin-bottom: var(--space-lg);
}

.mobile-preview-back-btn {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-preview-back-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.mobile-preview-content {
    width: 100%;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .dashboard-sidebar {
        display: none; /* Hide sidebar on mobile, use menu instead */
    }
    
    .dashboard-preview {
        display: none; /* Hide preview on mobile, use separate view instead */
    }
    
    .mobile-menu-btn {
        display: block; /* Show menu button on mobile */
    }
    
    .preset-library {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .preset-card {
        min-height: 130px;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .dashboard-header .logo img {
        height: 50px;
    }
    
    .preset-library-header {
        margin-bottom: var(--space-sm);
    }
    
    .library-search {
        margin-bottom: var(--space-sm);
    }
    
    .search-input {
        width: 100%;
        max-width: 100%;
    }
    
    .preset-library {
        grid-template-columns: 1fr;
    }
    
    .preset-card {
        min-height: 120px;
        padding: var(--space-sm);
    }
    
    .preset-icon {
        font-size: 1.5rem;
    }
    
    .preset-name {
        font-size: 0.85rem;
    }
    
    .preset-meta {
        font-size: 0.65rem;
    }
    
    .creation-actions {
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
    }
    
    .creation-actions .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
    
    .timer-view-container {
        padding-bottom: 160px;
    }
    
    .timer-controls-fullscreen {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }
    
    .control-btn-fullscreen {
        padding: var(--space-sm) var(--space-md);
        min-width: 80px;
        gap: 0.25rem;
    }
    
    .control-btn-fullscreen.control-btn-primary {
        min-width: 100px;
    }
    
    .control-btn-fullscreen .control-icon {
        font-size: 1.5rem;
    }
    
    .control-btn-fullscreen .control-label {
        font-size: 0.7rem;
    }
    
    .timer-display {
        font-size: clamp(6rem, 25vw, 12rem);
    }
    
    /* Feedback button styles - stashed */
    /*
    .dashboard-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-feedback {
        width: 100%;
    }
    */
}

/* ============================================
   FEEDBACK MODAL (STASHED - Commented out for future use)
   ============================================ */
/*
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    z-index: 1;
}

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

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--card-border);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

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

.feedback-form {
    padding: var(--space-xl);
}

.feedback-form .form-group {
    margin-bottom: var(--space-lg);
}

.feedback-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.feedback-form textarea,
.feedback-form input[type="email"],
.feedback-form select {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.feedback-form textarea {
    resize: vertical;
    min-height: 80px;
}

.feedback-form textarea:focus,
.feedback-form input:focus,
.feedback-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.feedback-form .form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--card-border);
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
        margin: var(--space-md);
    }
    
    .modal-header,
    .feedback-form {
        padding: var(--space-lg);
    }
    
    .feedback-form .form-actions {
        flex-direction: column-reverse;
    }
    
    .feedback-form .form-actions .btn {
        width: 100%;
    }
}
*/

/* ============================================
   FEEDBACK FLOATING BUTTON & MODAL
   ============================================ */

/* Feedback Floating Button - FlowTymer Branding */
.feedback-float-btn {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    padding: var(--space-md) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 4px 12px rgba(6, 182, 212, 0.3);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.feedback-float-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow), 0 6px 20px rgba(6, 182, 212, 0.4);
}

.feedback-float-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

/* Feedback Modal - FlowTymer Branding */
.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    pointer-events: none;
}

.feedback-modal.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

/* Modal Overlay with fade animation */
.feedback-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    animation: feedbackFadeIn 0.3s ease;
    pointer-events: auto;
}

[data-theme="light"] .feedback-modal-overlay {
    background: rgba(0, 0, 0, 0.4);
}

/* Modal Content with fade and scale animation */
.feedback-modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: feedbackModalEnter 0.3s ease;
    z-index: 1;
    pointer-events: auto;
}

/* Animations */
@keyframes feedbackFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--card-border);
}

.feedback-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.feedback-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

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

.feedback-form {
    padding: var(--space-xl);
}

.feedback-form-group {
    margin-bottom: var(--space-lg);
}

.feedback-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.feedback-form-group textarea,
.feedback-form-group input[type="email"] {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-normal);
    box-sizing: border-box;
}

.feedback-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-form-group textarea:focus,
.feedback-form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

.feedback-form-group textarea:invalid:not(:placeholder-shown),
.feedback-form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.feedback-form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--card-border);
}

/* Mobile-friendly responsive styles */
@media (max-width: 480px) {
    .feedback-float-btn {
        bottom: var(--space-md);
        right: var(--space-md);
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        box-shadow: var(--shadow-md), 0 3px 10px rgba(6, 182, 212, 0.25);
    }
    
    .feedback-float-btn:hover {
        transform: translateY(-1px) scale(1.01);
        box-shadow: var(--shadow-glow), 0 4px 15px rgba(6, 182, 212, 0.35);
    }
    
    .feedback-modal {
        padding: var(--space-md);
    }
    
    .feedback-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-md);
        max-height: 95vh;
        animation: feedbackModalEnter 0.25s ease;
    }
    
    .feedback-modal-overlay {
        backdrop-filter: blur(4px);
    }
    
    .feedback-modal-header,
    .feedback-form {
        padding: var(--space-lg);
    }
    
    .feedback-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .feedback-form-actions {
        flex-direction: column-reverse;
        gap: var(--space-sm);
    }
    
    .feedback-form-actions .btn {
        width: 100%;
    }
    
    .feedback-form-group textarea {
        min-height: 100px;
    }
}

