/* Import shared design system */
@import url('../shared-design-system.css');

/* Timer-specific overrides and additions */
:root {
    /* Timer-specific action colors */
    --pause: var(--warning);
    --pause-foreground: var(--warning-foreground);
    
    /* Enhanced cyberpunk theme tokens for timer */
    --timer-glow: 0 0 20px rgb(16 163 127 / 0.3);
    --timer-accent-gradient: linear-gradient(135deg, var(--cyberpunk-teal), var(--cyberpunk-teal-dark));
}

/* Timer-specific body styles */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--gap);
    font-size: 1.125rem;
}

.container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* Timer-specific header adjustments - inherits from shared design system */

h1 {
    text-align: center;
    color: var(--content);
    margin: 0 0 40px 0;
    font-size: var(--font-size-4xl);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.setup-section {
    margin-bottom: 40px;
}

.input-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inputs now use shared design system .input class */
input[type="text"],
input[type="number"] {
    font-size: 16px; /* Timer-specific override for better mobile UX */
}

.timer-display {
    text-align: center;
    margin: 60px 0;
}

.current-topic {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 16px;
    min-height: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.current-topic:not(:empty) {
    color: var(--cyberpunk-teal);
}

.timer {
    font-size: 72px;
    font-weight: 300;
    color: var(--content);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -2px;
    font-family: 'Inter', var(--font-system);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced timer states */
.timer.running {
    color: var(--cyberpunk-teal);
    text-shadow: var(--timer-glow);
}

.timer.paused {
    color: var(--warning);
    animation: pulse 2s infinite;
}

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

.status {
    font-size: 14px;
    color: var(--tertiary);
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 60px;
}

.btn {
    /* Extends shared button styles with timer-specific styling */
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 2.75rem;
    padding: 0.75rem 1.5rem;
}

.btn-start {
    /* Use shared success button variant */
}

.btn-pause {
    /* Use shared warning button variant with pause alias */
    background: var(--pause);
    color: var(--pause-foreground);
    border-color: var(--pause);
}

.btn-pause:hover:not(:disabled) {
    background: rgb(245 158 11 / 0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-reset {
    /* Use shared outline button variant */
    color: var(--secondary);
    transition: all 0.2s ease;
}

.btn-reset:hover:not(:disabled) {
    color: var(--content);
    border-color: var(--cyberpunk-teal);
    background: var(--cyberpunk-teal-light);
    transform: translateY(-1px);
}

.stats {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stats h3 {
    color: var(--content);
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.shortcuts-info {
    margin-bottom: 20px;
    padding: 0.75rem 1rem;
    background: var(--cyberpunk-teal-light);
    border: 1px solid rgb(16 163 127 / 0.2);
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    color: var(--muted-foreground);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shortcuts-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--timer-accent-gradient);
}

.shortcuts-info p {
    margin: 0;
}

.stats-summary {
    padding: 0.75rem;
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--secondary);
    margin-bottom: var(--content-gap);
}

.history {
    max-height: 240px;
    overflow-y: auto;
}

.no-sessions {
    text-align: center;
    color: var(--tertiary);
    padding: 20px;
    font-size: 14px;
}

.session-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.session-item:last-child {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.session-item:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--cyberpunk-teal-light);
}

.session-topic {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.session-item:hover .session-topic {
    color: var(--cyberpunk-teal);
}

.session-meta {
    font-size: 14px;
    color: var(--tertiary);
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .timer {
        font-size: 60px;
    }
    
    .controls {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: var(--font-size-sm);
        min-height: 44px;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }
    
    .timer {
        font-size: 48px;
    }
    
    .controls {
        gap: 10px;
    }
    
    .btn {
        padding: 1rem 1.125rem;
        font-size: var(--font-size-xs);
        flex: 1;
        min-width: 0;
    }
    
    h1 {
        font-size: var(--font-size-2xl);
        margin-bottom: 32px;
    }
    
    .current-topic {
        font-size: var(--font-size-sm);
    }
}

/* Enhanced theme system with sepia support */
.theme-toggle {
    /* Enhanced from shared design system */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Smooth theme transitions */
* {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .timer {
        text-shadow: none;
    }
    
    .timer.running {
        color: var(--content);
        font-weight: 600;
    }
    
    .btn:focus-visible {
        outline-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .timer.paused {
        animation: none;
    }
}