/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5a5a;
    --primary-light: #ff8787;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --dark: #2d3436;
    --light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    color: white;
}

/* ========================================
   Background & Container
   ======================================== */
.app-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f56565 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.content {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* ========================================
   Header
   ======================================== */
header {
    text-align: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 0.5rem;
    font-weight: 300;
}

/* ========================================
   Timer Card (Glass Morphism)
   ======================================== */
.timer-card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ========================================
   Mode Tabs
   ======================================== */
.mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.mode-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--glass-border);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.mode-btn .icon {
    font-size: 1.25rem;
}

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

.mode-btn .duration {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* ========================================
   Timer Display
   ======================================== */
.timer-display {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.timer-ring {
    position: relative;
    width: 200px;
    height: 200px;
}

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

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: white;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.time {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.status {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ========================================
   Controls
   ======================================== */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.primary {
    width: 80px;
    height: 80px;
    background: white;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    flex-direction: column;
    gap: 0.15rem;
}

.control-btn.primary:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.control-btn.primary:active {
    transform: scale(0.98);
}

.control-btn.primary .play-icon {
    font-size: 1.25rem;
}

.control-btn.primary .btn-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-btn.secondary {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid var(--glass-border);
}

.control-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.control-btn.secondary svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Session Tracker
   ======================================== */
.session-tracker {
    text-align: center;
}

.session-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.session-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.dot.completed {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 230, 109, 0.5);
}

.session-count {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ========================================
   Footer
   ======================================== */
footer {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ========================================
   Animations
   ======================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.timer-card.running .time {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .content {
        padding: 1.5rem;
    }
    
    .timer-card {
        padding: 1.5rem;
    }
    
    .time {
        font-size: 3rem;
    }
    
    .mode-btn .label {
        display: none;
    }
}
