/* ═══════════════════════════════════════════════════════
   ONBOARDING V2 — Enhanced Styles
   Theme: Rich Nautical with depth, particles & life
   ═══════════════════════════════════════════════════════ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Ocean background palette */
    --blue-900: #1A365D;
    --blue-800: #2A4365;
    --blue-700: #2B6CB0;
    --blue-600: #3182CE;
    --blue-500: #4299E1;
    --blue-400: #63B3ED;
    --blue-300: #90CDF4;
    --blue-200: #BEE3F8;
    --teal-500: #38B2AC;
    --teal-400: #4FD1C5;
    --teal-300: #81E6D9;
    --green-500: #48BB78;
    --green-400: #68D391;
    --red-500: #F56565;
    --brown-600: #C05621;
    --brown-800: #7B341E;

    /* ── Nivo Brand Palette ── */
    --accent-500: #ffc845;
    --accent-600: #e5a72c;
    --accent-700: #ce9117;
    --neutral-400: #9eabbf;
    --neutral-500: #687589;
    --neutral-600: #525f80;
    --neutral-650: #2d4177;
    --neutral-700: #263765;
    --neutral-800: #152849;

    --card-bg: rgba(255, 255, 255, 0.94);
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.10), 0 4px 20px rgba(0, 0, 0, 0.05);
    --font-heading: 'Baloo Thambi 2', 'Outfit', sans-serif;
    --font-body: 'Baloo Thambi 2', 'Inter', sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

html,
body {
    height: 100%;
    font-family: var(--font-body);
    color: var(--neutral-600);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   OCEAN BACKGROUND — ENRICHED
   ═══════════════════════════════════════════════════════ */
.ocean-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg,
            #D4F1FF 0%, #B5E4F7 8%, #87CEEB 18%, #63B3ED 32%, #4299E1 48%,
            #3182CE 58%, #2B6CB0 72%, #1E4E8C 85%, #1A365D 100%);
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

/* Scene shift: Step 2 → zoom into harbor/dock area */
.ocean-bg.scene-harbor {
    transform: scale(1.08) translateY(-6%);
}

/* Scene shift: Step 3/4 → neutral view with boat emphasis */
.ocean-bg.scene-voyage {
    transform: scale(1.05) translateY(-3%);
}

/* ── Stars (faint sparkle in upper sky) ── */
.stars-layer {
    position: absolute;
    top: 0;
    width: 100%;
    height: 25%;
    pointer-events: none;
}

/* ── Sun with animated rays ── */
.sun {
    position: absolute;
    top: 3%;
    right: 10%;
    width: 160px;
    height: 160px;
    animation: sunFloat 6s ease-in-out infinite;
}

.sun-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #FFFFF0 0%, #FFF5CC 30%, #FBD38D 60%, #F6AD55 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px rgba(255, 252, 235, 0.8), 0 0 100px rgba(251, 211, 141, 0.5), 0 0 160px rgba(246, 173, 85, 0.2);
}

.sun-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 252, 235, 0.4) 0%, rgba(251, 211, 141, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: sunPulse 3s ease-in-out infinite;
}

.sun-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 45px;
    background: linear-gradient(to top, rgba(255, 200, 69, 0.6), rgba(251, 211, 141, 0.2));
    border-radius: 2px;
    transform-origin: center bottom;
    animation: rayPulse 4s ease-in-out infinite;
}

.ray-1 {
    transform: translate(-50%, -100%) rotate(0deg);
}

.ray-2 {
    transform: translate(-50%, -100%) rotate(60deg);
}

.ray-3 {
    transform: translate(-50%, -100%) rotate(120deg);
}

.ray-4 {
    transform: translate(-50%, -100%) rotate(180deg);
}

.ray-5 {
    transform: translate(-50%, -100%) rotate(240deg);
}

.ray-6 {
    transform: translate(-50%, -100%) rotate(300deg);
}

/* ── Clouds — puffy layered ── */
.clouds-layer {
    position: absolute;
    top: 0;
    width: 100%;
    height: 45%;
    pointer-events: none;
}

.cloud {
    position: absolute;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.05));
}

.cloud-puff {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: inset -3px -3px 6px rgba(200, 220, 240, 0.5);
}

/* Cloud 1 — large foreground */
.cloud-1 {
    top: 10%;
    animation: cloudMove 42s linear infinite;
}

.cloud-1 .p1 {
    width: 90px;
    height: 60px;
    top: 10px;
    left: 0;
}

.cloud-1 .p2 {
    width: 110px;
    height: 70px;
    top: -10px;
    left: 40px;
}

.cloud-1 .p3 {
    width: 80px;
    height: 55px;
    top: 5px;
    left: 100px;
}

/* Cloud 2 — medium distant */
.cloud-2 {
    top: 20%;
    animation: cloudMove 55s linear infinite 10s;
    opacity: 0.7;
}

.cloud-2 .p1 {
    width: 65px;
    height: 45px;
    top: 5px;
    left: 0;
}

.cloud-2 .p2 {
    width: 85px;
    height: 55px;
    top: -8px;
    left: 30px;
}

.cloud-2 .p3 {
    width: 60px;
    height: 40px;
    top: 3px;
    left: 80px;
}

/* Cloud 3 — big fluffy */
.cloud-3 {
    top: 6%;
    animation: cloudMove 60s linear infinite 22s;
    opacity: 0.5;
}

.cloud-3 .p1 {
    width: 100px;
    height: 65px;
    top: 12px;
    left: 0;
}

.cloud-3 .p2 {
    width: 130px;
    height: 80px;
    top: -15px;
    left: 50px;
}

.cloud-3 .p3 {
    width: 90px;
    height: 60px;
    top: 8px;
    left: 120px;
}

/* Cloud 4 — small accent */
.cloud-4 {
    top: 16%;
    animation: cloudMove 48s linear infinite 30s;
    opacity: 0.4;
}

.cloud-4 .p1 {
    width: 50px;
    height: 35px;
    top: 5px;
    left: 0;
}

.cloud-4 .p2 {
    width: 65px;
    height: 45px;
    top: -5px;
    left: 25px;
}

/* Cloud 5 */
.cloud-5 {
    top: 25%;
    animation: cloudMove 50s linear infinite 5s;
    opacity: 0.6;
}

.cloud-5 .p1 {
    width: 70px;
    height: 48px;
    top: 8px;
    left: 0;
}

.cloud-5 .p2 {
    width: 90px;
    height: 58px;
    top: -5px;
    left: 35px;
}

.cloud-5 .p3 {
    width: 60px;
    height: 42px;
    top: 6px;
    left: 90px;
}

/* ── Birds with wing flap ── */
.birds-layer {
    position: absolute;
    top: 3%;
    width: 100%;
    height: 35%;
    pointer-events: none;
}

.bird {
    position: absolute;
    display: flex;
    gap: 2px;
    font-size: 14px;
    color: #2D3748;
    opacity: 0.5;
}

.wing-l,
.wing-r {
    display: inline-block;
}

.wing-l {
    animation: wingFlapL 0.6s ease-in-out infinite;
}

.wing-r {
    animation: wingFlapR 0.6s ease-in-out infinite;
}

.bird-1 {
    top: 15%;
    animation: birdFly 14s linear infinite;
}

.bird-2 {
    top: 28%;
    animation: birdFly 18s linear infinite 4s;
    font-size: 11px;
    opacity: 0.35;
}

.bird-3 {
    top: 8%;
    animation: birdFly 20s linear infinite 9s;
    font-size: 16px;
}

.bird-4 {
    top: 22%;
    animation: birdFly 16s linear infinite 14s;
    font-size: 12px;
    opacity: 0.4;
}

/* ── Mountains / Islands ── */
.mountains-layer {
    position: absolute;
    bottom: 22%;
    width: 100%;
    height: 18%;
    pointer-events: none;
    z-index: 1;
}

.mountain {
    position: absolute;
    bottom: 0;
}

.mountain-1 {
    left: 0;
    width: 30%;
    height: 100%;
    opacity: 0.85;
}

.mountain-2 {
    right: 0;
    width: 25%;
    height: 85%;
    opacity: 0.65;
}

/* ── Lighthouse ── */
.lighthouse {
    position: absolute;
    bottom: 22%;
    left: 9%;
    width: 45px;
    height: 120px;
    z-index: 3;
}

.lighthouse-beam {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 300px;
    height: 8px;
    background: linear-gradient(90deg, rgba(255, 200, 69, 0.9), rgba(251, 211, 141, 0.3), transparent);
    transform-origin: left center;
    animation: lighthouseBeam 6s ease-in-out infinite;
    border-radius: 3px;
    filter: blur(2px);
}

.lighthouse-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #FFFFF0, #ffc845);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(255, 200, 69, 0.9), 0 0 35px rgba(255, 200, 69, 0.4);
    animation: lanternGlow 2s ease-in-out infinite;
}

.lighthouse-body {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 75px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

.lighthouse-stripe {
    width: 100%;
    height: 15px;
    background: #E53E3E;
    margin-top: 7px;
}

.lighthouse-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 12px;
    background: #A0AEC0;
    border-radius: 0 0 4px 4px;
}

/* ── Waves — 4 layers ── */
.waves-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
}

.wave-4 {
    animation: waveSlide 16s linear infinite;
    opacity: 0.5;
    bottom: 10px;
}

.wave-back {
    animation: waveSlide 12s linear infinite reverse;
    opacity: 0.6;
}

.wave-mid {
    animation: waveSlide 8s linear infinite;
    opacity: 0.7;
    bottom: -10px;
}

.wave-front {
    animation: waveSlide 5.5s linear infinite reverse;
    opacity: 0.8;
    bottom: -20px;
}

/* ── Underwater elements ── */
.underwater {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20%;
    overflow: hidden;
    pointer-events: none;
}

.fish {
    position: absolute;
    font-size: 20px;
    filter: brightness(0.8) saturate(1.3);
}

.fish-1 {
    bottom: 8%;
    animation: fishSwim 10s linear infinite;
    font-size: 22px;
}

.fish-2 {
    bottom: 14%;
    animation: fishSwim 13s linear infinite 3s;
    font-size: 18px;
    transform: scaleX(-1);
}

.fish-3 {
    bottom: 4%;
    animation: fishSwim 16s linear infinite 7s reverse;
    font-size: 16px;
}

.fish-4 {
    bottom: 10%;
    animation: fishSwim 11s linear infinite 5s reverse;
    font-size: 20px;
}

.bubble {
    position: absolute;
    bottom: -10px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.bubble-1 {
    left: 15%;
    animation: bubbleRise 6s ease-in infinite;
    width: 6px;
    height: 6px;
}

.bubble-2 {
    left: 30%;
    animation: bubbleRise 8s ease-in infinite 2s;
    width: 10px;
    height: 10px;
}

.bubble-3 {
    left: 55%;
    animation: bubbleRise 7s ease-in infinite 4s;
}

.bubble-4 {
    left: 70%;
    animation: bubbleRise 9s ease-in infinite 1s;
    width: 5px;
    height: 5px;
}

.bubble-5 {
    left: 40%;
    animation: bubbleRise 6s ease-in infinite 3s;
    width: 7px;
    height: 7px;
}

.bubble-6 {
    left: 85%;
    animation: bubbleRise 10s ease-in infinite 5s;
    width: 9px;
    height: 9px;
}

.seaweed {
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 40px;
    background: linear-gradient(to top, #276749, #48BB78);
    border-radius: 4px 4px 0 0;
    transform-origin: bottom center;
}

.seaweed-1 {
    left: 12%;
    height: 35px;
    animation: seaweedSway 3s ease-in-out infinite;
}

.seaweed-2 {
    left: 14%;
    height: 45px;
    animation: seaweedSway 3.5s ease-in-out infinite 0.5s;
}

.seaweed-3 {
    right: 20%;
    height: 30px;
    animation: seaweedSway 4s ease-in-out infinite 1s;
}

.ocean-floor {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(180deg, transparent, rgba(26, 54, 93, 0.5));
}

/* ── Floating particles overlay ── */
.particles-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat var(--dur) linear infinite;
    opacity: var(--opacity);
}

/* ═══════════════════════════════════════════════════════
   APP CONTAINER
   ═══════════════════════════════════════════════════════ */
.app-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 620px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
}

/* ═══ HEADER ═══ */
.onboarding-header {
    width: 100%;
    margin-bottom: 16px;
    text-align: center;
}

.logo-area {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: logoFloat 4s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 37px;
    color: #fff;
    letter-spacing: -0.5px;
}

.logo-img {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.logo-highlight {
    color: #718096;
}

/* ═══ STEP INDICATOR ═══ */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.step-dot.active {
    background: rgba(255, 200, 69, 0.9);
    color: #fff;
    border-color: var(--accent-500);
    box-shadow: 0 0 20px rgba(255, 200, 69, 0.4);
    transform: scale(1.1);
    animation: dotPulse 2s ease-in-out infinite;
}

.step-dot.done {
    background: rgba(255, 200, 69, 0.9);
    color: #fff;
    border-color: var(--accent-500);
}

.step-line {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 0 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.step-line-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-500);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ GLASS CARD ═══ */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--card-shadow);
    padding: 40px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient shimmer on card */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: cardShimmer 6s ease-in-out infinite;
    pointer-events: none;
}

.card-entrance {
    animation: cardSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ STEP PANELS ═══ */
.step-panel {
    display: none;
    width: 100%;
}

.step-panel.active {
    display: block;
}

/* ── Step header ── */
.step-header {
    text-align: center;
    margin-bottom: 32px;
}

.step-emoji {
    font-size: 48px;
    margin-bottom: 12px;
    animation: emojiFloat 3s ease-in-out infinite;
}

.step-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--neutral-700);
    margin-bottom: 8px;
    animation: titleReveal 0.6s ease-out;
}

.step-subtitle {
    color: var(--neutral-500);
    font-size: 15px;
    line-height: 1.5;
    animation: fadeInUp 0.6s 0.2s ease-out both;
}

/* ═══ SUBDOMAIN INPUT ═══ */
.subdomain-input-wrapper {
    margin-bottom: 24px;
}

.subdomain-field {
    display: flex;
    align-items: center;
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.subdomain-field:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.15);
    transform: translateY(-1px);
}

.subdomain-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 18px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    color: var(--blue-900);
    outline: none;
}

.subdomain-field input::placeholder {
    color: #CBD5E0;
}

.subdomain-suffix {
    padding: 16px 18px;
    background: #EBF4FF;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    color: var(--blue-600);
    border-left: 2px solid #E2E8F0;
    white-space: nowrap;
}

.subdomain-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 14px;
    background: #EBF8FF;
    border-radius: var(--radius-xs);
    font-size: 13px;
    color: var(--blue-700);
}

.preview-icon {
    font-size: 16px;
}

.field-feedback {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
    transition: all 0.3s;
}

.field-feedback.error {
    color: var(--red-500);
}

.field-feedback.success {
    color: var(--green-500);
}

.field-feedback.checking {
    color: var(--neutral-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(38, 55, 101, 0.15);
    border-top-color: var(--accent-500);
    border-radius: 50%;
    animation: fieldSpin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes fieldSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══ FORM GRID ═══ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-600);
    margin-bottom: 6px;
}

.required {
    color: var(--red-500);
}

.optional {
    color: var(--neutral-400);
    font-weight: 400;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--neutral-800);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
    background: #F7FAFC;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-500);
    box-shadow: 0 0 0 4px rgba(255, 200, 69, 0.2);
    background: #fff;
    transform: translateY(-1px);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--red-500);
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.1);
}

.form-group input.valid,
.form-group select.valid {
    border-color: var(--green-500);
}

/* ═══ BUTTONS ═══ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--neutral-650), var(--neutral-700));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(38, 55, 101, 0.3);
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 55, 101, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary.btn-success {
    background: linear-gradient(135deg, var(--green-500), #2F855A);
    box-shadow: 0 4px 14px rgba(72, 187, 120, 0.3);
}

.btn-primary.btn-success:hover {
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

/* Button shine sweep */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: btnShine 3s ease-in-out infinite;
    pointer-events: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    color: var(--blue-700);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #EBF8FF;
    border-color: var(--blue-400);
    transform: translateY(-1px);
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-row .btn-primary {
    flex: 1;
}

.btn-row .btn-secondary {
    flex: 0 0 auto;
}

/* ═══════════════════════════════════════════════════════
   WAITING SCREEN — ENHANCED
   ═══════════════════════════════════════════════════════ */
.waiting-panel {
    position: fixed !important;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.waiting-panel.active {
    display: flex !important;
}

.waiting-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 20px;
    width: 100%;
    max-width: 500px;
}

/* Boat wrapper (constrains movement) */
.boat-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
    height: 200px;
}

.boat-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 180px;
    animation: boatRock 3s ease-in-out infinite;
    transition: margin-left 0.5s ease-out;
}

.boat {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.boat-flag {
    position: absolute;
    top: -10px;
    left: 38px;
    font-size: 18px;
    animation: flagWave 2s ease-in-out infinite;
}

.boat-mast {
    position: absolute;
    bottom: 50px;
    left: 48px;
    width: 4px;
    height: 130px;
    background: linear-gradient(to top, var(--brown-600), #A0522D);
    border-radius: 2px;
}

.boat-sail {
    position: absolute;
    bottom: 62px;
    left: 48px;
    width: 80px;
    height: 120px;
    animation: sailBillow 4s ease-in-out infinite;
    transform-origin: left center;
}

.boat-hull {
    position: relative;
    width: 160px;
    height: 50px;
}

.boat-reflection {
    position: absolute;
    bottom: -12px;
    left: 20px;
    width: 120px;
    height: 10px;
    background: radial-gradient(ellipse, rgba(192, 86, 33, 0.15) 0%, transparent 70%);
    animation: reflectionPulse 2s ease-in-out infinite;
}

/* Wake trail */
.wake-trail {
    position: absolute;
    bottom: 12px;
    left: -60px;
    width: 100px;
    height: 20px;
}

.wake-line {
    position: absolute;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    animation: wakeExpand 2s ease-out infinite;
}

.w1 {
    bottom: 4px;
    width: 40px;
    animation-delay: 0s;
}

.w2 {
    bottom: 9px;
    width: 30px;
    animation-delay: 0.3s;
    opacity: 0.6;
}

.w3 {
    bottom: 14px;
    width: 20px;
    animation-delay: 0.6s;
    opacity: 0.3;
}

.water-splash {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    animation: splashPulse 2s ease-in-out infinite;
}

/* Helm */
.helm-container {
    width: 80px;
    height: 80px;
    animation: helmSpin 8s linear infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.helm-svg {
    width: 100%;
    height: 100%;
}

/* Waiting info */
.waiting-info {
    text-align: center;
    width: 100%;
    max-width: 420px;
}

.waiting-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.waiting-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    margin-bottom: 28px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    min-height: 44px;
    transition: opacity 0.5s;
}

/* Progress bar — enhanced */
.progress-container {
    width: 100%;
    margin-bottom: 18px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal-400), var(--blue-400), var(--orange-400));
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.5s ease-out;
    position: relative;
    animation: progressGradient 3s ease-in-out infinite;
}

.progress-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: shimmerSlide 1.5s ease-in-out infinite;
    border-radius: 12px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.progress-percent {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: #fff;
}

.progress-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.status-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-400);
    animation: statusPulse 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════
   SUCCESS SCREEN
   ═══════════════════════════════════════════════════════ */
.success-card {
    text-align: center;
}

.success-animation {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.success-circle {
    animation: successPop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-ring {
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: drawRing 0.8s 0.2s ease-out forwards;
}

.success-check {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawCheck 0.5s 0.6s ease-out forwards;
}

/* Success sparkles */
.success-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sparkle {
    position: absolute;
    font-size: 14px;
    color: var(--orange-400);
    opacity: 0;
    animation: sparkleAnim 1.5s ease-out forwards;
}

.s1 {
    animation-delay: 0.4s;
    --sx: -40px;
    --sy: -30px;
}

.s2 {
    animation-delay: 0.5s;
    --sx: 40px;
    --sy: -25px;
}

.s3 {
    animation-delay: 0.6s;
    --sx: -30px;
    --sy: 35px;
}

.s4 {
    animation-delay: 0.7s;
    --sx: 35px;
    --sy: 30px;
}

.s5 {
    animation-delay: 0.55s;
    --sx: -50px;
    --sy: 5px;
    color: var(--teal-400);
}

.s6 {
    animation-delay: 0.65s;
    --sx: 50px;
    --sy: -5px;
    color: var(--blue-400);
}

.success-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--blue-900);
    margin-bottom: 8px;
}

.success-subtitle {
    color: #718096;
    font-size: 15px;
    margin-bottom: 28px;
}

/* Credentials */
.credentials-card {
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 8px;
    text-align: left;
}

.credentials-header {
    text-align: center;
    margin-bottom: 16px;
}

.credentials-icon {
    font-size: 28px;
}

.credentials-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--blue-900);
    margin-top: 4px;
}

.credentials-warning {
    font-size: 12px;
    color: var(--orange-500);
    font-weight: 500;
    margin-top: 4px;
}

.credential-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #E2E8F0;
}

.credential-row:last-child {
    border-bottom: none;
}

.credential-row label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    width: 120px;
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.credential-value span {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--blue-900);
    word-break: break-all;
}

.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-copy:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* ═══ ERROR ═══ */
.error-card {
    text-align: center;
}

.error-icon-wrap {
    margin-bottom: 16px;
}

.error-icon {
    font-size: 56px;
    animation: errorShake 0.5s ease-in-out;
}

.error-card h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--red-500);
}

.error-detail {
    color: #718096;
    font-size: 14px;
    margin: 12px 0 24px;
}

/* ═══ Confetti ═══ */
.confetti-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall 1.5s ease-out forwards;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
    .app-container {
        padding: 16px;
    }

    .glass-card {
        padding: 28px 22px;
    }

    .step-header h1 {
        font-size: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .subdomain-field input {
        font-size: 16px;
        padding: 14px;
    }

    .subdomain-suffix {
        font-size: 14px;
        padding: 14px 12px;
    }

    .btn-row {
        flex-direction: column-reverse;
    }

    .waiting-title {
        font-size: 20px;
    }

    .credential-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .credential-row label {
        width: auto;
    }

    .credential-value {
        justify-content: flex-start;
    }

    .lighthouse {
        display: none;
    }

    .mountains-layer {
        display: none;
    }
}