:root {
    --primary-green: #22c55e;
    --primary-green-dark: #16a34a;
    --primary-green-shadow: #15803d;
    --gold: #f59e0b;
    --gold-dark: #d97706;
    --gold-shadow: #b45309;
    --red: #ef4444;
    --blue: #0284c7;
    --sky-gradient: linear-gradient(180deg, #38bdf8 0%, #7dd3fc 45%, #bbf7d0 85%, #86efac 100%);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --font-heading: 'Fredoka', system-ui, sans-serif;
    --font-body: 'Inter', 'Fredoka', system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-heading);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

input, textarea, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
}

body {
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--sky-gradient);
    background-attachment: fixed;
    position: relative;
}

/* Floating animated clouds */
.clouds-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 100px;
    filter: blur(1px);
}
.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud.c1 {
    width: 140px; height: 45px;
    top: 60px; left: -160px;
    animation: drift 28s linear infinite;
}
.cloud.c1::before { width: 50px; height: 50px; top: -22px; left: 25px; }
.cloud.c1::after { width: 40px; height: 40px; top: -16px; left: 70px; }

.cloud.c2 {
    width: 200px; height: 60px;
    top: 180px; left: -220px;
    animation: drift 38s linear infinite 12s;
}
.cloud.c2::before { width: 70px; height: 70px; top: -30px; left: 35px; }
.cloud.c2::after { width: 60px; height: 60px; top: -22px; left: 95px; }

.cloud.c3 {
    width: 170px; height: 50px;
    top: 320px; left: -190px;
    animation: drift 32s linear infinite 5s;
}
.cloud.c3::before { width: 60px; height: 60px; top: -25px; left: 30px; }
.cloud.c3::after { width: 45px; height: 45px; top: -18px; left: 80px; }

@keyframes drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 300px)); }
}

/* LIVE SOCIAL PROOF TOAST */
.live-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 2px solid #86efac;
    border-radius: 18px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 100;
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    max-width: 90vw;
}

.live-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon { font-size: 1.3rem; }
.toast-content { display: flex; flex-direction: column; }
.toast-user { font-size: 0.8rem; color: #334155; font-family: var(--font-body); }
.toast-reward { font-size: 0.88rem; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 4px; }
.toast-tier { font-size: 0.65rem; background: #fef08a; color: #854d0e; padding: 1px 5px; border-radius: 4px; font-weight: 800; }
.toast-time { font-size: 0.7rem; color: #94a3b8; margin-left: 4px; font-family: var(--font-body); }

/* TOP HEADER */
.top-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 10px 16px;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 800px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2.5px solid var(--primary-green);
    background: #fff;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.header-sub {
    font-size: 0.78rem;
    color: var(--primary-green-dark);
    font-weight: 600;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.stat-pill.online {
    background: #dcfce7;
    color: #15803d;
    border: 1.5px solid #86efac;
}

.stat-pill.stock {
    background: #e0f2fe;
    color: #0369a1;
    border: 1.5px solid #bae6fd;
}

.stat-pill .dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
}

/* STEPPER */
.steps-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 16px auto 10px;
    max-width: 650px;
    width: 100%;
    padding: 0 12px;
    z-index: 10;
}

.step-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
    padding: 8px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    white-space: nowrap;
}

.step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.step-pill.active {
    background: #ffffff;
    color: var(--primary-green-dark);
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.step-pill.active .step-circle {
    background: var(--primary-green);
    color: #ffffff;
}

.step-pill.completed {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}
.step-pill.completed .step-circle {
    background: #16a34a;
    color: #ffffff;
}

.step-arrow {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* MAIN CONTAINER */
.main-wrap {
    max-width: 680px;
    width: 100%;
    padding: 0 12px;
    margin: 8px auto 35px;
    z-index: 10;
    position: relative;
}

/* GAME PANEL */
.game-panel {
    background: #ffffff;
    border-radius: 24px;
    border: 3px solid #ffffff;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.1), 0 3px 0 rgba(0, 0, 0, 0.04);
    padding: 26px 20px;
    text-align: center;
    position: relative;
    display: none;
    width: 100%;
}

.game-panel.active {
    display: block;
}

.panel-badge-top {
    display: inline-block;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 16px;
    margin-bottom: 6px;
}

.panel-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

.panel-sub {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.4;
    font-family: var(--font-body);
}

/* INPUT WRAP */
.input-wrap {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.game-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    font-size: 1.05rem;
    font-weight: 600;
    border: 2.5px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    font-family: var(--font-body);
}

.game-input:focus {
    border-color: var(--primary-green);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

/* AVATAR BOX */
.avatar-box {
    display: none;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 2px solid #86efac;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
    text-align: left;
}

.avatar-box.show { display: flex; }

.avatar-box img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid var(--primary-green);
    background: #ffffff;
    flex-shrink: 0;
}

.avatar-info-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.avatar-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avatar-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
}

.verified-tag {
    font-size: 0.72rem;
    background: #22c55e;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.avatar-status {
    font-size: 0.8rem;
    color: #16a34a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
}

/* TRUST GRID */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.trust-item {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.trust-item i {
    font-size: 1.2rem;
    color: var(--primary-green-dark);
    flex-shrink: 0;
}

.trust-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
}

.trust-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

/* GAME THUMBNAILS */
.game-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.game-thumbnails img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

/* 3D BOUNCY BUTTONS */
.game-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.18rem;
    font-weight: 700;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    transition: all 0.15s ease;
}

.game-btn.green {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 5px 0 var(--primary-green-shadow), 0 8px 18px rgba(34, 197, 94, 0.35);
}

.game-btn.green:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 var(--primary-green-shadow);
}

.game-btn.green:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 2px 0 var(--primary-green-shadow);
}

.game-btn.gold {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    box-shadow: 0 5px 0 var(--gold-shadow), 0 8px 18px rgba(245, 158, 11, 0.4);
    color: #ffffff;
}

.game-btn.gold:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 var(--gold-shadow);
}

.game-btn:disabled {
    background: #cbd5e1;
    box-shadow: 0 4px 0 #94a3b8;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.pulse-btn {
    animation: btnGlow 2s infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 5px 0 var(--gold-shadow), 0 0 12px rgba(245, 158, 11, 0.35); }
    50% { box-shadow: 0 5px 0 var(--gold-shadow), 0 0 24px rgba(245, 158, 11, 0.65); }
}

/* STEP 2: SEARCH & FILTER SECTION */
.pet-filter-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 12px;
}

.search-wrap {
    position: relative;
    margin-bottom: 10px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 11px 38px 11px 40px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    outline: none;
    color: #0f172a;
    font-family: var(--font-body);
}

.search-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
}

.tier-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.tier-chip {
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
}

.tier-chip.active { background: #0f172a; color: #ffffff; border-color: #0f172a; }
.tier-chip.divine.active { background: #eab308; border-color: #ca8a04; color: #fff; }
.tier-chip.mythic.active { background: #ef4444; border-color: #dc2626; color: #fff; }
.tier-chip.legendary.active { background: #a855f7; border-color: #9333ea; color: #fff; }
.tier-chip.epic.active { background: #0284c7; border-color: #0369a1; color: #fff; }
.tier-chip.rare.active { background: #059669; border-color: #047857; color: #fff; }

.selection-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    margin-bottom: 10px;
    background: #eff6ff;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

.selected-counter {
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.selection-hint {
    font-size: 0.78rem;
    color: #64748b;
    font-family: var(--font-body);
}

/* PETS GRID */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 4px 12px 2px;
    margin-bottom: 18px;
}

.pets-grid::-webkit-scrollbar { width: 6px; }
.pets-grid::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 8px; }
.pets-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

.pet-card {
    background: #ffffff;
    border: 2.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.15s ease;
}

.pet-card:hover {
    border-color: #86efac;
    background: #f0fdf4;
    transform: translateY(-2px);
}

.pet-card.selected {
    border-color: var(--primary-green);
    background: #dcfce7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.pet-card-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-bottom: 4px;
}

.pet-card-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 3px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pet-card-tier {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    text-transform: uppercase;
}

.tier-Divine { background: #fef08a !important; color: #854d0e !important; }
.tier-Mythic { background: #fee2e2 !important; color: #b91c1c !important; }
.tier-Legendary { background: #f3e8ff !important; color: #7e22ce !important; }
.tier-Epic { background: #e0f2fe !important; color: #0369a1 !important; }
.tier-Rare { background: #d1fae5 !important; color: #047857 !important; }

.pet-card.selected .pet-card-tier {
    background: #22c55e !important;
    color: #ffffff !important;
}

.pet-card-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-green);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.pet-card.selected .pet-card-check {
    opacity: 1;
    transform: scale(1);
}

/* STEP 3: INJECTION STAGE */
.inject-header { margin-bottom: 16px; }

.pulse-radar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 10px;
}

.progress-container { margin-bottom: 16px; }

.progress-track {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 2px solid #cbd5e1;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
    border-radius: 20px;
    transition: width 0.35s ease;
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
}

.progress-status-text { color: #475569; font-family: var(--font-body); }
.progress-percent { color: var(--primary-green-dark); font-size: 0.95rem; }

.terminal-card {
    background: #0b0f19;
    border-radius: 18px;
    overflow: hidden;
    border: 2.5px solid #1e293b;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.terminal-top-bar {
    background: #1e293b;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.term-dots { display: flex; gap: 5px; }
.term-dot { width: 9px; height: 9px; border-radius: 50%; }
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #10b981; }

.term-title {
    color: #94a3b8;
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.terminal {
    background: #0b0f19;
    padding: 14px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: #e2e8f0;
    text-align: left;
    height: 180px;
    overflow-y: auto;
}

.terminal-log { margin-bottom: 5px; line-height: 1.35; }
.log-info { color: #38bdf8; }
.log-success { color: #4ade80; font-weight: bold; }
.log-warn { color: #facc15; }
.log-error { color: #f87171; font-weight: bold; }

/* SUMMARY & VERIFICATION GATE (PHASE 2) */
.success-check-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid #86efac;
}

.reserved-summary-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px 10px;
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}

.reserved-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 100% PERFECT RESPONSIVE GRID FOR 3 PET SLOTS */
.reserved-pets-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

.summary-pet-item {
    background: #ffffff;
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 8px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.summary-pet-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 3px;
    flex-shrink: 0;
}

.summary-pet-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
}

.summary-pet-status {
    font-size: 0.62rem;
    font-weight: 800;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 4px;
    border-radius: 6px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* SECURITY CARD */
.security-card {
    background: #fffbeb;
    border: 2px solid #fde68a;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 18px;
    text-align: left;
}

.security-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.sec-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fef3c7;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sec-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #92400e;
    line-height: 1.2;
}

.sec-subtitle {
    font-size: 0.74rem;
    color: #b45309;
    font-family: var(--font-body);
}

.sec-desc {
    font-size: 0.84rem;
    color: #78350f;
    line-height: 1.4;
    margin-bottom: 10px;
    font-family: var(--font-body);
}

.sec-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #92400e;
}

/* HIGH-CONVERTING VERIFICATION MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    padding: 22px 16px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 3px solid #ffffff;
    max-height: 92vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-header {
    text-align: center;
    margin-bottom: 12px;
}

.modal-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 8px;
    border: 2px solid #fca5a5;
}

.modal-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.modal-subtitle {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.35;
    font-family: var(--font-body);
}

.countdown-bar {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
    border-radius: 12px;
    padding: 7px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
}

.modal-steps-guide {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #334155;
    font-family: var(--font-body);
    line-height: 1.35;
}

.guide-step .num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-green);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.offers-section-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* OFFERS LIST - CLEAN ACTIONABLE FORMAT */
.offers-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.offer-item {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.offer-item:hover {
    border-color: var(--primary-green);
    background: #f0fdf4;
}

.offer-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.offer-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border: 1.5px solid #86efac;
    flex-shrink: 0;
    margin-top: 2px;
    overflow: hidden;
}

.offer-icon-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.offer-text-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.offer-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}

.offer-instruction {
    font-size: 0.78rem;
    color: #334155;
    font-family: var(--font-body);
    line-height: 1.35;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
}

.offer-instruction strong {
    color: #16a34a;
}

.offer-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-left: 8px;
}

.offer-item:hover .offer-action-btn {
    background: var(--primary-green);
    color: #ffffff;
}

.verifying-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #64748b;
    font-family: var(--font-body);
}

.spinner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: spinnerPulse 1.2s infinite;
}

@keyframes spinnerPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* FOOTER */
.site-footer {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: auto;
    padding: 14px 16px 20px;
    font-weight: 600;
}

.footer-links { margin-bottom: 4px; }
.footer-copy { font-size: 0.72rem; color: rgba(255, 255, 255, 0.75); font-family: var(--font-body); }

/* MOBILE RESPONSIVE OVERRIDES */
@media (max-width: 480px) {
    .header-inner { padding: 0 4px; }
    .header-title { font-size: 1.12rem; }
    .header-logo img { width: 38px; height: 38px; }
    .header-stats .stock { display: none; }
    .stat-pill { padding: 4px 8px; font-size: 0.72rem; }
    .step-pill { font-size: 0.76rem; padding: 6px 6px; gap: 4px; }
    .step-circle { width: 18px; height: 18px; font-size: 0.65rem; }
    .panel-title { font-size: 1.35rem; }
    .game-panel { padding: 20px 14px; border-radius: 20px; }
    .pets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 300px; }
    .trust-grid { grid-template-columns: 1fr; gap: 6px; }
    .reserved-pets-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .summary-pet-item { padding: 6px 2px; }
    .summary-pet-item img { width: 38px; height: 38px; }
    .summary-pet-name { font-size: 0.72rem; }
    .summary-pet-status { font-size: 0.58rem; }
    .live-toast { bottom: 10px; left: 10px; right: 10px; }
    .modal-card { padding: 18px 12px; border-radius: 20px; }
    .offer-name { font-size: 0.88rem; }
    .offer-instruction { font-size: 0.74rem; }
}
