:root {
    --primary: #103154;      /* Deep Sapphire */
    --primary-light: #f0f7ff;
    --secondary: #065f46;    /* Deep Emerald */
    --secondary-light: #ecfdf5;
    --accent: #b45309;       /* Deep Amber */
    --accent-light: #fffbeb;
    --bg-main: #f8fafc;
    --text-main: #0f172a;    /* Slate 900 */
    --text-muted: #475569;   /* Slate 600 */
    --border: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.7);
    --radius-lg: 32px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --shadow-premium: 0 30px 60px -12px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
body { 
    font-family: 'Nunito', sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    min-height: 100vh;
}
.unbounded { font-family: 'Unbounded', sans-serif; }

/* Background */
.bg-decoration {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 10%, #e0f2fe 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, #fef3c7 0%, transparent 40%);
    opacity: 0.8;
}

.app-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px; /* Reduced for mobile-first */
}

@media (min-width: 600px) {
    .app-container { padding: 40px 20px; }
}

/* TOP NAV */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 10px 0;
}
.mini-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mini-logo img { width: 36px; height: 36px; border-radius: 8px; }
.mini-logo span { font-size: 16px; font-weight: 700; color: var(--primary); white-space: nowrap; }

.lang-switcher {
    display: flex;
    background: white;
    padding: 4px;
    border-radius: 40px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border);
}
.lang-btn {
    padding: 6px 16px;
    border-radius: 30px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}
.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* NAVIGATION HUB (Progress + Backpack) */
.navigation-hub {
    display: flex;
    align-items: center;
    padding: 16px 20px; /* Slimmer */
    gap: 16px;
    margin-bottom: 24px; /* Increased from 16px */
}
.progress-section { flex: 1; }
.progress-meta {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    font-size: 11px; /* Smaller */
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.progress-track { height: 6px; background: #e2e8f0; border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #3b82f6); width: 0%; border-radius: 20px; }

.backpack-mini {
    width: 48px; /* Slimmer */
    height: 48px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.backpack-mini:active { transform: scale(0.9); }
.backpack-icon { font-size: 28px; }
.backpack-count {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--primary);
    color: white;
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid white;
}

/* CARDS */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.survey-card { 
    padding: 24px; /* Default for mobile */
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    transition: background 0.3s ease;
    min-height: 400px;
}

@media (min-width: 600px) {
    .survey-card { padding: 60px; }
}

.step-slide { display: none; }
.step-slide.active { display: block; }

.step-header { margin-bottom: 48px; }

.step-tag {
    background: var(--primary-light); color: var(--primary);
    padding: 4px 12px; font-size: 11px; font-weight: 800; border-radius: 20px;
}
.step-header h2 { font-family: 'Unbounded', sans-serif; font-size: 1.6rem; margin-top: 12px; color: #0f172a; }

/* MULTI-CHILD INPUTS */
.count-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    width: fit-content;
    padding: 6px;
    border-radius: 40px;
    border: 1.5px solid var(--border);
}
.count-btn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: var(--primary-light); color: var(--primary);
    font-size: 20px; font-weight: 700; cursor: pointer;
}
.count-selector input {
    width: 40px; text-align: center; border: none; font-size: 18px; font-weight: 700;
    outline: none; -moz-appearance: textfield;
}
.count-selector input::-webkit-inner-spin-button { -webkit-appearance: none; }

.child-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    animation: slideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.child-card-header { 
    font-size: 16px; 
    font-weight: 800; 
    color: var(--primary); 
    margin-bottom: 24px; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.child-card-header .ru { font-size: 11px; opacity: 0.6; font-weight: 400; }

.q-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.input-group { margin-bottom: 32px; }
.input-group label { display: block; margin-bottom: 12px; font-weight: 700; font-size: 14px; color: var(--text-main); }
.input-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .input-row-grid { grid-template-columns: 1fr; } }

.q-sub {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 12px;
}

.q-group { margin-bottom: 32px; }
.q-group:last-child { margin-bottom: 0; }

/* REUSABLE INPUTS */
.modern-input {
    width: 100%; background: white; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 18px 24px; font-size: 16px; outline: none; transition: 0.2s;
    font-family: inherit;
}
.modern-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

textarea.modern-input {
    resize: none;
    min-height: 100px;
}

.pill-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.pill-grid.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pill-opt {
    background: white; border: 1px solid var(--border); border-radius: 40px;
    padding: 14px 28px; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
}
.pill-opt i { display: inline-flex; }
.pill-opt.selected { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 5px 15px rgba(26, 74, 124, 0.3); }

/* BUTTONS */
/* BUTTONS */
.card-nav { 
    margin-top: auto; 
    padding-top: 32px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 20px;
}

@media (max-width: 600px) {
    .card-nav {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: white;
        padding: 16px 20px 32px;
        box-shadow: 0 -20px 40px rgba(15, 23, 42, 0.12); /* Stronger premium shadow */
        z-index: 1000;
        border-top: 1px solid var(--border);
    }
    body { padding-bottom: 120px; } /* Space for bottom nav */
}

.btn { 
    padding: 14px 28px; 
    border-radius: var(--radius-sm); 
    font-weight: 800; 
    font-size: 16px; 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1); 
    border: none; 
    outline: none; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.btn:active { transform: scale(0.96); opacity: 0.9; }
.btn-primary { 
    background: var(--primary); 
    color: white; 
    border: none;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover { 
    background: #0f365d; 
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(26, 74, 124, 0.3);
}

/* SHIMMER EFFECT */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg, 
        transparent 45%, 
        rgba(255,255,255,0.1) 50%, 
        transparent 55%
    );
    transform: rotate(-45deg);
    transition: 0.6s;
    pointer-events: none;
}
.btn-primary:hover::after {
    left: 100%;
    top: 100%;
}
.btn-secondary { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }

/* FLYING PORTAL */
.flying-item { position: fixed; z-index: 2000; font-size: 32px; pointer-events: none; }

/* RESULTS */
.camp-result-card {
    background: white; padding: 24px; border-radius: var(--radius-md); margin-bottom: 20px;
    border: 1px solid var(--border);
    display: flex; gap: 24px; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; /* Anchor for badges */
}
.camp-result-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.camp-result-card.selected { border: 3px solid var(--primary); background: #f0f7ff; transform: scale(1.02); }
.camp-result-card.selected::after {
    content: '✓'; position: absolute; top: -12px; right: -12px;
    width: 28px; height: 28px; background: var(--primary); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; border: 3px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.match-badge {
    position: absolute; top: -12px; right: 24px;
    background: var(--secondary-light); color: var(--secondary);
    font-size: 11px; font-weight: 800; padding: 6px 14px; border-radius: 20px;
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.15);
    border: 1.5px solid white;
}

.results-list {
    margin-top: 48px; /* Added significant gap as requested */
}

@media (max-width: 600px) {
    .navigation-hub { flex-direction: row; gap: 16px; }
    .survey-card { padding: 32px 24px 120px; } /* More space at top and bottom */
    .pill-grid.grid-2 { grid-template-columns: 1fr; }
    .camp-result-card { flex-direction: column; gap: 12px; }
    
    .card-nav { 
        padding: 12px 16px 24px; /* More compact padding */
        gap: 12px;
    }
    .card-nav .btn { 
        padding: 10px 16px; 
        font-size: 14px; 
        flex: 1; /* Stretch buttons */
        display: flex; 
        align-items: center; 
        justify-content: center;
        white-space: nowrap;
    }
    .step-indicator { 
        font-size: 12px;
        min-width: 45px;
        text-align: center;
    }

    .final-actions { gap: 20px; }
    .final-actions .btn { 
        min-width: 200px; 
        width: 100%;
        max-width: 320px;
        padding: 10px 20px;
        font-size: 13px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* MODAL / WARNING */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none; /* Controlled by JS */
    align-items: center; justify-content: center;
    padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal-box {
    max-width: 500px;
    width: 100%;
    padding: 48px;
    text-align: center;
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title { font-family: 'Unbounded', sans-serif; margin-bottom: 16px; color: var(--primary); }
.modal-content { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }
.modal-footer { display: flex; gap: 16px; justify-content: center; }

/* FINAL ACTIONS SPACING */
.final-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px; /* Increased from 24px */
    margin-top: 40px;
}

.success-alert {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.results-engagement textarea.modern-input {
    margin-top: 12px;
}

.final-actions .btn {
    min-width: 240px;
    padding: 10px 32px; /* Squeezed height */
}

/* LUCIDE ICONS PREMIUM STROKE */
[data-lucide] {
    stroke-width: 2px;
}

/* REVIEW UI */
/* REVIEW UI - PREMIUM BENTO STYLE 2.0 */
.review-row { 
    background: white !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.review-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.review-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.icon-box-premium {
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
}

.status-badge { 
    background: var(--secondary-light); 
    color: var(--secondary);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(6, 95, 70, 0.1);
}

.btn-edit-round {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-edit-round:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(15deg) scale(1.15);
}

.review-data-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px; 
}

.review-item { display: flex; flex-direction: column; gap: 10px; }
.review-label { 
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    color: var(--text-muted); 
    font-weight: 800; 
}
.review-value { 
    font-size: 18px; 
    font-weight: 700; 
    color: var(--text-main) !important; 
    opacity: 1 !important;
    line-height: 1.4;
}

.review-value.big { 
    font-size: 16px; /* Reduced from 24px */
    color: var(--primary); 
    background: var(--primary-light);
    padding: 16px 24px; /* Reduced padding too */
    border-radius: var(--radius-sm);
    display: block;
    width: 100%;
    border-left: 6px solid var(--primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.child-entry { 
    background: var(--bg-main);
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.child-entry:last-child { margin-bottom: 0; }
.child-entry .review-value { color: var(--primary) !important; }

.review-tag { 
    background: white;
    color: var(--secondary); 
    font-size: 11px; 
    font-weight: 850; 
    padding: 6px 16px; 
    border-radius: 30px; 
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .review-data-grid { grid-template-columns: 1fr; gap: 24px; }
    .child-entry { flex-direction: column; align-items: flex-start; gap: 8px; }
    .review-row { padding: 24px; }
}

/* VALIDATION & SHAKE */
.invalid-field {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
    background-color: #fef2f2 !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-anim {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* RECEIPT AESTHETIC */
.receipt-card {
    background: white; border: 2px dashed var(--border); border-radius: 20px;
    padding: 32px; position: relative; overflow: visible;
}
.receipt-card::before, .receipt-card::after {
    content: ''; position: absolute; width: 40px; height: 40px;
    background: #f8fafc; border-radius: 50%; top: 50%; transform: translateY(-50%);
    border: 1px solid var(--border);
}
.receipt-card::before { left: -20px; box-shadow: inset -5px 0 10px rgba(0,0,0,0.02); }
.receipt-card::after { right: -20px; box-shadow: inset 5px 0 10px rgba(0,0,0,0.02); }

.status-badge {
    background: #f0fdf4; color: #16a34a; font-size: 10px; font-weight: 800;
    padding: 3px 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px;
    border: 1px solid #dcfce7; text-transform: uppercase; letter-spacing: 0.02em;
}
.status-badge i { width: 10px; height: 10px; stroke-width: 3px; }

/* SUCCESS SPLASH */
.success-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #103154 0%, #065f46 100%);
    z-index: 5000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px;
}

.success-icon-wrap {
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 32px;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 50px rgba(255,255,255,0.1);
}

.success-check { color: white; width: 64px; height: 64px; stroke-width: 3px; }

/* SHIMMER PREMIUM */
.shimmer-btn {
    position: relative;
    overflow: hidden;
}
.shimmer-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg, 
        transparent 45%, 
        rgba(255,255,255,0.2) 50%, 
        transparent 55%
    );
    transform: rotate(-45deg);
    animation: shimmerRow 3s infinite;
    pointer-events: none;
}
@keyframes shimmerRow {
    0% { transform: translateX(-100%) rotate(-45deg); }
    100% { transform: translateX(100%) rotate(-45deg); }
}
