@import url('./ocean-habits.css');

/* ================================================================
   Ocean Mind AI — Cinematic Aurora Design System
   Aligned with Calm Mind dark aesthetic (landing page v2)
   ================================================================ */

/* ============= FONTS ============= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ============= CSS VARIABLES ============= */
:root {
    /* Aurora palette */
    --om-violet:   #7C3AED;
    --om-purple:   #A855F7;
    --om-teal:     #0EA5AA;
    --om-cyan:     #06B6D4;
    --om-rose:     #EC4899;
    --om-amber:    #F59E0B;
    --om-green:    #10B981;
    --om-blue:     #4A90E2;

    /* Depth */
    --om-bg-deep:  #060810;
    --om-bg-base:  #0A0D1A;

    /* Glass layers */
    --om-glass-1: rgba(255,255,255,0.02);
    --om-glass-2: rgba(255,255,255,0.055);
    --om-glass-3: rgba(255,255,255,0.09);
    --om-glass-border: rgba(255,255,255,0.10);
    --om-glass-border-bright: rgba(255,255,255,0.22);

    /* Type */
    --om-font-display: 'Cormorant Garamond', Georgia, serif;
    --om-font-body:    'DM Sans', system-ui, sans-serif;

    /* Easing */
    --om-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --om-smooth: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ================================================================
   CONTAINER & BACKGROUND
   ================================================================ */

.ocean-mind-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--om-font-body);
    background: var(--om-bg-deep);
    color: rgba(255,255,255,0.85);
}

/* Dynamic background — gradient from JS via inline style */
.ocean-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    transition: background 2s ease;
}

/* Aurora atmospheric blobs */
.ocean-background::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 65%;
    height: 65%;
    background: radial-gradient(ellipse, rgba(124,58,237,0.28) 0%, transparent 70%);
    filter: blur(80px);
    animation: om-blob-drift-1 18s ease-in-out infinite;
    pointer-events: none;
}

.ocean-background::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: -15%;
    width: 60%;
    height: 55%;
    background: radial-gradient(ellipse, rgba(6,182,212,0.22) 0%, transparent 70%);
    filter: blur(90px);
    animation: om-blob-drift-2 22s ease-in-out infinite;
    pointer-events: none;
}

@keyframes om-blob-drift-1 {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(5%,8%) scale(1.06); }
    66%       { transform: translate(-3%,4%) scale(0.96); }
}

@keyframes om-blob-drift-2 {
    0%, 100% { transform: translate(0,0) scale(1); }
    40%       { transform: translate(-6%,-5%) scale(1.08); }
    70%       { transform: translate(4%,3%) scale(0.94); }
}

/* Entry/Exit Animations */
@keyframes oceanMindFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes oceanMindFadeOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.97); }
}

.ocean-mind-container {
    animation: oceanMindFadeIn 0.5s var(--om-smooth) both;
}

.ocean-mind-container.closing {
    animation: oceanMindFadeOut 0.35s ease-in both;
}

/* ================================================================
   EMOTIONAL SPHERE — Aurora Crystal Orb
   ================================================================ */

.emotional-sphere {
    position: absolute;
    top: 28%;
    left: 50%;
    width: 170px;
    height: 170px;
    margin-left: -85px;
    margin-top: -85px;
    border-radius: 50%;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.28);
    will-change: transform;
    contain: layout style paint;
    touch-action: manipulation;
    z-index: 15;
    transition:
        transform 0.4s var(--om-spring),
        box-shadow 0.4s ease,
        border-color 0.3s ease;
}

/* Specular highlight */
.emotional-sphere::before {
    content: '';
    position: absolute;
    top: 7%;
    left: 12%;
    width: 48%;
    height: 32%;
    background: linear-gradient(
        175deg,
        rgba(255,255,255,0.65) 0%,
        rgba(255,255,255,0.18) 55%,
        transparent 100%
    );
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

/* Pulsing aurora ring */
.emotional-sphere::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.12);
    will-change: transform, opacity;
    animation: sphereRingPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sphereRingPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%       { transform: scale(1.18); opacity: 0; }
}

.emotional-sphere:hover {
    transform: scale(1.07);
    border-color: rgba(255,255,255,0.55);
}

.emotional-sphere:hover::before { opacity: 1; }

.emotional-sphere:active {
    transform: scale(0.94);
    transition: transform 0.1s ease;
}

/* ── Emotion-specific breathe animations ── */
@keyframes breathe-calm {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50%       { transform: scale(1.05); filter: brightness(1.08); }
}

@keyframes breathe-anxious {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    25%       { transform: scale(1.07); filter: brightness(1.14); }
    50%       { transform: scale(1.11); filter: brightness(1.2); }
    75%       { transform: scale(1.05); filter: brightness(1.1); }
}

@keyframes breathe-sleep {
    0%, 100% { transform: scale(1); filter: brightness(0.92); }
    50%       { transform: scale(1.03); filter: brightness(1.04); }
}

@keyframes breathe-happy {
    0%, 100% { transform: scale(1) rotate(0deg); filter: brightness(1.08); }
    25%       { transform: scale(1.07) rotate(1.2deg); }
    50%       { transform: scale(1.09) rotate(0deg); filter: brightness(1.22); }
    75%       { transform: scale(1.05) rotate(-1deg); }
}

@keyframes breathe-sad {
    0%, 100% { transform: scale(1); filter: brightness(0.88); }
    50%       { transform: scale(1.03); filter: brightness(0.98); }
}

@keyframes breathe-neutral {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50%       { transform: scale(1.04); filter: brightness(1.08); }
}

/* Hint */
.sphere-hint {
    position: absolute;
    top: calc(28% + 107px);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.42);
    font-family: var(--om-font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    animation: hintFade 3.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 15;
    white-space: nowrap;
}

@keyframes hintFade {
    0%, 100% { opacity: 0.25; }
    50%       { opacity: 0.65; }
}

/* ================================================================
   GLASS PANEL — Aurora Frosted Glass
   ================================================================ */

.glass-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 38vh;
    min-height: 300px;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.07) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-top-left-radius: 44px;
    border-top-right-radius: 44px;
    border-top: 1px solid var(--om-glass-border-bright);
    box-shadow:
        0 -12px 60px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 -2px 0 rgba(124,58,237,0.18);
    padding: 2rem;
    z-index: 20;
    overflow: hidden;
}

/* Subtle aurora tint at panel edge */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(124,58,237,0.5) 30%,
        rgba(6,182,212,0.5) 70%,
        transparent
    );
    pointer-events: none;
}

/* Glass panel header with title + close button */
.glass-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.glass-panel-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

.close-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.close-chat-btn:hover {
    background: rgba(255,255,255,0.18);
    color: white;
}

/* ================================================================
   ANIMATED TEXT — Cinematic Display
   ================================================================ */

.animated-text {
    font-family: var(--om-font-display);
    color: rgba(255,255,255,0.82);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.85;
    letter-spacing: 0.01em;
}

.animated-word {
    display: inline-block;
    margin-right: 0.3rem;
    opacity: 0;
    animation: fadeInWord 0.45s ease-out forwards;
}

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

/* ================================================================
   ACTION BUTTONS
   ================================================================ */

.primary-action-btn {
    margin-top: 1.75rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg,
        rgba(124,58,237,0.35) 0%,
        rgba(6,182,212,0.22) 100%
    );
    backdrop-filter: blur(16px);
    border-radius: 9999px;
    color: rgba(255,255,255,0.95);
    font-family: var(--om-font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(168,85,247,0.4);
    box-shadow:
        0 4px 20px rgba(124,58,237,0.25),
        inset 0 1px 0 rgba(255,255,255,0.18);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.35s var(--om-smooth);
    position: relative;
    overflow: hidden;
}

.primary-action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.1) 0%,
        transparent 60%
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(168,85,247,0.7);
    box-shadow:
        0 8px 32px rgba(124,58,237,0.4),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.primary-action-btn:hover::after { opacity: 1; }

.primary-action-btn:active { transform: scale(0.97); }

.secondary-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

.secondary-action-btn {
    padding: 0.45rem 1rem;
    background: var(--om-glass-2);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    color: rgba(255,255,255,0.62);
    font-family: var(--om-font-body);
    font-size: 0.825rem;
    font-weight: 400;
    border: 1px solid var(--om-glass-border);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.28s ease;
}

.secondary-action-btn:hover {
    background: var(--om-glass-3);
    color: rgba(255,255,255,0.88);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* ================================================================
   Exercise Cards — post-check-in action list (free mode)
   ================================================================ */

.exercise-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.25rem;
    width: 100%;
}

.exercise-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: var(--om-glass-2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--om-glass-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.28s var(--om-smooth);
    position: relative;
    overflow: hidden;
    text-align: left;
    width: 100%;
}

.exercise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.28s ease;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.exercise-card:hover {
    transform: translateY(-2px);
    border-color: var(--ec-accent, rgba(168,85,247,0.5));
    box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 1px var(--ec-accent, rgba(168,85,247,0.2));
}

.exercise-card:hover::before { opacity: 1; }
.exercise-card:active { transform: scale(0.98); }

/* Accent per exercise type */
.exercise-card[data-exercise="breathing-478"],
.exercise-card[data-exercise="breathing-box"] {
    --ec-accent: rgba(168,85,247,0.5);
    --ec-orb-a: #7c3aed;
    --ec-orb-b: #a855f7;
}
.exercise-card[data-exercise="grounding"] {
    --ec-accent: rgba(6,182,212,0.5);
    --ec-orb-a: #0891b2;
    --ec-orb-b: #2563eb;
}
.exercise-card[data-exercise="meditation"] {
    --ec-accent: rgba(245,158,11,0.5);
    --ec-orb-a: #d97706;
    --ec-orb-b: #f59e0b;
}
.exercise-card[data-exercise="deep-sleep"] {
    --ec-accent: rgba(99,102,241,0.5);
    --ec-orb-a: #4338ca;
    --ec-orb-b: #6366f1;
}
.exercise-card[data-exercise="journal"] {
    --ec-accent: rgba(16,185,129,0.5);
    --ec-orb-a: #0d9488;
    --ec-orb-b: #10b981;
}

.exercise-card__orb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 35% 35%, var(--ec-orb-b, #a855f7), var(--ec-orb-a, #7c3aed));
    border: 1.5px solid rgba(255,255,255,0.18);
    box-shadow: 0 0 16px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.exercise-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.exercise-card__title {
    font-family: var(--om-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exercise-card__desc {
    font-family: var(--om-font-body);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.48);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exercise-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.exercise-card__duration {
    font-family: var(--om-font-body);
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255,255,255,0.38);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9999px;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

.exercise-card__btn {
    font-family: var(--om-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9999px;
    padding: 0.2rem 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: none;
}

.exercise-card:hover .exercise-card__btn {
    background: var(--ec-accent, rgba(168,85,247,0.4));
    border-color: transparent;
    color: white;
}

.exercise-card--recommended .exercise-card__desc::after {
    content: ' · Recomendado';
    font-size: 0.65rem;
    font-weight: 700;
    color: #c4b5fd;
    letter-spacing: 0.04em;
}

/* ================================================================
   TTS narration waveform indicator
   ================================================================ */

.tts-indicator {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 0.5rem;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tts-indicator.tts-speaking {
    opacity: 1;
}

.tts-indicator span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: rgba(167,139,250,0.8);
    animation: none;
}

.tts-indicator.tts-speaking span { animation: ttsWave 0.9s ease-in-out infinite; }
.tts-indicator span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.tts-indicator span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.tts-indicator span:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.tts-indicator span:nth-child(4) { height: 6px;  animation-delay: 0.45s; }

@keyframes ttsWave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50%       { transform: scaleY(1.2); opacity: 1;   }
}

/* ================================================================
   INPUT ROW
   ================================================================ */

.input-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.4rem;
    align-items: center;
}

.message-input {
    flex: 1;
    padding: 0.7rem 1.2rem;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    border: 1px solid var(--om-glass-border);
    border-radius: 9999px;
    color: rgba(255,255,255,0.82);
    font-family: var(--om-font-body);
    font-size: 0.875rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.message-input::placeholder { color: rgba(255,255,255,0.32); }

.message-input:focus {
    border-color: rgba(124,58,237,0.5);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

/* ── Shared icon button base ── */
.send-btn,
.mic-btn {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.16) 0%,
        rgba(255,255,255,0.08) 100%
    );
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.35s var(--om-smooth);
}

.send-btn:hover,
.mic-btn:hover:not(:disabled) {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.25) 0%,
        rgba(255,255,255,0.14) 100%
    );
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 6px 22px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.4), 0 0 20px rgba(255,255,255,0.12);
    transform: scale(1.06);
}

.send-btn:active,
.mic-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.mic-btn:disabled { cursor: not-allowed; opacity: 0.5; }

.mic-btn.listening {
    background: linear-gradient(135deg, rgba(236,72,153,0.35) 0%, rgba(236,72,153,0.22) 100%);
    border-color: rgba(236,72,153,0.5);
    box-shadow: 0 6px 24px rgba(236,72,153,0.35), inset 0 1px 0 rgba(255,255,255,0.3), 0 0 32px rgba(236,72,153,0.45);
    animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

/* Shimmer */
.shimmer-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
    transition: left 0.55s ease;
    pointer-events: none;
    border-radius: inherit;
}

.send-btn:hover .shimmer-effect,
.mic-btn:hover:not(:disabled) .shimmer-effect { left: 100%; }

/* ================================================================
   HOME / CLOSE BUTTON
   ================================================================ */

.home-btn {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--om-glass-2);
    backdrop-filter: blur(16px);
    border-radius: 50%;
    border: 1px solid var(--om-glass-border);
    cursor: pointer;
    z-index: 30;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: var(--om-glass-3);
    opacity: 1;
    border-color: rgba(255,255,255,0.25);
}

/* ================================================================
   RADIAL MENU — Liquid Aurora Orbs
   ================================================================ */

.radial-menu-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-content: center;
}

.radial-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,8,16,0.55);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
}

.radial-menu-container {
    position: relative;
    width: 380px;
    height: 380px;
}

/* ── Aurora Liquid Glass Orb ── */
.radial-menu-btn {
    position: absolute;
    width: 88px;
    height: 88px;
    margin-left: -44px;
    margin-top: -44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.2) 0%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 100%
    );
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.25),
        inset 0 2px 4px rgba(255,255,255,0.25),
        inset 0 -1px 2px rgba(0,0,0,0.06);
    cursor: pointer;
    contain: layout style paint;
    touch-action: manipulation;
    will-change: transform;
    overflow: hidden;
    transition:
        transform 0.4s var(--om-spring),
        border-radius 0.4s var(--om-spring),
        box-shadow 0.3s ease,
        background 0.3s ease;
    animation:
        liquidOrbAppear 0.5s var(--om-spring) backwards,
        liquidOrbIdle 5s ease-in-out infinite;
    animation-delay: var(--delay, 0s), calc(var(--delay, 0s) + 0.5s);
}

/* Specular shimmer */
.radial-menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
    transition: left 0.6s ease;
    border-radius: 50%;
}

/* Top light */
.radial-menu-btn::after {
    content: '';
    position: absolute;
    top: 7%;
    left: 14%;
    width: 68%;
    height: 33%;
    background: linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.radial-menu-btn:hover {
    transform: scale(1.14) scaleY(0.93);
    border-radius: 44% 44% 50% 50%;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.3),
        inset 0 2px 6px rgba(255,255,255,0.38),
        0 0 28px rgba(124,58,237,0.22);
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 100%);
    border-color: rgba(255,255,255,0.45);
}

.radial-menu-btn:hover::before { left: 100%; }

.radial-menu-btn:active {
    transform: scale(1.06) scaleY(0.86) scaleX(1.08);
    border-radius: 40% 40% 54% 54%;
    transition: transform 0.1s ease;
}

.radial-menu-btn .icon {
    font-size: 26px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
    transition: transform 0.3s ease;
}

.radial-menu-btn:hover .icon { transform: scale(1.1) translateY(-2px); }

.radial-menu-btn .label {
    font-family: var(--om-font-body);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.88);
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.radial-menu-btn:hover .label { transform: translateY(1px); }

@keyframes liquidOrbAppear {
    0%   { opacity: 0; transform: scale(0) rotate(-8deg); }
    55%  { transform: scale(1.18) scaleY(0.87) rotate(4deg); }
    78%  { transform: scale(0.96) scaleY(1.04) rotate(-1.5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes liquidOrbIdle {
    0%, 100% { transform: scale(1) scaleY(1); }
    50%       { transform: scale(1.02) scaleY(0.98); }
}

.radial-menu-btn:nth-child(1) { --delay: 0s; }
.radial-menu-btn:nth-child(2) { --delay: 0.07s; }
.radial-menu-btn:nth-child(3) { --delay: 0.14s; }
.radial-menu-btn:nth-child(4) { --delay: 0.21s; }
.radial-menu-btn:nth-child(5) { --delay: 0.28s; }
.radial-menu-btn:nth-child(6) { --delay: 0.35s; }

/* ================================================================
   EXERCISE MODAL — Cinematic Dark
   ================================================================ */

.exercise-modal {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: linear-gradient(155deg, #08091A 0%, #0D0F24 45%, #090C1E 100%);
    contain: layout style paint;
    overflow: hidden;
}

/* Aurora accent blob inside exercise modal */
.exercise-modal::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(124,58,237,0.2) 0%, transparent 65%);
    filter: blur(70px);
    pointer-events: none;
}

.exercise-modal::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -15%;
    width: 55%;
    height: 55%;
    background: radial-gradient(ellipse, rgba(6,182,212,0.15) 0%, transparent 65%);
    filter: blur(80px);
    pointer-events: none;
}

.exercise-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.35);
    background: var(--om-glass-2);
    border: 1px solid var(--om-glass-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    contain: layout style paint;
    touch-action: manipulation;
    transition: all 0.25s ease;
    z-index: 10;
}

.exercise-close-btn:hover {
    background: var(--om-glass-3);
    color: rgba(255,255,255,0.75);
    border-color: rgba(255,255,255,0.2);
}

.exercise-controls {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    align-items: center;
}

.exercise-control-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--om-glass-2);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    border: 1px solid var(--om-glass-border);
    cursor: pointer;
    contain: layout style paint;
    touch-action: manipulation;
    transition: all 0.25s ease;
}

.exercise-control-btn:hover {
    background: var(--om-glass-3);
    border-color: rgba(255,255,255,0.2);
}

.exercise-control-btn svg {
    width: 17px;
    height: 17px;
    color: rgba(255,255,255,0.65);
}

.exercise-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    position: relative;
    z-index: 5;
}

/* Breathing sphere — aurora gradient */
.exercise-sphere {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-blue) 0%, var(--om-violet) 100%);
    box-shadow:
        0 0 60px rgba(124,58,237,0.45),
        0 10px 40px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.15);
    animation: breatheSphere 5.5s ease-in-out infinite;
    border: 1.5px solid rgba(255,255,255,0.2);
}

@keyframes breatheSphere {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(124,58,237,0.45), 0 10px 40px rgba(0,0,0,0.3), inset 0 8px 20px rgba(255,255,255,0.15); }
    50%       { transform: scale(1.18); box-shadow: 0 0 90px rgba(124,58,237,0.65), 0 15px 50px rgba(0,0,0,0.35), inset 0 8px 20px rgba(255,255,255,0.2); }
}

.exercise-text {
    margin-top: 3.5rem;
    font-family: var(--om-font-display);
    font-size: 1.6rem;
    font-weight: 300;
    text-align: center;
    color: rgba(255,255,255,0.9);
    max-width: 520px;
    line-height: 1.85;
    letter-spacing: 0.01em;
    animation: fadeInText 0.85s ease-out both;
}

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

.exercise-progress-container {
    position: absolute;
    bottom: 2.5rem;
    left: 2rem;
    right: 2rem;
}

.exercise-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.exercise-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--om-violet), var(--om-cyan));
    border-radius: 9999px;
    transition: width 0.6s ease;
    box-shadow: 0 0 8px rgba(124,58,237,0.5);
}

.exercise-progress-text {
    text-align: center;
    font-family: var(--om-font-body);
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    margin-top: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.04em;
}

/* ================================================================
   BREATHING ANIMATION (used in exercise modal)
   ================================================================ */

/* breathing-container is inside exercise-modal, overlaying exercise-sphere */
.breathing-container {
    position: relative;
}

.breathing-sphere {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.breathing-target-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.25);
    pointer-events: none;
}

.breathing-phase-label {
    position: absolute;
    bottom: -2.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--om-font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

@keyframes breatheIn {
    from { transform: scale(0.58); }
    to   { transform: scale(1); }
}

@keyframes breatheOut {
    from { transform: scale(1); }
    to   { transform: scale(0.58); }
}

/* ================================================================
   CHECK-IN OVERLAY
   ================================================================ */

.ocean-checkin-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 38vh;
    z-index: 32;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.05) 0%,
        rgba(255,255,255,0.08) 100%
    );
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border-top-left-radius: 44px;
    border-top-right-radius: 44px;
    border-top: 1px solid var(--om-glass-border-bright);
    box-shadow: 0 -12px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
    padding: 2rem;
    overflow-y: auto;
    box-sizing: border-box;
}

.ocean-checkin-overlay:empty { display: none; }

/* ── Intensity Orb (check-in step 2) ─────────────────────────── */
.ocean-intensity-orb-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}

/* transform is owned exclusively by orbIntensityPulse keyframe */
.ocean-intensity-orb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.25), transparent 60%),
                var(--orb-color, #6366f1);
    box-shadow: 0 0 calc(20px + var(--orb-scale, 0.75) * 40px) var(--orb-color, #6366f1);
    animation: orbIntensityPulse var(--orb-pulse-speed, 1.55s) ease-in-out infinite;
}

@keyframes orbIntensityPulse {
    0%, 100% { transform: scale(var(--orb-scale, 0.75)); }
    50%       { transform: scale(calc(var(--orb-scale, 0.75) * 1.1)); }
}

.ocean-checkin-overlay--step2 {
    top: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ================================================================
   DATA PANEL
   ================================================================ */

/* Data panel removed — replaced by ocean-hub layout in ocean-habits.css */

/* ================================================================
   CHECK-IN FLOW COMPONENTS
   ================================================================ */

.ocean-checkin-title {
    font-family: var(--om-font-display);
    color: rgba(255,255,255,0.88);
    font-size: 1.15rem;
    font-weight: 400;
    margin: 0 0 1.3rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.ocean-emotion-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.ocean-emotion-btn {
    padding: 0.45rem 1rem;
    background: var(--om-glass-2);
    border: 1px solid var(--om-glass-border);
    border-radius: 9999px;
    color: rgba(255,255,255,0.82);
    font-family: var(--om-font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.22s ease, transform 0.18s ease, border-color 0.22s ease;
}

.ocean-emotion-btn:hover {
    background: rgba(124,58,237,0.25);
    border-color: rgba(168,85,247,0.45);
    transform: translateY(-1px);
}

.ocean-voice-btn {
    padding: 0;
    background: var(--om-glass-2);
    border: 1px solid var(--om-glass-border);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    margin-top: 0.5rem;
}

.ocean-voice-btn:hover { background: var(--om-glass-3); }

.ocean-intensity-slider {
    width: 100%;
    margin: 0.75rem 0 0.4rem;
    accent-color: var(--om-violet);
}

.ocean-btn-primary {
    margin-top: 1rem;
    padding: 0.65rem 1.8rem;
    background: linear-gradient(135deg, rgba(124,58,237,0.4) 0%, rgba(6,182,212,0.28) 100%);
    border: 1px solid rgba(168,85,247,0.38);
    border-radius: 9999px;
    color: rgba(255,255,255,0.95);
    font-family: var(--om-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.28s ease;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(124,58,237,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.ocean-btn-primary:hover {
    background: linear-gradient(135deg, rgba(124,58,237,0.6) 0%, rgba(6,182,212,0.4) 100%);
    border-color: rgba(168,85,247,0.6);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(124,58,237,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.ocean-btn-secondary {
    margin-top: 0.5rem;
    margin-left: 0.65rem;
    padding: 0.65rem 1.3rem;
    background: transparent;
    border: 1px solid var(--om-glass-border);
    border-radius: 9999px;
    color: rgba(255,255,255,0.62);
    font-family: var(--om-font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.22s ease, border-color 0.22s ease;
    display: inline-block;
}

.ocean-btn-secondary:hover {
    background: var(--om-glass-2);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.82);
}

.ocean-btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-top: 0.5rem;
}
.ocean-btn-ghost:hover {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.4);
}

.ocean-textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--om-glass-border);
    border-radius: 16px;
    color: rgba(255,255,255,0.85);
    font-family: var(--om-font-body);
    font-size: 0.875rem;
    font-weight: 300;
    resize: none;
    min-height: 75px;
    outline: none;
    box-sizing: border-box;
    margin-top: 0.5rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ocean-textarea::placeholder { color: rgba(255,255,255,0.32); }

.ocean-textarea:focus {
    border-color: rgba(124,58,237,0.45);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.ocean-success-msg {
    font-family: var(--om-font-display);
    color: rgba(255,255,255,0.82);
    font-size: 1.1rem;
    font-weight: 300;
    text-align: center;
    padding: 1.5rem 0;
    line-height: 1.7;
}

.ocean-error {
    color: rgba(236,72,153,0.9);
    font-family: var(--om-font-body);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ================================================================
   EMOTIONAL TIMELINE
   ================================================================ */

.ocean-timeline-title {
    font-family: var(--om-font-body);
    color: rgba(255,255,255,0.45);
    font-size: 0.72rem;
    font-weight: 500;
    margin: 0 0 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ocean-timeline-list { display: flex; flex-direction: column; }

.ocean-timeline-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    animation: ocean-fade-in 0.28s ease-out forwards;
}

.ocean-timeline-entry-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.ocean-valence-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ocean-valence-dot.positive { background: var(--om-green); box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.ocean-valence-dot.neutral  { background: var(--om-cyan);  box-shadow: 0 0 6px rgba(6,182,212,0.5); }
.ocean-valence-dot.negative { background: var(--om-rose);  box-shadow: 0 0 6px rgba(236,72,153,0.5); }

.ocean-emotion-label {
    color: rgba(255,255,255,0.82);
    font-family: var(--om-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.ocean-intensity-bars {
    color: rgba(255,255,255,0.38);
    font-size: 0.72rem;
    letter-spacing: -1px;
    flex-shrink: 0;
}

.ocean-time-label {
    color: rgba(255,255,255,0.35);
    font-family: var(--om-font-body);
    font-size: 0.72rem;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.ocean-empty {
    color: rgba(255,255,255,0.38);
    font-family: var(--om-font-body);
    font-size: 0.875rem;
    text-align: center;
    padding: 0.75rem 0;
}

/* ================================================================
   MICRO INSIGHT CARD
   ================================================================ */

.ocean-insight-card {
    position: relative;
    background: var(--om-glass-2);
    border: 1px solid var(--om-glass-border);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    backdrop-filter: blur(12px);
    animation: ocean-fade-in 0.32s ease-out forwards;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.ocean-insight-label {
    font-family: var(--om-font-body);
    color: rgba(255,255,255,0.42);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.35rem;
}

.ocean-insight-text {
    font-family: var(--om-font-body);
    color: rgba(255,255,255,0.82);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.55;
    padding-right: 1.5rem;
}

.ocean-insight-dismiss {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.ocean-insight-dismiss:hover { color: rgba(255,255,255,0.7); }

/* ================================================================
   MINI ACTION BAR (post check-in)
   ================================================================ */

.ocean-mini-actions {
    position: absolute;
    top: 58%;
    transform: translateX(-50%);
    left: 50%;
    display: flex;
    gap: 2rem;
    z-index: 19; /* below glass-panel (20) — panel overlays these when open */
    justify-content: center;
}

.ocean-mini-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.28s ease, transform 0.22s ease, box-shadow 0.28s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.ocean-mini-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 100%);
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 12px 38px rgba(0,0,0,0.35), 0 0 24px rgba(124,58,237,0.22);
    border-color: rgba(255,255,255,0.32);
}

.ocean-mini-btn--active {
    background: linear-gradient(135deg, rgba(124,58,237,0.4) 0%, rgba(6,182,212,0.28) 100%);
    border-color: rgba(168,85,247,0.5);
    box-shadow: 0 0 0 2px rgba(168,85,247,0.35), 0 8px 30px rgba(0,0,0,0.3);
}

/* ================================================================
   SHARED ANIMATIONS
   ================================================================ */

@keyframes ocean-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ocean-breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%       { transform: scale(1.08); opacity: 1; }
}

@keyframes ocean-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

@keyframes ocean-pulse-ring {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ================================================================
   ORB / INSIGHT CARD WRAPPERS
   ================================================================ */

.ocean-orb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(255,255,255,0.25),
        rgba(124,58,237,0.75));
    box-shadow: 0 0 40px rgba(124,58,237,0.4);
    transition: background 1.5s ease, box-shadow 1.5s ease;
    border: 1.5px solid rgba(255,255,255,0.18);
}

.ocean-orb.animating { animation: ocean-breathe 4s ease-in-out infinite; }

.ocean-exercise-panel { animation: ocean-fade-in 0.4s ease both; }

.ocean-checkin-step  { animation: ocean-fade-in 0.32s ease both; }

/* ================================================================
   TOAST
   ================================================================ */

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-22px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ================================================================
   UTILITY
   ================================================================ */

#ocean-mind-root .hidden { display: none !important; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 640px) {
    .glass-panel {
        height: 46vh;
        padding: 1.5rem;
        border-top-left-radius: 34px;
        border-top-right-radius: 34px;
    }

    .animated-text { font-size: 1.05rem; }

    .emotional-sphere {
        width: 130px;
        height: 130px;
        margin-left: -65px;
        margin-top: -65px;
    }

    .sphere-hint { top: calc(28% + 82px); font-size: 10px; }

    .exercise-text { font-size: 1.3rem; }

    .ocean-checkin-overlay {
        padding: 1.5rem;
        border-top-left-radius: 34px;
        border-top-right-radius: 34px;
    }

    /* ocean-data-panel removed */
    .ocean-mini-btn   { width: 62px; height: 62px; }
    .ocean-orb        { width: 90px; height: 90px; }
    .radial-menu-container { width: 300px; height: 300px; }
    .radial-menu-btn { width: 76px; height: 76px; margin-left: -38px; margin-top: -38px; }
    .radial-menu-btn .icon { font-size: 22px; }
}

@media (max-width: 400px) {
    .emotional-sphere { top: 33%; }
    .sphere-hint { top: calc(33% + 82px); }
    .glass-panel { padding: 1.25rem; }
    .primary-action-btn { padding: 0.75rem 1.5rem; font-size: 0.875rem; }
}

/* ============================================================
   Ocean Mind AI — Subtitle (audio mode)
   Appears under the emotional sphere during TTS playback
   ============================================================ */
.ocean-subtitle {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.ocean-subtitle.visible {
    opacity: 1;
}

/* ============================================================
   Ocean Mind AI — Exercise suggestion card (audio mode)
   Floats above the mini-bar when an exercise is recommended
   ============================================================ */
.ocean-exercise-card {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 16, 42, 0.92);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    backdrop-filter: blur(12px);
    animation: cardSlideUp 0.3s ease;
}

.ocean-exercise-card__icon {
    font-size: 1.5rem;
}

.ocean-exercise-card__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.ocean-exercise-card__btn {
    margin-top: 0.25rem;
    padding: 0.5rem 1.5rem;
    background: rgba(124, 58, 237, 0.7);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.ocean-exercise-card__btn:hover {
    background: rgba(124, 58, 237, 0.9);
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ================================================================
   Ocean Mind AI — Chat mode: scroll area + bubbles
   ================================================================ */

/* Activated when first chat bubble is appended */
.animated-text.chat-scroll-mode {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 100%;
    padding-right: 0.25rem;
    /* Remove default animated-text word-reveal layout */
    font-family: var(--om-font-body);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.55;
}

/* Scrollbar styling inside chat */
.animated-text.chat-scroll-mode::-webkit-scrollbar {
    width: 3px;
}
.animated-text.chat-scroll-mode::-webkit-scrollbar-track {
    background: transparent;
}
.animated-text.chat-scroll-mode::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.35);
    border-radius: 2px;
}

/* AI assistant bubble */
.ocean-chat-bubble--assistant {
    align-self: flex-start;
    max-width: 88%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 1rem 1rem 1rem;
    padding: 0.625rem 0.875rem;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--om-font-body);
    font-size: 0.9rem;
    line-height: 1.55;
    animation: bubbleFadeIn 0.25s ease;
}

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

/* ================================================================
   Ocean Mind AI — Floating exercise suggestion card
   Floats above ALL layers incl. voice overlay (z-index 150)
   Pill design, spring entry, visible on any background
   ================================================================ */

.exercise-float-card {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    width: min(88%, 340px);
    z-index: 150;
    background: rgba(14, 11, 32, 0.96);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(124, 58, 237, 0.18),
        0 8px 32px rgba(124, 58, 237, 0.28),
        0 20px 60px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: exerciseFloatIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes exerciseFloatIn {
    from { opacity: 0; transform: translateX(-50%) translateY(calc(50% + 32px)); }
    to   { opacity: 1; transform: translateX(-50%) translateY(50%); }
}

.exercise-float-card__shimmer {
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #06b6d4, #a78bfa, #06b6d4, #7c3aed);
    background-size: 300% 100%;
    animation: exerciseShimmer 2.5s linear infinite;
}

@keyframes exerciseShimmer {
    from { background-position: 300% 0; }
    to   { background-position: -300% 0; }
}

.exercise-float-card__body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
}

.exercise-float-card__orb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 35% 35%, rgba(167, 139, 250, 0.9), rgba(124, 58, 237, 0.55));
    border: 1.5px solid rgba(167, 139, 250, 0.5);
    box-shadow:
        0 0 18px rgba(124, 58, 237, 0.5),
        0 0 6px rgba(167, 139, 250, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.exercise-float-card__text {
    flex: 1;
    min-width: 0;
}

.exercise-float-card__tag {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c4b5fd;
    margin-bottom: 3px;
}

.exercise-float-card__name {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.96);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exercise-float-card__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.exercise-float-card__btn {
    padding: 0.4rem 0.95rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.9) 0%, rgba(109, 40, 217, 0.9) 100%);
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 9px;
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.45);
}

.exercise-float-card__btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 5px 18px rgba(124, 58, 237, 0.6);
}

.exercise-float-card__dismiss {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.exercise-float-card__dismiss:hover {
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
}

/* When card is inside #voice-overlay: override absolute centering
   to sit at the bottom of the overlay instead */
.exercise-float-card--voice {
    bottom: 2rem;
    transform: translateX(-50%) translateY(0);
    z-index: 10; /* above overlay content, overlay itself handles z-index */
}

@keyframes exerciseFloatInVoice {
    from { opacity: 0; transform: translateX(-50%) translateY(24px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.exercise-float-card--voice {
    animation: exerciseFloatInVoice 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============= VOICE OVERLAY ============= */

.voice-overlay {
    position: absolute;
    inset: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(8, 12, 30, 0.72);
    backdrop-filter: blur(18px) saturate(160%);
    border-radius: inherit;
    padding: 24px;
    animation: voiceOverlayIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes voiceOverlayIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

.voice-overlay-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.voice-overlay-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.voice-orb-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    opacity: 0;
    pointer-events: none;
}
.voice-ripple--1 { width: 100%; height: 100%; }
.voice-ripple--2 { width: 140%; height: 140%; }
.voice-ripple--3 { width: 185%; height: 185%; }

.voice-ripples--active .voice-ripple--1 {
    animation: rippleExpand 2s ease-out infinite;
}
.voice-ripples--active .voice-ripple--2 {
    animation: rippleExpand 2s ease-out 0.4s infinite;
}
.voice-ripples--active .voice-ripple--3 {
    animation: rippleExpand 2s ease-out 0.8s infinite;
}

@keyframes rippleExpand {
    0%   { opacity: 0.6; transform: scale(0.85); }
    100% { opacity: 0;   transform: scale(1.3); }
}

.voice-orb {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.07) 100%
    );
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s, transform 0.2s;
}

.voice-orb:active {
    transform: scale(0.94);
}

.voice-orb--listening {
    background: linear-gradient(135deg,
        rgba(236, 72, 153, 0.45) 0%,
        rgba(236, 72, 153, 0.25) 100%
    );
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow:
        0 0 0 0 rgba(236, 72, 153, 0.4),
        0 8px 32px rgba(236, 72, 153, 0.35);
    animation: orbPulse 1.8s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0  0px rgba(236,72,153,0.35), 0 8px 32px rgba(236,72,153,0.3); }
    50%       { transform: scale(1.07); box-shadow: 0 0 0 12px rgba(236,72,153,0),    0 8px 32px rgba(236,72,153,0.4); }
}

.voice-orb--processing {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.45) 0%,
        rgba(99, 102, 241, 0.25) 100%
    );
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.35);
    animation: orbSpin 1.4s linear infinite;
}

@keyframes orbSpin {
    from { filter: hue-rotate(0deg); }
    to   { filter: hue-rotate(360deg); }
}

.voice-orb--speaking {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.5) 0%,
        rgba(139, 92, 246, 0.3) 100%
    );
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    animation: orbWave 1.2s ease-in-out infinite alternate;
}

@keyframes orbWave {
    from { transform: scale(0.97); box-shadow: 0 6px 24px rgba(99,102,241,0.35); }
    to   { transform: scale(1.05); box-shadow: 0 8px 40px rgba(99,102,241,0.55); }
}

.voice-state-label {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.03em;
    margin: 0;
    transition: opacity 0.3s;
}

.voice-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    max-width: 280px;
    line-height: 1.55;
    margin: 0;
    min-height: 42px;
    transition: opacity 0.3s;
}

/* ================================================================
   EXERCISE MODAL — SISTEMA DE TEMAS
   ================================================================ */

/* ── Wrapper do elemento central (posicionado no modal, atrás do exercise-content) */
.theme-element-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

/* ── TEAL — Ansiedade ── */
.exercise-modal[data-theme="teal"] {
    background: linear-gradient(155deg, #020f14 0%, #041e2a 50%, #030e18 100%);
}
.exercise-modal[data-theme="teal"]::before {
    background: radial-gradient(ellipse, rgba(20,184,166,0.22) 0%, transparent 65%);
}
.exercise-modal[data-theme="teal"]::after {
    background: radial-gradient(ellipse, rgba(6,182,212,0.18) 0%, transparent 65%);
}
.exercise-modal[data-theme="teal"] .exercise-sphere {
    background: radial-gradient(circle at 35% 30%, #2dd4bf, #0d9488);
    box-shadow:
        0 0 60px rgba(20,184,166,0.55),
        0 10px 40px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.15);
}

/* ── ROSE — Autocompaixão ── */
.exercise-modal[data-theme="rose"] {
    background: linear-gradient(155deg, #130a0f 0%, #200f17 50%, #120810 100%);
}
.exercise-modal[data-theme="rose"]::before {
    background: radial-gradient(ellipse, rgba(244,63,94,0.22) 0%, transparent 65%);
}
.exercise-modal[data-theme="rose"]::after {
    background: radial-gradient(ellipse, rgba(251,113,133,0.15) 0%, transparent 65%);
}
.exercise-modal[data-theme="rose"] .exercise-sphere {
    background: radial-gradient(circle at 35% 30%, #fb7185, #e11d48);
    box-shadow:
        0 0 60px rgba(244,63,94,0.55),
        0 10px 40px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.15);
}

/* ── AMBER — Gratidão ── */
.exercise-modal[data-theme="amber"] {
    background: linear-gradient(155deg, #120e02 0%, #1e1604 50%, #110d02 100%);
}
.exercise-modal[data-theme="amber"]::before {
    background: radial-gradient(ellipse, rgba(245,158,11,0.22) 0%, transparent 65%);
}
.exercise-modal[data-theme="amber"]::after {
    background: radial-gradient(ellipse, rgba(251,191,36,0.15) 0%, transparent 65%);
}
.exercise-modal[data-theme="amber"] .exercise-sphere {
    background: radial-gradient(circle at 35% 30%, #fbbf24, #d97706);
    box-shadow:
        0 0 60px rgba(245,158,11,0.55),
        0 10px 40px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.15);
}

/* ── VIOLET — Foco ── */
.exercise-modal[data-theme="violet"] {
    background: linear-gradient(155deg, #07050f 0%, #0e0b1e 50%, #060410 100%);
}
.exercise-modal[data-theme="violet"]::before {
    background: radial-gradient(ellipse, rgba(139,92,246,0.25) 0%, transparent 65%);
}
.exercise-modal[data-theme="violet"]::after {
    background: radial-gradient(ellipse, rgba(99,102,241,0.18) 0%, transparent 65%);
}
.exercise-modal[data-theme="violet"] .exercise-sphere {
    background: radial-gradient(circle at 35% 30%, #a78bfa, #7c3aed);
    box-shadow:
        0 0 60px rgba(139,92,246,0.55),
        0 10px 40px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.15);
}

/* ── STAR — Guiada ── */
.exercise-modal[data-theme="star"] {
    background: linear-gradient(155deg, #08091a 0%, #0d0f24 50%, #060716 100%);
}
.exercise-modal[data-theme="star"]::before {
    background: radial-gradient(ellipse, rgba(124,58,237,0.20) 0%, transparent 65%);
}
.exercise-modal[data-theme="star"]::after {
    background: radial-gradient(ellipse, rgba(6,182,212,0.15) 0%, transparent 65%);
}
.exercise-modal[data-theme="star"] .exercise-sphere {
    background: radial-gradient(circle at 35% 30%, #c4b5fd, #7c3aed);
    box-shadow:
        0 0 60px rgba(124,58,237,0.5),
        0 10px 40px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.15);
}

/* ── EARTH — Grounding ── */
.exercise-modal[data-theme="earth"] {
    background: linear-gradient(155deg, #060d08 0%, #0c1a0f 50%, #050c07 100%);
}
.exercise-modal[data-theme="earth"]::before {
    background: radial-gradient(ellipse, rgba(34,197,94,0.20) 0%, transparent 65%);
}
.exercise-modal[data-theme="earth"]::after {
    background: radial-gradient(ellipse, rgba(101,163,13,0.15) 0%, transparent 65%);
}

/* ── TEAL — Onda SVG ── */
.theme-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 40px;
    z-index: 1;
    animation: themeWaveShift 8s ease-in-out infinite;
}

/* ── TEAL — Partículas flutuantes ── */
.theme-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.theme-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    bottom: 20%;
    background: rgba(45,212,191,0.35);
    animation: themeFloatUp 9s linear infinite;
}

/* ── ROSE — Anéis concêntricos ── */
.theme-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.theme-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid rgba(251,113,133,0.22);
    animation: themeExpandRing 3s ease-out var(--ring-delay, 0s) infinite;
}

/* ── AMBER — Faíscas douradas ── */
.theme-sparks {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.theme-spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    bottom: 15%;
    background: rgba(251,191,36,0.7);
    animation: themeFloatUp 7s linear infinite;
}

/* ── VIOLET — Feixes de luz ── */
.theme-beams {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1;
}
.theme-beam {
    position: absolute;
    width: 1px;
    height: 220px;
    top: 0;
    left: 50%;
    background: linear-gradient(to bottom, transparent, rgba(139,92,246,0.5), transparent);
    animation: themeBeamScan 4s ease-in-out var(--beam-delay, 0s) infinite;
    transform-origin: center bottom;
}

/* ── STAR — Campo estelar ── */
.theme-stars {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.theme-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    animation: themeTwinkle 3s ease-in-out infinite;
}

/* ── ANIMAÇÕES DOS TEMAS ── */

@keyframes themeWaveShift {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(-15px); }
}

@keyframes themeFloatUp {
    0%   { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(-240px) scale(0.2); opacity: 0; }
}

@keyframes themeExpandRing {
    0%   { transform: scale(0.5); opacity: 0.6; }
    100% { transform: scale(4.5); opacity: 0; }
}

@keyframes themeBeamScan {
    0%, 100% { transform: rotate(-18deg); opacity: 0.25; }
    50%       { transform: rotate(18deg); opacity: 0.75; }
}

@keyframes themeTwinkle {
    0%, 100% { opacity: 0.12; transform: scale(1); }
    50%       { opacity: 1; transform: scale(1.7); }
}
