:root {
    --bg-1: #0f0c29;
    --bg-2: #302b63;
    --bg-3: #24243e;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f6f6f8;
    --text-secondary: rgba(246, 246, 248, 0.55);

    --work-color: #ff6b6b;
    --short-color: #4ecdc4;
    --long-color: #a78bfa;
    --accent: var(--work-color);
}

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

html, body { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

.ambient-glow {
    position: fixed;
    inset: -20%;
    background: radial-gradient(circle at 50% 50%, var(--accent) 0%, transparent 45%);
    opacity: 0.18;
    filter: blur(80px);
    transition: background 0.6s ease, opacity 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

.pomodoro-card {
    position: relative;
    z-index: 1;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.brand h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.mode-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 36px;
    border: 1px solid rgba(255,255,255,0.04);
}

.mode-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mode-tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.timer-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 36px;
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 12px rgba(255,107,107,0.25));
    transition: filter 0.5s ease;
}

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

.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.95s linear, stroke 0.5s ease;
}

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

.time {
    font-size: 68px;
    font-weight: 700;
    letter-spacing: -3px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.btn {
    padding: 20px 24px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-start {
    flex: 1;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

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

.btn-reset {
    width: 64px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

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

.btn-reset svg {
    width: 24px;
    height: 24px;
}

.session-counter {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

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

.running .timer-container {
    animation: gentle-pulse 4s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

@media (max-width: 480px) {
    .pomodoro-card { padding: 32px 24px; }
    .timer-container { width: 240px; height: 240px; }
    .time { font-size: 56px; }
    .mode-tab { font-size: 12px; padding: 9px 4px; }
}