.wizard-progress .dot { width: 8px; height: 8px; background: #e2e8f0; border-radius: 50%; transition: all 0.3s; }
.wizard-progress .dot.active { background: var(--primary); width: 20px; border-radius: 10px; }
.wizard-slide {
    display: none;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    will-change: opacity, transform;
}
.wizard-slide.slide-active {
    display: block;
    opacity: 1;
    /* iOS caret fix: `translateX(0)` still creates a containing block and
       stacking context, which desyncs the OS-level text caret from the
       input's on-screen position when the inner scroller shifts between
       focus changes (e.g. Weight → Height → Goal Weight). `none` avoids
       the containing block; transitions from translateX(12px) → none
       still animate correctly. */
    transform: none;
}
.wizard-slide.slide-exit {
    display: block;
    opacity: 0;
    transform: translateX(-12px);
    pointer-events: none;
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 1;
}

.wizard-slide.slide-enter-back {
    transform: translateX(-12px);
}

.wizard-slide.slide-exit-back {
    transform: translateX(12px);
}

#onboarding-wizard .onboarding-modal.wizard-container {
    transition: width 0.28s ease, height 0.28s ease, max-height 0.28s ease, background-color 0.28s ease, border-color 0.28s ease;
}

#onboarding-wizard .wizard-header,
#onboarding-wizard .wizard-footer,
#onboarding-wizard .wizard-content {
    transition: padding 0.28s ease, opacity 0.2s ease;
}

#onboarding-wizard .wizard-content {
    position: relative;
}

#onboarding-wizard .wizard-content.wizard-slide-transitioning {
    overflow: hidden !important;
    min-height: var(--wizard-transition-height, 320px);
}

.wizard-chat-intake {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 12px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 14px;
    border-radius: 8px;
    background: #050505;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 18px 38px rgba(0,0,0,0.34);
}
.wizard-chat-progress-row {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 4px;
    background: #050505;
    color: rgba(255,255,255,0.58);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}
.wizard-chat-back {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(245, 217, 138, 0.32);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.82);
    padding: 5px 10px;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.wizard-chat-back.visible {
    display: inline-flex;
}
.wizard-chat-back:disabled {
    opacity: 0.45;
    cursor: default;
}
.wizard-chat-progress-track {
    flex: 1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
}
#wizard-chat-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #f5d98a);
    transition: width 0.25s ease;
}
.wizard-chat-messages {
    grid-row: 3;
    align-self: end;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: auto;
    max-height: clamp(76px, 26dvh, 190px);
    min-height: 0;
    overflow-y: auto;
    padding: 18px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 217, 138, 0.42) transparent;
    -ms-overflow-style: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scroll-padding-top: 18px;
}
.wizard-chat-messages.wizard-chat-messages--bottom::before {
    content: '';
    flex: 1 1 auto;
    min-height: 0;
}
.wizard-chat-messages::-webkit-scrollbar { width: 4px; height: 4px; }
.wizard-chat-messages::-webkit-scrollbar-track { background: transparent; }
.wizard-chat-messages::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(245, 217, 138, 0.42);
}
.wizard-chat-bubble {
    flex: 0 0 auto;
    max-width: 86%;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.42;
    border: 1px solid rgba(255,255,255,0.08);
}
.wizard-chat-bubble.coach {
    align-self: flex-start;
    color: rgba(255,255,255,0.94);
    background: rgba(255,255,255,0.08);
    border-bottom-left-radius: 6px;
}
.wizard-chat-bubble.user {
    align-self: flex-end;
    color: #101010;
    background: linear-gradient(135deg, #f5d98a, #d8b25e);
    border-bottom-right-radius: 6px;
    font-weight: 700;
}
.wizard-chat-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.wizard-chat-typing span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.76);
    animation: wizardChatTyping 0.9s infinite ease-in-out;
}
.wizard-chat-typing span:nth-child(2) { animation-delay: 0.12s; }
.wizard-chat-typing span:nth-child(3) { animation-delay: 0.24s; }
@keyframes wizardChatTyping {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}
.wizard-chat-choices {
    grid-row: 4;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    height: auto;
    max-height: clamp(48px, 32dvh, 260px);
    min-height: 0;
    overflow-y: auto;
    padding: 0 7px 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 217, 138, 0.62) rgba(255,255,255,0.1);
    box-shadow: inset 0 -18px 18px -22px rgba(245, 217, 138, 0.9);
    overscroll-behavior: contain;
}
.wizard-chat-choices::-webkit-scrollbar { width: 5px; height: 5px; }
.wizard-chat-choices::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
}
.wizard-chat-choices::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(245, 217, 138, 0.62);
}
.wizard-chat-choice {
    border: 1px solid rgba(245, 217, 138, 0.35);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.94);
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}
.wizard-chat-choice.selected {
    background: linear-gradient(135deg, #f5d98a, #d8b25e);
    color: #101010;
    border-color: transparent;
}
.wizard-chat-input-row {
    grid-row: 5;
    display: flex;
    gap: 8px;
    align-items: center;
}
.wizard-chat-input-row input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(245, 217, 138, 0.62) !important;
    border-radius: 14px;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 16px;
    font-weight: 650;
    padding: 12px 13px;
    outline: none;
}
.wizard-chat-input-row input::placeholder {
    color: #475569 !important;
}
.wizard-chat-input-row button {
    flex-shrink: 0;
    border: none;
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f5d98a, #d8b25e);
    color: #101010;
    font-weight: 900;
    cursor: pointer;
}
.wizard-chat-helper {
    display: none;
    min-height: 0;
    color: rgba(255,255,255,0.62);
    font-size: 0.75rem;
    line-height: 1.35;
}

#onboarding-wizard.wizard-chat-no-textbox .wizard-chat-messages {
    grid-row: 2;
    align-self: end;
}

#onboarding-wizard.wizard-chat-no-textbox .wizard-chat-choices {
    grid-row: 3;
    height: auto;
    max-height: clamp(48px, 32dvh, 260px);
    overflow: visible;
    padding-bottom: 0;
    box-shadow: none;
}

#onboarding-wizard.wizard-chat-no-textbox .wizard-chat-input-row {
    display: none !important;
}

html.pbb-onboarding-locked,
body.pbb-onboarding-locked,
html:has(#onboarding-wizard.active),
body:has(#onboarding-wizard.active) {
    overflow: hidden !important;
    overscroll-behavior: none;
}

html:has(#onboarding-wizard.active) #health-connect-modal,
html:has(#onboarding-wizard.active) #native-permissions-modal,
html:has(#onboarding-wizard.active) #guest-signup-modal,
body:has(#onboarding-wizard.active) #health-connect-modal,
body:has(#onboarding-wizard.active) #native-permissions-modal,
body:has(#onboarding-wizard.active) #guest-signup-modal {
    display: none !important;
    pointer-events: none !important;
}

#onboarding-wizard.onboarding-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    height: 100dvh !important;
    overflow: hidden !important;
}

#onboarding-wizard .onboarding-modal.wizard-container {
    width: min(450px, calc(100vw - 24px)) !important;
    max-height: min(90dvh, 680px) !important;
}

#onboarding-wizard.wizard-chat-mode .onboarding-modal.wizard-container {
    width: min(450px, calc(100vw - 16px)) !important;
    height: min(92dvh, 680px) !important;
    max-height: calc(100dvh - 16px) !important;
    background: #050505 !important;
    border-color: rgba(255,255,255,0.12) !important;
}

#onboarding-wizard.wizard-chat-mode .wizard-header {
    min-height: 0 !important;
    padding: 0 !important;
}

#onboarding-wizard.wizard-chat-mode .wizard-progress,
#onboarding-wizard.wizard-chat-mode #wizard-title {
    display: none !important;
}

#onboarding-wizard.wizard-chat-mode .wizard-header > div[onclick] {
    top: 10px !important;
    right: 10px !important;
    z-index: 5;
}

#onboarding-wizard.wizard-chat-mode .wizard-content {
    padding: 10px !important;
}

#onboarding-wizard.wizard-chat-mode .wizard-footer {
    display: none !important;
}

#onboarding-wizard.wizard-chat-keyboard .onboarding-modal.wizard-container {
    height: calc(100dvh - 8px) !important;
    max-height: calc(100dvh - 8px) !important;
}

#onboarding-wizard.wizard-chat-keyboard .wizard-content {
    padding: 8px !important;
}

#onboarding-wizard.wizard-chat-keyboard .wizard-chat-intake {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 8px;
    padding: 10px;
}

#onboarding-wizard.wizard-chat-keyboard .wizard-chat-messages {
    max-height: clamp(64px, 20dvh, 132px);
}

#onboarding-wizard.wizard-chat-keyboard .wizard-chat-choices {
    max-height: clamp(44px, 28dvh, 180px);
}

#onboarding-wizard.wizard-chat-keyboard .wizard-chat-bubble {
    padding: 9px 11px;
    font-size: 0.84rem;
}

#onboarding-wizard.wizard-chat-keyboard .wizard-chat-input-row input,
#onboarding-wizard.wizard-chat-keyboard .wizard-chat-input-row button {
    padding-top: 10px;
    padding-bottom: 10px;
}

#onboarding-wizard .wizard-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

#onboarding-wizard .wizard-content::-webkit-scrollbar,
#onboarding-wizard .wizard-slide::-webkit-scrollbar {
    width: 0;
    height: 0;
}

#onboarding-wizard #slide-1.slide-active {
    height: 100%;
    min-height: 0;
}

/* Gender selection button styles */
.gender-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.gender-select-btn:active {
    transform: translateY(0);
}

/* ============================================ */
/* FITGOTCHI STORY ONBOARDING OVERLAY           */
/* ============================================ */
#fitgotchi-story-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 40%, #16213e 100%);
    z-index: 13000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#fitgotchi-story-overlay.active {
    display: flex;
    opacity: 1;
}
#fitgotchi-story-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Binary awakening screen (Phase 0) */
.story-binary-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}
.story-binary-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}
.story-binary-text {
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    text-align: center;
    padding: 20px;
    line-height: 1.8;
    white-space: pre-wrap;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Arny model container */
.story-model-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 60%;
}
.story-model-container model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}
/* Hide model-viewer default loading bar so only our custom loading state shows */
#story-arny-model::part(default-progress-bar) {
    display: none;
}

/* Speech bubble area — positioned above Arny, right side */
.story-speech-area {
    position: absolute;
    top: calc(10% + env(safe-area-inset-top, 0px));
    right: 5%;
    left: 20%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Individual speech bubble */
.story-bubble {
    background: #ffffff;
    color: #111827;
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: 700;
    border: 2px solid rgba(17,24,39,0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.42);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 12px;
    max-width: 95%;
    position: relative;
}
/* Speech bubble tail pointing down toward Arny */
.story-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 14px solid white;
}
.story-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.story-bubble.exit {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.story-bubble strong {
    color: #064e3b;
    font-weight: 800;
}

/* Tap to continue prompt */
.story-tap-prompt {
    text-align: left;
    color: rgba(255,255,255,0.92);
    font-size: 0.86rem;
    font-weight: 800;
    padding: 4px 0 0 4px;
    animation: storyPulse 2s ease-in-out infinite;
}
@keyframes storyPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Shannon card */
.story-shannon-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 101;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.story-shannon-card.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.story-shannon-card.exit {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.story-shannon-tap {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    font-weight: 500;
    animation: storyPulse 2s ease-in-out infinite;
}
.story-shannon-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 40px rgba(4, 106, 56, 0.4), 0 8px 32px rgba(0,0,0,0.3);
    object-fit: cover;
}
.story-shannon-text {
    color: white;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.story-shannon-text span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* Loading state for model */
.story-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}
.story-loading-dots::after {
    content: '';
    animation: storyLoadDots 1.5s infinite;
}
@keyframes storyLoadDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* Typewriter cursor effect */
.story-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--primary, #046a38);
    margin-left: 2px;
    animation: storyCursorBlink 0.8s infinite;
    vertical-align: text-bottom;
}
@keyframes storyCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Particles / ambient effect */
.story-particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.story-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    animation: storyFloat 6s infinite ease-in-out;
}
@keyframes storyFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* ============================================ */
/* STORY BATTLE DEMO UI                         */
/* ============================================ */
.story-battle-ui {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
}
.story-battle-hp-row {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.story-battle-hp-box {
    flex: 1;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.15);
}
.story-battle-vs {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.story-battle-hp-name {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.story-battle-hp-bar {
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    overflow: hidden;
}
.story-battle-hp-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease-out;
}
.story-battle-hp-fill.player {
    background: linear-gradient(90deg, #2ecc71, #4ecdc4);
}
.story-battle-hp-fill.enemy {
    background: linear-gradient(90deg, #e74c3c, #ff6b6b);
}
.story-battle-hp-text {
    font-size: 0.5rem;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    font-family: 'Outfit', sans-serif;
}

/* Stats row under HP bars */
.story-battle-stats-row {
    position: absolute;
    top: calc(65px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}
.story-battle-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 4px 6px;
}
.story-stat-icon {
    font-size: 0.7rem;
    flex-shrink: 0;
}
.story-stat-info {
    flex: 1;
    min-width: 0;
}
.story-stat-label {
    font-size: 0.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
}
.story-stat-bar {
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 2px;
}
.story-stat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.story-stat-fill.str { background: linear-gradient(90deg, #ff4444, #ff6b6b); }
.story-stat-fill.hp { background: linear-gradient(90deg, #2ecc71, #4ecdc4); }
.story-stat-fill.mana { background: linear-gradient(90deg, #3498db, #45b7d1); }

/* Pre-loaded showcase model container */
.story-preload-models {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 60%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.story-preload-models.active {
    opacity: 1;
}
.story-preload-viewer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.story-preload-viewer.active {
    opacity: 1;
}

/* Character label (rare showcase) */
.story-character-label {
    position: absolute;
    top: calc(12% + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.story-character-label.visible {
    opacity: 1;
}
.story-char-name {
    display: block;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.story-char-tier {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ============================================ */
/* DARK STARRY THEME FOR ONBOARDING WIZARD      */
/* ============================================ */
#onboarding-wizard.onboarding-overlay {
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 40%, #16213e 100%) !important;
    backdrop-filter: none !important;
}

/* Particles in wizard */
.wizard-particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.wizard-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    animation: storyFloat 6s infinite ease-in-out;
}

/* Modal card — frosted glass dark */
#onboarding-wizard .onboarding-modal.wizard-container {
    background: rgba(5,5,5,0.96) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5) !important;
}

/* Header */
#onboarding-wizard .wizard-header h2,
#onboarding-wizard #wizard-title {
    color: white !important;
}

/* Close button */
#onboarding-wizard .wizard-header > div[onclick] {
    background: rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.7) !important;
}

/* Progress dots */
#onboarding-wizard .wizard-progress .dot {
    background: rgba(255,255,255,0.15) !important;
}
#onboarding-wizard .wizard-progress .dot.active {
    background: var(--primary) !important;
}

/* Headings */
#onboarding-wizard h3 {
    color: white !important;
}

/* Paragraph text */
#onboarding-wizard p {
    color: rgba(255,255,255,0.7) !important;
}
#onboarding-wizard p strong {
    color: white !important;
}

/* Labels */
#onboarding-wizard label {
    color: rgba(255,255,255,0.85) !important;
}

/* Spans with muted color */
#onboarding-wizard .wizard-slide span {
    color: rgba(255,255,255,0.6) !important;
}
#onboarding-wizard .wizard-slide span strong {
    color: white !important;
}

/* Input groups & info boxes — dark glass */
#onboarding-wizard .wizard-input-group,
#onboarding-wizard .wizard-slide div[style*="background:#f8fafc"],
#onboarding-wizard .wizard-slide div[style*="background: #f8fafc"] {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* Text inputs, selects, textareas */
#onboarding-wizard input,
#onboarding-wizard select,
#onboarding-wizard textarea {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: white !important;
}
#onboarding-wizard input::placeholder,
#onboarding-wizard textarea::placeholder {
    color: rgba(255,255,255,0.35) !important;
}
#onboarding-wizard select option {
    background: #1a1a2e;
    color: white;
}

/* Gender select buttons */
#onboarding-wizard .gender-select-btn {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.9) !important;
}
#onboarding-wizard .gender-select-btn:hover {
    background: rgba(255,255,255,0.12) !important;
    border-color: rgba(255,255,255,0.25) !important;
}

/* Footer */
#onboarding-wizard .wizard-footer {
    border-top-color: rgba(255,255,255,0.08) !important;
}
#onboarding-wizard .wizard-btn.secondary,
#onboarding-wizard #wizard-back {
    color: rgba(255,255,255,0.6) !important;
}

/* Primary button keeps green but add glow */
#onboarding-wizard .wizard-btn.primary,
#onboarding-wizard #wizard-next {
    box-shadow: 0 4px 20px rgba(4,106,56,0.35) !important;
}

/* Feature list items & icon circles in slides */
#onboarding-wizard .wizard-slide div[style*="color:#334155"] {
    color: rgba(255,255,255,0.9) !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#64748b"],
#onboarding-wizard .wizard-slide span[style*="color:#64748b"] {
    color: rgba(255,255,255,0.5) !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#666"],
#onboarding-wizard .wizard-slide p[style*="color:#666"] {
    color: rgba(255,255,255,0.6) !important;
}

/* ---- COMPREHENSIVE INLINE COLOR OVERRIDES ---- */

/* ALL white/light backgrounds → dark glass */
#onboarding-wizard .wizard-slide div[style*="background:white"],
#onboarding-wizard .wizard-slide div[style*="background: white"],
#onboarding-wizard .wizard-slide button[style*="background:white"],
#onboarding-wizard .wizard-slide button[style*="background: white"],
#onboarding-wizard .wizard-slide div[style*="background:#fff"],
#onboarding-wizard .wizard-slide div[style*="background: #fff"] {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* Light gray backgrounds */
#onboarding-wizard .wizard-slide div[style*="background:#e2e8f0"],
#onboarding-wizard .wizard-slide div[style*="background: #e2e8f0"] {
    background: rgba(255,255,255,0.1) !important;
}

/* Green gradient backgrounds (f0fdf4, dcfce7) → dark green */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #f0fdf4"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #f0fdf4"] {
    background: linear-gradient(135deg, rgba(4,106,56,0.2), rgba(4,106,56,0.1)) !important;
}

/* Blue gradient backgrounds (e0f2fe, bae6fd) → dark blue */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #e0f2fe"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #e0f2fe"] {
    background: linear-gradient(135deg, rgba(14,116,144,0.2), rgba(14,116,144,0.1)) !important;
}

/* Indigo gradient backgrounds (e0e7ff, c7d2fe) → dark indigo */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #e0e7ff"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #e0e7ff"] {
    background: linear-gradient(135deg, rgba(67,56,202,0.2), rgba(67,56,202,0.1)) !important;
}

/* Yellow gradient backgrounds (fef3c7, fde68a) → dark amber */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #fef3c7"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #fef3c7"] {
    background: linear-gradient(135deg, rgba(180,83,9,0.2), rgba(180,83,9,0.1)) !important;
}

/* Pale yellow gradient backgrounds (fef9c3, fde68a) → dark amber */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #fef9c3"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #fef9c3"] {
    background: linear-gradient(135deg, rgba(133,77,14,0.25), rgba(133,77,14,0.12)) !important;
}

/* Lime gradient backgrounds (ecfccb, d9f99d) → dark lime */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #ecfccb"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #ecfccb"] {
    background: linear-gradient(135deg, rgba(63,98,18,0.25), rgba(63,98,18,0.12)) !important;
}

/* Pink gradient backgrounds (fce7f3, fbcfe8) → dark pink */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #fce7f3"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #fce7f3"] {
    background: linear-gradient(135deg, rgba(190,24,93,0.2), rgba(190,24,93,0.1)) !important;
}

/* Profile photo container gradient */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #e2e8f0"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #e2e8f0"] {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)) !important;
}

/* ALL border overrides — every light border pattern */
#onboarding-wizard .wizard-slide div[style*="border:1px solid #e2e8f0"],
#onboarding-wizard .wizard-slide div[style*="border: 1px solid #e2e8f0"],
#onboarding-wizard .wizard-slide button[style*="border:2px solid #e2e8f0"],
#onboarding-wizard .wizard-slide button[style*="border: 2px solid #e2e8f0"] {
    border-color: rgba(255,255,255,0.12) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #eee"],
#onboarding-wizard .wizard-slide div[style*="border: 1px solid #eee"] {
    border-color: rgba(255,255,255,0.1) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #cbd5e1"],
#onboarding-wizard .wizard-slide button[style*="border:1px solid #cbd5e1"] {
    border-color: rgba(255,255,255,0.15) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:2px solid #48864B"],
#onboarding-wizard .wizard-slide button[style*="border:2px solid #48864B"] {
    border-color: rgba(4,106,56,0.5) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:2px dashed #48864B"],
#onboarding-wizard .wizard-slide div[style*="border: 2px dashed #48864B"] {
    border-color: rgba(4,106,56,0.5) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #bbf7d0"] {
    border-color: rgba(4,106,56,0.3) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #7dd3fc"],
#onboarding-wizard .wizard-slide div[style*="border:2px solid #0284c7"],
#onboarding-wizard .wizard-slide button[style*="border:2px solid #0284c7"] {
    border-color: rgba(14,116,144,0.4) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #a5b4fc"] {
    border-color: rgba(67,56,202,0.3) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #fcd34d"] {
    border-color: rgba(180,83,9,0.3) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #bef264"] {
    border-color: rgba(63,98,18,0.4) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #f9a8d4"] {
    border-color: rgba(190,24,93,0.3) !important;
}
#onboarding-wizard .wizard-slide button[style*="border:2px solid var(--primary)"] {
    border-color: rgba(4,106,56,0.5) !important;
}

/* ---- TEXT COLOR OVERRIDES ---- */

/* Dark greens on light backgrounds → light green/white */
#onboarding-wizard .wizard-slide div[style*="color:#166534"],
#onboarding-wizard .wizard-slide span[style*="color:#166534"],
#onboarding-wizard .wizard-slide p[style*="color:#166534"] {
    color: #86efac !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#1a4d2e"],
#onboarding-wizard .wizard-slide span[style*="color:#1a4d2e"],
#onboarding-wizard .wizard-slide p[style*="color:#1a4d2e"] {
    color: #86efac !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#48864B"],
#onboarding-wizard .wizard-slide span[style*="color:#48864B"] {
    color: #6ee7b7 !important;
}

/* Dark blues → light blue */
#onboarding-wizard .wizard-slide div[style*="color:#0369a1"],
#onboarding-wizard .wizard-slide span[style*="color:#0369a1"],
#onboarding-wizard .wizard-slide p[style*="color:#0369a1"] {
    color: #7dd3fc !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#0c4a6e"],
#onboarding-wizard .wizard-slide span[style*="color:#0c4a6e"] {
    color: #7dd3fc !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#0284c7"],
#onboarding-wizard .wizard-slide span[style*="color:#0284c7"] {
    color: #38bdf8 !important;
}

/* Dark amber → warm amber */
#onboarding-wizard .wizard-slide div[style*="color:#92400e"],
#onboarding-wizard .wizard-slide span[style*="color:#92400e"] {
    color: #fcd34d !important;
}
#onboarding-wizard .wizard-slide div[style*="color:#854d0e"],
#onboarding-wizard .wizard-slide span[style*="color:#854d0e"],
#onboarding-wizard .wizard-slide p[style*="color:#854d0e"] {
    color: #fde047 !important;
}

/* Dark lime → light lime */
#onboarding-wizard .wizard-slide div[style*="color:#3f6212"],
#onboarding-wizard .wizard-slide span[style*="color:#3f6212"],
#onboarding-wizard .wizard-slide p[style*="color:#3f6212"] {
    color: #bef264 !important;
}

/* Dark indigo → light indigo */
#onboarding-wizard .wizard-slide div[style*="color:#4338ca"],
#onboarding-wizard .wizard-slide span[style*="color:#4338ca"] {
    color: #a5b4fc !important;
}

/* Dark pink → light pink */
#onboarding-wizard .wizard-slide div[style*="color:#be185d"],
#onboarding-wizard .wizard-slide span[style*="color:#be185d"] {
    color: #f9a8d4 !important;
}

/* Muted grays → light */
#onboarding-wizard .wizard-slide div[style*="color:#94a3b8"],
#onboarding-wizard .wizard-slide span[style*="color:#94a3b8"] {
    color: rgba(255,255,255,0.5) !important;
}

/* Dark gray text (#333) → white for readability on dark bg (e.g. workout names) */
#onboarding-wizard .wizard-slide div[style*="color:#333"] {
    color: rgba(255,255,255,0.9) !important;
}

/* Medium gray text (#888) → lighter for readability on dark bg (e.g. workout descriptions) */
#onboarding-wizard .wizard-slide div[style*="color:#888"] {
    color: rgba(255,255,255,0.5) !important;
}

/* Light borders (#f0f0f0) → subtle dark borders (e.g. calendar row dividers) */
#onboarding-wizard .wizard-slide div[style*="border-bottom:1px solid #f0f0f0"] {
    border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* var(--primary) text in buttons on dark bg */
#onboarding-wizard .wizard-slide button[style*="color:var(--primary)"] {
    color: #6ee7b7 !important;
}

/* Catch-all: any remaining dark text inside wizard */
#onboarding-wizard .wizard-slide div[style*="color:#1f2937"] {
    color: rgba(255,255,255,0.9) !important;
}

/* Calendar/preview white backgrounds */
#onboarding-wizard .wizard-slide div[style*="background:#fff"],
#onboarding-wizard .wizard-slide div[style*="background: #fff"],
#onboarding-wizard .wizard-slide div[style*="background: white"] {
    background: rgba(255,255,255,0.06) !important;
}

/* Small colored circle icons — keep their colors */
#onboarding-wizard .wizard-slide div[style*="background:var(--primary)"],
#onboarding-wizard .wizard-slide div[style*="background: var(--primary)"],
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(180deg, #1a1a2e"],
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #fbbf24"] {
    /* These already look good on dark — no override */
}

/* Active/selected state for buttons with green backgrounds */
#onboarding-wizard .wizard-slide button[style*="background:#f0fdf4"],
#onboarding-wizard .wizard-slide button[style*="background: #f0fdf4"] {
    background: rgba(4,106,56,0.15) !important;
}
#onboarding-wizard .wizard-slide div[style*="background:#f0fdf4"],
#onboarding-wizard .wizard-slide div[style*="background: #f0fdf4"] {
    background: rgba(4,106,56,0.15) !important;
}

/* ---- LI / BUTTON / LABEL ELEMENT OVERRIDES ---- */
/* The selectors above target div elements, but many slides use li, button, and label elements */

/* White backgrounds on li elements → dark glass */
#onboarding-wizard .wizard-slide li[style*="background:white"],
#onboarding-wizard .wizard-slide li[style*="background: white"] {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* Green gradient backgrounds on li → dark green */
#onboarding-wizard .wizard-slide li[style*="background:linear-gradient(135deg, #f0fdf4"],
#onboarding-wizard .wizard-slide li[style*="background: linear-gradient(135deg, #f0fdf4"] {
    background: linear-gradient(135deg, rgba(4,106,56,0.2), rgba(4,106,56,0.1)) !important;
}

/* Indigo gradient backgrounds on li → dark indigo */
#onboarding-wizard .wizard-slide li[style*="background:linear-gradient(135deg, #e0e7ff"],
#onboarding-wizard .wizard-slide li[style*="background: linear-gradient(135deg, #e0e7ff"] {
    background: linear-gradient(135deg, rgba(67,56,202,0.2), rgba(67,56,202,0.1)) !important;
}

/* Yellow gradient backgrounds on li → dark amber */
#onboarding-wizard .wizard-slide li[style*="background:linear-gradient(135deg, #fef3c7"],
#onboarding-wizard .wizard-slide li[style*="background: linear-gradient(135deg, #fef3c7"] {
    background: linear-gradient(135deg, rgba(180,83,9,0.2), rgba(180,83,9,0.1)) !important;
}

/* Pink gradient backgrounds on li → dark pink */
#onboarding-wizard .wizard-slide li[style*="background:linear-gradient(135deg, #fce7f3"],
#onboarding-wizard .wizard-slide li[style*="background: linear-gradient(135deg, #fce7f3"] {
    background: linear-gradient(135deg, rgba(190,24,93,0.2), rgba(190,24,93,0.1)) !important;
}

/* Border overrides on li elements */
#onboarding-wizard .wizard-slide li[style*="border:1px solid #bbf7d0"] {
    border-color: rgba(4,106,56,0.3) !important;
}
#onboarding-wizard .wizard-slide li[style*="border:1px solid #a5b4fc"] {
    border-color: rgba(67,56,202,0.3) !important;
}
#onboarding-wizard .wizard-slide li[style*="border:1px solid #fcd34d"] {
    border-color: rgba(180,83,9,0.3) !important;
}
#onboarding-wizard .wizard-slide li[style*="border:1px solid #f9a8d4"] {
    border-color: rgba(190,24,93,0.3) !important;
}
#onboarding-wizard .wizard-slide li[style*="border:1px solid #eee"],
#onboarding-wizard .wizard-slide li[style*="border: 1px solid #eee"] {
    border-color: rgba(255,255,255,0.1) !important;
}

/* Ensure all text inside wizard list items is readable */
#onboarding-wizard .wizard-slide li {
    color: rgba(255,255,255,0.9) !important;
}
#onboarding-wizard .wizard-slide li strong {
    color: white !important;
}

/* Button background:#fff overrides (freq/day/split buttons on slides 4-5) */
#onboarding-wizard .wizard-slide button[style*="background:#fff"],
#onboarding-wizard .wizard-slide button[style*="background: #fff"] {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.15) !important;
}

/* Button text color overrides */
#onboarding-wizard .wizard-slide button[style*="color:#1a4d2e"] {
    color: rgba(255,255,255,0.9) !important;
}
#onboarding-wizard .wizard-slide button[style*="color:#334155"] {
    color: rgba(255,255,255,0.9) !important;
}
#onboarding-wizard .wizard-slide button[style*="color:#0c4a6e"] {
    color: #7dd3fc !important;
}

/* Training setup controls: keep nested inline labels readable on the dark wizard. */
#onboarding-wizard #slide-5 .split-btn > div {
    color: rgba(255,255,255,0.72) !important;
}
#onboarding-wizard #slide-5 .split-btn > div:first-child {
    color: white !important;
}
#onboarding-wizard #slide-5 .split-btn > div:last-child {
    color: #bbf7d0 !important;
}
#onboarding-wizard #slide-6 .wizard-input-group label {
    color: rgba(255,255,255,0.92) !important;
}
#onboarding-wizard #slide-6 .wizard-input-group p {
    color: rgba(255,255,255,0.64) !important;
}
#onboarding-wizard #wizard-calendar-preview {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 18px 45px rgba(0,0,0,0.2) !important;
}
#onboarding-wizard .wizard-calendar-row {
    min-height: 56px;
    border-bottom-color: rgba(255,255,255,0.1) !important;
}
#onboarding-wizard .wizard-calendar-day {
    color: #86efac !important;
}
#onboarding-wizard .wizard-calendar-workout {
    min-width: 0;
}
#onboarding-wizard .wizard-calendar-icon {
    color: #f8fafc !important;
    flex: 0 0 auto;
}
#onboarding-wizard .wizard-calendar-workout-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}
#onboarding-wizard .wizard-calendar-workout-name {
    color: #ffffff !important;
    display: block !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
}
#onboarding-wizard .wizard-calendar-workout-desc {
    color: rgba(255,255,255,0.64) !important;
    display: block !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}
#onboarding-wizard .wizard-calendar-edit-icon {
    color: #86efac !important;
}
#wizard-workout-dropdown-overlay h3 {
    color: #1a4d2e !important;
}

/* Glass size button active state (background:#e0f2fe) → dark blue */
#onboarding-wizard .wizard-slide button[style*="background:#e0f2fe"],
#onboarding-wizard .wizard-slide button[style*="background: #e0f2fe"] {
    background: rgba(14,116,144,0.2) !important;
}
#onboarding-wizard .wizard-slide button[style*="border:2px solid #0284c7"] {
    border-color: rgba(14,116,144,0.4) !important;
}
#onboarding-wizard .wizard-slide button[style*="color:#0284c7"] {
    color: #38bdf8 !important;
}

/* Label background overrides (cycle sync radio labels on slide 3) */
#onboarding-wizard .wizard-slide label[style*="background:white"],
#onboarding-wizard .wizard-slide label[style*="background: white"] {
    background: rgba(255,255,255,0.06) !important;
}
#onboarding-wizard .wizard-slide label[style*="border:1px solid #e2e8f0"],
#onboarding-wizard .wizard-slide label[style*="border: 1px solid #e2e8f0"] {
    border-color: rgba(255,255,255,0.12) !important;
}

/* Paragraph text color:#334155 override (slide 20 instructions) */
#onboarding-wizard .wizard-slide p[style*="color:#334155"],
#onboarding-wizard .wizard-slide p[style*="color: #334155"] {
    color: rgba(255,255,255,0.9) !important;
}

/* Blue gradient backgrounds on div (slide 9 hydration) — ensure coverage */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #e0f2fe"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #e0f2fe"] {
    background: linear-gradient(135deg, rgba(14,116,144,0.2), rgba(14,116,144,0.1)) !important;
}

/* Pale blue gradient (#eff6ff, #dbeafe) — slide 21 AI coach meal plans card */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #eff6ff"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #eff6ff"] {
    background: linear-gradient(135deg, rgba(37,99,235,0.25), rgba(37,99,235,0.12)) !important;
    border-color: rgba(37,99,235,0.35) !important;
}

/* Pale violet gradient (#f5f3ff, #ede9fe) — slide 21 AI coach build anything card */
#onboarding-wizard .wizard-slide div[style*="background:linear-gradient(135deg, #f5f3ff"],
#onboarding-wizard .wizard-slide div[style*="background: linear-gradient(135deg, #f5f3ff"] {
    background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(124,58,237,0.12)) !important;
    border-color: rgba(124,58,237,0.35) !important;
}

/* Borders used by the above cards (#bfdbfe pale blue, #c4b5fd pale violet) */
#onboarding-wizard .wizard-slide div[style*="border:1px solid #bfdbfe"] {
    border-color: rgba(37,99,235,0.35) !important;
}
#onboarding-wizard .wizard-slide div[style*="border:1px solid #c4b5fd"] {
    border-color: rgba(124,58,237,0.35) !important;
}

/* Slide 21 cards use color:#1e293b on spans — ensure readable on dark */
#onboarding-wizard .wizard-slide span[style*="color:#1e293b"] {
    color: rgba(255,255,255,0.9) !important;
}
#onboarding-wizard .wizard-slide span[style*="color:#1e293b"] strong {
    color: white !important;
}

/* ---- END LI / BUTTON / LABEL OVERRIDES ---- */

/* DBZ Theme Decorations */
#dbz-decorations {
    display: none;
    pointer-events: none;
    z-index: 1;
}

.dbz-character-corner {
    position: fixed;
    bottom: 70px;
    right: 5px;
    width: 120px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    opacity: 0.95;
    z-index: 100;
    animation: dbzFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
    border-radius: 8px;
}


/* Flower Garden Decorations (Female users only) */
#flower-decorations {
    display: none;
    pointer-events: none;
    z-index: 1;
}

.flower-corner {
    position: fixed;
    width: 60px;
    height: 60px;
    object-fit: contain;
    opacity: 0.4;
    z-index: 100;
    filter: drop-shadow(0 2px 8px rgba(217, 139, 156, 0.3));
    animation: flowerFloat 4s ease-in-out infinite;
}

.flower-top-right {
    top: 80px;
    right: 15px;
    animation-delay: 0s;
}

.flower-bottom-left {
    bottom: 80px;
    left: 15px;
    transform: rotate(180deg);
    animation-delay: 1s;
}

.flower-top-left {
    top: 180px;
    left: 20px;
    animation-delay: 2s;
    width: 55px;
    height: 55px;
}

.flower-bottom-right {
    bottom: 180px;
    right: 20px;
    transform: rotate(-15deg);
    animation-delay: 3s;
    width: 50px;
    height: 50px;
}

@keyframes flowerFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-8px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translateY(-12px) rotate(-3deg) scale(1.08);
    }
    75% {
        transform: translateY(-6px) rotate(3deg) scale(1.03);
    }
}

/* Additional rotations for specific corners */
.flower-bottom-left {
    animation-name: flowerFloatRotated;
}

@keyframes flowerFloatRotated {
    0%, 100% {
        transform: translateY(0) rotate(180deg) scale(1);
    }
    25% {
        transform: translateY(-8px) rotate(185deg) scale(1.05);
    }
    50% {
        transform: translateY(-12px) rotate(177deg) scale(1.08);
    }
    75% {
        transform: translateY(-6px) rotate(183deg) scale(1.03);
    }
}

/* Flower Garden Theme - Falling Flower Animation */
@keyframes flowerFall {
    0% {
        transform: translateY(-100px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) translateX(20px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-15px) rotate(180deg);
    }
    75% {
        transform: translateY(75vh) translateX(10px) rotate(270deg);
        opacity: 0.8;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) translateX(0) rotate(360deg);
        opacity: 0;
    }
}

.falling-flower {
    position: fixed;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity;
}

/* Sailor Moon Character Decorations (Female users only) */
#sailor-decorations {
    display: none;
    pointer-events: none;
    z-index: 1;
}

.sailor-character-corner {
    position: fixed;
    bottom: 70px;
    right: 5px;
    width: 100px;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    opacity: 0.95;
    z-index: 100;
    animation: sailorFloat 3.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 15px rgba(255, 105, 180, 0.4));
    border-radius: 8px;
}

.sailor-star-left {
    position: fixed;
    top: 100px;
    left: 10px;
    width: 40px;
    height: 40px;
    opacity: 0.6;
    z-index: 100;
    animation: sailorSparkle 2s ease-in-out infinite;
}

.sailor-star-right {
    position: fixed;
    top: 180px;
    right: 15px;
    width: 35px;
    height: 35px;
    opacity: 0.5;
    z-index: 100;
    animation: sailorSparkle 2.5s ease-in-out infinite 0.5s;
}

.sailor-heart-float {
    position: fixed;
    top: 250px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    opacity: 0.4;
    z-index: 100;
    animation: sailorHeartFloat 3s ease-in-out infinite 1s;
}

@keyframes sailorFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.05); }
}

@keyframes sailorSparkle {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.9; transform: scale(1.2) rotate(15deg); }
}

@keyframes sailorHeartFloat {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) translateY(-15px) scale(1.15); }
}

/* Sailor Moon theme specific gradient for welcome section */
body.sailor-theme-active .dashboard-welcome {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-light) 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Sailor Moon theme - pink/gold gradient with character in welcome */
body.sailor-moon-theme .dashboard-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/sailor-moon-character.svg');
    background-size: auto 90px;
    background-repeat: no-repeat;
    background-position: right -15px bottom -15px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

/* Sailor Venus theme - orange/gold gradient with character in welcome */
body.sailor-venus-theme .dashboard-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/sailor-venus-character.svg');
    background-size: auto 85px;
    background-repeat: no-repeat;
    background-position: right -20px bottom -10px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}


/* Settings icon toggle for DBZ themes */
.settings-icon-dragonball {
    display: none !important;
}

body.dbz-theme-active .settings-icon-gear {
    display: none !important;
}

body.dbz-theme-active .settings-icon-dragonball {
    display: inline-block !important;
}

/* Settings icon toggle for Sailor Moon themes */
.settings-icon-sailormoon {
    display: none !important;
}

body.sailor-theme-active .settings-icon-gear {
    display: none !important;
}

body.sailor-theme-active .settings-icon-sailormoon {
    display: inline-block !important;
}

/* Profile icon Sailor Moon for Sailor Moon themes */
body.sailor-theme-active .profile-icon {
    background-image: url('assets/sailor-moon.svg');
    background-size: cover;
    background-position: center;
    color: transparent !important; /* Hide the "S" text */
}

/* Profile icon flame for Blaze/Prestige themes */
body.dbz-theme-active .profile-icon {
    background-image: url('assets/flame-icon.svg');
    background-size: cover;
    background-position: center;
    color: transparent !important; /* Hide the "S" text */
    font-size: 0; /* Extra measure to hide text */
}

/* ==========================================================================
   Welcome FitCoin Grant — header coin widget animation
   When the 2,500 FitCoin welcome bonus lands, the header .coin-header-widget
   (top-right of the dashboard) glows & pulses, the .coin-balance-sync
   number counts up, and a "+2,500 🪙" floater rises above the widget and
   fades away. No popup, all in-place.
   ========================================================================== */
.coin-header-widget.coin-widget-grant-animating {
    animation: coin-widget-grant-pulse 0.9s ease-in-out 2;
    box-shadow:
        0 0 0 2px rgba(255, 215, 0, 0.55),
        0 0 18px rgba(255, 200, 60, 0.55),
        0 0 32px rgba(255, 180, 40, 0.35);
    border-radius: 999px;
    transition: box-shadow 0.3s ease;
}
.coin-header-widget.coin-widget-grant-animating .coin-emoji {
    display: inline-block;
    animation: coin-widget-grant-spin 0.9s ease-in-out 2;
}
.coin-header-widget.coin-widget-grant-animating .coin-amount {
    color: #ffd76a;
    text-shadow: 0 0 10px rgba(255, 200, 60, 0.7);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}
@keyframes coin-widget-grant-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}
@keyframes coin-widget-grant-spin {
    0%   { transform: rotateY(0deg)   scale(1); }
    50%  { transform: rotateY(180deg) scale(1.15); }
    100% { transform: rotateY(360deg) scale(1); }
}

/* Floating "+2,500 🪙" label that rises above the widget and fades out.
   Positioned absolutely against the coin-header-widget (JS forces the
   widget to position:relative when the animation starts). */
.coin-widget-grant-floater {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd76a 0%, #ffb020 100%);
    color: #1a1446;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    box-shadow:
        0 4px 14px rgba(255, 180, 40, 0.55),
        0 0 0 1px rgba(255, 220, 120, 0.7) inset;
    animation: coin-widget-grant-floater-rise 2.4s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
    z-index: 50;
}
@keyframes coin-widget-grant-floater-rise {
    0%   { opacity: 0; transform: translate(-50%, -50%)   scale(0.6); }
    15%  { opacity: 1; transform: translate(-50%, -120%)  scale(1.05); }
    70%  { opacity: 1; transform: translate(-50%, -180%)  scale(1); }
    100% { opacity: 0; transform: translate(-50%, -220%)  scale(0.95); }
}

/* ========== PULL TO REFRESH ========== */
.ptr-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 0;
    overflow: hidden;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
    background: linear-gradient(180deg, #0f172a 0%, #1a1a2e 100%);
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    user-select: none;
    -webkit-user-select: none;
}
.ptr-indicator.ptr-pulling {
    transition: none;
}
.ptr-indicator.ptr-refreshing {
    height: 52px;
    opacity: 1;
}
.ptr-spinner {
    position: relative;
    width: 22px;
    height: 22px;
}
.ptr-arrow {
    transition: transform 0.2s ease;
    color: rgba(255,255,255,0.7);
}
.ptr-indicator.ptr-threshold .ptr-arrow {
    transform: rotate(360deg);
    color: var(--primary-light, #7BA883);
}
.ptr-indicator.ptr-refreshing .ptr-arrow {
    display: none;
}
.ptr-loading-ring {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255,255,255,0.15);
    border-top-color: var(--primary-light, #7BA883);
    border-radius: 50%;
    animation: ptrSpin 0.7s linear infinite;
}
.ptr-indicator.ptr-refreshing .ptr-loading-ring {
    display: block;
}
.ptr-indicator.ptr-threshold .ptr-text {
    color: var(--primary-light, #7BA883);
}
.ptr-indicator.ptr-refreshing .ptr-text {
    color: rgba(255,255,255,0.5);
}
@keyframes ptrSpin {
    to { transform: rotate(360deg); }
}
/* ========== END PULL TO REFRESH ========== */

/* Respect reduced-motion preferences: skip the bouncy pulse & spin. */
@media (prefers-reduced-motion: reduce) {
    .coin-header-widget.coin-widget-grant-animating,
    .coin-header-widget.coin-widget-grant-animating .coin-emoji,
    .coin-widget-grant-floater {
        animation: none !important;
    }
    .coin-widget-grant-floater {
        opacity: 1;
        transform: translate(-50%, -180%);
        transition: opacity 0.4s ease 1.8s;
    }
}
