/* ============================================
   Reset — Workplace Stress Relief
   Professional, minimal, calming aesthetic
   ============================================ */

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --text-primary: #e8e8ed;
    --text-secondary: #8a8a9a;
    --text-muted: #5a5a6a;
    --accent: #64ffda;
    --accent-dim: rgba(100, 255, 218, 0.1);
    --accent-glow: rgba(100, 255, 218, 0.3);
    --warning: #ffd93d;
    --success: #6bcb77;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    --transition: 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    width: 100%;
    height: 100vh;
    position: relative;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Navigation */
.game-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, var(--bg-primary), transparent);
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--accent);
}

.timer-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transition: opacity var(--transition);
}

.timer-display.visible {
    opacity: 1;
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Title Screen */
.title-content {
    text-align: center;
    padding: 20px;
    max-width: 500px;
    width: 100%;
}

.title-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: rotate 8s linear infinite;
}

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

.title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Mode Selection */
.mode-selection {
    margin-bottom: 30px;
}

.mode-selection h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.mode-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mode-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 20px 15px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}

.mode-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mode-card.featured {
    border-color: var(--accent-glow);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(100, 255, 218, 0.05) 100%);
}

.mode-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.mode-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

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

.mode-time {
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.mode-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Sound Toggle */
.sound-toggle {
    margin-top: 30px;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    position: relative;
    transition: background var(--transition);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all var(--transition);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--accent-dim);
}

.toggle-label input:checked + .toggle-switch::after {
    background: var(--accent);
    transform: translateX(20px);
}

.toggle-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sound-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Game Screen */
.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 40px;
}

/* Progress Ring */
.progress-container {
    position: relative;
    width: 280px;
    height: 280px;
}

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

.progress-bg {
    fill: none;
    stroke: var(--bg-card);
    stroke-width: 4;
}

.progress-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

/* Breath Indicator */
.breath-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.breath-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0%, var(--accent-dim) 50%, transparent 70%);
    opacity: 0.8;
    transition: transform 4s ease-in-out, opacity 0.5s ease;
}

.breath-circle.inhale {
    transform: scale(1.4);
    opacity: 1;
}

.breath-circle.hold {
    transform: scale(1.4);
    opacity: 0.9;
}

.breath-circle.exhale {
    transform: scale(0.8);
    opacity: 0.6;
}

.breath-text {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-transform: uppercase;
}

/* Instruction Area */
.instruction-area {
    text-align: center;
    min-height: 60px;
}

.instruction {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: opacity var(--transition);
}

.sub-instruction {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Phase Indicator */
.phase-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.phase-dots {
    display: flex;
    gap: 8px;
}

.phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-card);
    transition: all var(--transition);
}

.phase-dot.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.phase-dot.complete {
    background: var(--success);
}

.phase-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Pause Button */
.pause-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.pause-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 200;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    text-align: center;
    padding: 40px;
}

.overlay-content h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.overlay-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.overlay-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* End Screen */
.end-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
}

.end-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #4dd0a0 100%);
    color: var(--bg-primary);
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: checkPop 0.5s ease;
}

@keyframes checkPop {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.end-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.end-message {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.session-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 35px;
    padding: 25px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.end-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

.reminder {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 12px 20px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

/* Eye Exercise Specific */
.eye-target {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: all 1s ease;
    opacity: 0;
}

.eye-target.active {
    opacity: 1;
}

/* Body Scan Specific */
.body-highlight {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: all 0.5s ease;
}

.body-highlight.active {
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .title {
        font-size: 2.5rem;
    }
    
    .mode-cards {
        grid-template-columns: 1fr;
    }
    
    .progress-container {
        width: 240px;
        height: 240px;
    }
    
    .breath-circle {
        width: 100px;
        height: 100px;
    }
    
    .session-stats {
        gap: 30px;
    }
    
    .end-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Ambient Animation */
@keyframes ambientPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

.game-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
    animation: ambientPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.screen {
    z-index: 1;
}



