@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&display=swap');

:root {
    --bg-dark: #0f111a;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --border-light: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-glow: rgba(129, 140, 248, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
}

.orb-2 {
    bottom: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%; left: 40%;
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, rgba(165, 180, 252, 0.05) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Hero */
.hero {
    text-align: center;
    animation: fadeInDown 0.8s ease-out forwards;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

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

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(129, 140, 248, 0.1);
    color: var(--accent);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Technique Selector */
.technique-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.technique-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

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

.technique-btn.active {
    background: rgba(129, 140, 248, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.15);
}

.tech-icon { font-size: 1.5rem; }
.tech-name { font-size: 1rem; font-weight: 600; }
.tech-pattern { font-size: 0.75rem; opacity: 0.7; }

/* Description Panel */
.description-panel {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

.description-panel p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Breathing Area */
.breathing-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 340px;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.session-timer {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

/* Breathing Circle */
.breathing-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.4), rgba(99, 102, 241, 0.6));
    box-shadow: 0 0 60px rgba(129, 140, 248, 0.2), inset 0 0 40px rgba(129, 140, 248, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    transform: scale(1);
    /* transition is set dynamically in JS */
}

.phase-text {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.phase-timer {
    font-size: 2rem;
    font-weight: 800;
}

.phase-counter {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cycle-counter {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(129, 140, 248, 0.1);
    padding: 0.35rem 1rem;
    border-radius: 8px;
}

/* Start Button */
.start-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 2rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
    opacity: 0;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.4);
}

.start-button:active {
    transform: scale(0.98);
}

.start-button.running {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 4px 20px rgba(248, 113, 113, 0.3);
}

/* Diaphragm Info */
.diaphragm-info {
    margin-bottom: 2rem;
}

.diaphragm-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.diaphragm-info ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.diaphragm-info li {
    margin-bottom: 0.5rem;
}

/* Mobile */
@media (max-width: 500px) {
    .technique-selector {
        grid-template-columns: 1fr;
    }

    .technique-btn {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .breathing-circle {
        width: 180px;
        height: 180px;
    }

    .phase-text { font-size: 1.25rem; }
    .phase-timer { font-size: 1.5rem; }
}
