/* ===== BASE RESET & GLOBAL ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    font-family: 'Roboto', sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}
body { position: relative; }
.hidden { display: none !important; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
.header, .hero, .options-list, .sidebar, .option-card, .step-label,
.modal-content, .locker-popup, .unlocked-modal, .info-modal {
    user-select: none; -webkit-user-select: none;
}

/* ===== MODE INDICATOR ===== */
.mode-indicator {
    position: fixed; top: 50px; left: 50%; transform: translateX(-50%);
    background: rgba(250, 204, 21, 0.9); color: #000; padding: 4px 16px;
    border-radius: 20px; font-size: 11px; font-weight: 700; z-index: 999;
    letter-spacing: 1px; text-transform: uppercase;
    animation: fadeInDown 0.3s ease;
}
@keyframes fadeInDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ===== DESKTOP OVERLAY ===== */
.desktop-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95);
    z-index: 9999; align-items: center; justify-content: center; flex-direction: column;
}
.desktop-overlay-content { text-align: center; padding: 40px; }
.desktop-overlay-content .phone-icon { font-size: 64px; margin-bottom: 20px; }
.desktop-overlay-content h2 { font-size: 28px; margin-bottom: 12px; color: #facc15; }
.desktop-overlay-content p { color: #a1a1aa; max-width: 320px; line-height: 1.6; }
@media (min-width: 768px) { .desktop-overlay { display: flex; } }

/* ===== HEADER ===== */
.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; position: relative; z-index: 10;
}
.hamburger-btn {
    width: 36px; height: 36px; display: flex; flex-direction: column;
    justify-content: center; gap: 5px; padding: 6px;
    border: 1.5px solid rgba(255,255,255,0.2); border-radius: 50%;
}
.hamburger-btn span {
    display: block; height: 2px; background: #fff; border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger-btn span:nth-child(2) { width: 70%; }
.logo { font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.logo-socialed { color: #fff; }
.logo-live { color: #facc15; }

/* ===== SIDEBAR ===== */
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 90; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }
.sidebar {
    position: fixed; top: 0; left: 0; width: 280px; height: 100%;
    background: #18181b; z-index: 95; transform: translateX(-100%);
    transition: transform 0.3s ease; display: flex; flex-direction: column;
}
.sidebar.active { transform: translateX(0); }
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h3 { font-size: 18px; font-weight: 700; }
.sidebar-close { color: #a1a1aa; font-size: 20px; }
.sidebar-nav { padding: 12px 0; }
.sidebar-link {
    display: flex; align-items: center; gap: 14px; padding: 14px 20px;
    color: #d4d4d8; font-size: 15px; text-decoration: none;
    transition: background 0.2s;
}
.sidebar-link:hover, .sidebar-link.active { background: rgba(250,204,21,0.08); color: #facc15; }
.sidebar-icon { font-size: 18px; width: 24px; text-align: center; }

/* ===== HERO ===== */
.hero {
    display: flex; justify-content: center; align-items: flex-end;
    padding: 10px 20px 0; position: relative; min-height: 200px;
}
.hero-glow {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 300px; height: 200px; background: radial-gradient(ellipse, rgba(250,204,21,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-image {
    width: 340px; max-width: 90%; height: auto; position: relative; z-index: 2;
    filter: drop-shadow(0 8px 32px rgba(0,0,0,0.5));
}

/* ===== STEP SECTIONS ===== */
.step-section { padding: 16px 20px; overflow: hidden; max-width: 100%; box-sizing: border-box; }
.step-label { font-size: 14px; color: #a1a1aa; margin-bottom: 12px; font-weight: 400; }


/* ===== USERNAME INPUT ===== */
.username-input-container {
    display: flex; align-items: center; gap: 8px;
    background: #27272a; border: 1.5px solid transparent; border-radius: 12px;
    padding: 4px 6px 4px 12px; transition: border-color 0.3s;
    overflow: hidden; max-width: 100%; box-sizing: border-box;
}
.username-input-container:focus-within { border-color: #facc15; }
.username-input-container.connected { border-color: #4ade80; }
.user-icon { color: #a1a1aa; display: flex; align-items: center; flex-shrink: 0; }
.username-input {
    flex: 1; min-width: 0; background: none; border: none; outline: none; color: #fff;
    font-size: 15px; padding: 10px 2px; font-weight: 500;
    text-overflow: ellipsis;
}
.username-input::placeholder { color: #71717a; font-weight: 400; }
.connected-icon { display: flex; align-items: center; flex-shrink: 0; }
.connect-btn {
    background: rgba(250,204,21,0.15); color: #facc15; font-size: 12px;
    font-weight: 600; padding: 8px 12px; border-radius: 8px;
    transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.connect-btn:hover { background: rgba(250,204,21,0.25); }
.connect-btn.disconnect { background: rgba(239,68,68,0.15); color: #f87171; }
.connect-btn.disconnect:hover { background: rgba(239,68,68,0.25); }


/* ===== OPTIONS LIST ===== */
.options-list { display: flex; flex-direction: column; gap: 8px; }
.option-card {
    display: flex; align-items: center; gap: 14px;
    background: rgba(250,250,250,0.04); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px; padding: 14px 16px; cursor: pointer;
    transition: all 0.25s ease;
}
.option-card:hover { background: rgba(250,204,21,0.06); border-color: rgba(250,204,21,0.15); }
.option-card:active { transform: scale(0.98); }
.option-icon-wrapper {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(250,204,21,0.08); display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.option-emoji { font-size: 22px; }
.option-info { flex: 1; }
.option-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.option-desc { font-size: 12px; color: #71717a; }
.option-arrow { flex-shrink: 0; opacity: 0.6; }
.footer-space { height: 60px; }

/* ===== BOTTOM SHEET MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 50; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.bottom-sheet {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #1c1c1e; border-radius: 24px 24px 0 0;
    z-index: 55; transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh; overflow-y: auto;
}
.bottom-sheet.active { transform: translateY(0); }
.sheet-handle {
    width: 40px; height: 4px; background: #555; border-radius: 4px;
    margin: 12px auto 8px;
}
.modal-content { padding: 8px 24px 32px; }

/* ===== MODAL INNER VIEWS ===== */
.modal-camera-preview {
    width: 100%; aspect-ratio: 16/10; background: #2a2a2a; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; overflow: hidden; position: relative;
}
.camera-lens {
    width: 70px; height: 70px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2); display: flex;
    align-items: center; justify-content: center; position: relative;
}
.camera-lens::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.3); position: absolute;
    top: 12px; left: 12px;
}
.camera-lens-inner {
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, #333, #222);
    border: 2px solid rgba(255,255,255,0.1);
}
.modal-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.modal-subtitle { font-size: 14px; color: #71717a; text-align: center; margin-bottom: 20px; }
.btn-yellow {
    display: block; width: 100%; padding: 16px; background: #facc15;
    color: #000; font-size: 16px; font-weight: 700; border-radius: 14px;
    text-align: center; transition: background 0.2s; border: none; cursor: pointer;
}
.btn-yellow:hover { background: #eab308; }
.btn-yellow:active { transform: scale(0.98); }

/* Progress bar view */
.progress-section { text-align: center; padding: 20px 0; }
.progress-status { font-size: 14px; color: #facc15; margin-bottom: 16px; font-weight: 500; }
.progress-bar-track {
    width: 100%; height: 6px; background: #333; border-radius: 3px;
    overflow: hidden; margin-bottom: 16px;
}
.progress-bar-fill {
    height: 100%; background: linear-gradient(90deg, #facc15, #f59e0b);
    border-radius: 3px; width: 0%; transition: width 0.3s ease;
}
.progress-percent { font-size: 32px; font-weight: 800; color: #facc15; }

/* Verification view - kept for bottom sheet fallback */
.verification-section { text-align: center; padding: 10px 0; }
.lock-icon-container {
    width: 56px; height: 56px; margin: 0 auto 16px; display: flex;
    align-items: center; justify-content: center;
}
.lock-icon-svg { color: #facc15; }
.verification-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.verification-subtitle { font-size: 14px; color: #a1a1aa; margin-bottom: 24px; }
.captcha-box {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 8px; padding: 14px 18px;
    margin-bottom: 20px; cursor: pointer; transition: box-shadow 0.2s;
}
.captcha-box:hover { box-shadow: 0 0 0 2px rgba(250,204,21,0.4); }
.captcha-checkbox {
    width: 24px; height: 24px; border: 2px solid #c4c4c4; border-radius: 4px;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.captcha-checkbox.checked { background: #4ade80; border-color: #4ade80; }
.captcha-label { color: #333; font-size: 14px; flex: 1; text-align: left; }
.captcha-logo { display: flex; flex-direction: column; align-items: center; }
.captcha-logo-icon { font-size: 24px; }
.captcha-logo-text { font-size: 8px; color: #666; }
.captcha-spinner-anim {
    width: 20px; height: 20px; border: 2.5px solid #ddd;
    border-top-color: #4285f4; border-radius: 50%;
    animation: lockerSpin 0.7s linear infinite;
}
.verification-notice {
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
    background: rgba(250,204,21,0.06); border: 1px solid rgba(250,204,21,0.12);
    border-radius: 12px; padding: 14px;
}
.notice-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notice-text { font-size: 12px; color: #a1a1aa; line-height: 1.5; }

/* ===== CPA LOCKER OVERLAY ===== */
.locker-overlay {
    position: fixed; inset: 0; z-index: 150;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px;
    animation: lockerFadeIn 0.3s ease;
}
@keyframes lockerFadeIn { from { opacity: 0; } to { opacity: 1; } }

.locker-popup-wrapper {
    width: 100%; max-width: 380px;
    display: flex; flex-direction: column; gap: 16px;
    animation: lockerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lockerSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Popup card */
.locker-popup {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.locker-popup-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff; padding: 12px 18px; font-size: 15px; font-weight: 700;
}
.locker-popup-body {
    padding: 16px 18px 18px;
}
.locker-popup-desc {
    color: #333; font-size: 13px; line-height: 1.5; margin-bottom: 14px; text-align: center;
}

/* Offer list inside popup */
.locker-offer-list {
    display: flex; flex-direction: column; gap: 8px;
}
.locker-offer-card {
    display: flex; align-items: center; gap: 12px;
    background: #f8f9fa; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 10px 12px; cursor: pointer; transition: all 0.2s;
    text-decoration: none; color: inherit;
}
.locker-offer-card:hover { background: #eef2ff; border-color: #93a3f8; }
.locker-offer-card:active { transform: scale(0.98); }
.locker-offer-img {
    width: 48px; height: 48px; border-radius: 6px; object-fit: cover;
    flex-shrink: 0; background: #e5e7eb;
}
.locker-offer-info { flex: 1; min-width: 0; }
.locker-offer-name {
    font-size: 13px; font-weight: 700; color: #1a1a1a;
    margin-bottom: 2px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.locker-offer-desc {
    font-size: 11px; color: #666; line-height: 1.3; margin-bottom: 3px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.locker-offer-stars {
    color: #f59e0b; font-size: 12px; letter-spacing: 1px;
}

/* Loading state */
.locker-loading {
    text-align: center; padding: 30px 0; color: #888;
}
.locker-spinner {
    width: 28px; height: 28px; border: 3px solid #e5e7eb;
    border-top-color: #2563eb; border-radius: 50%;
    animation: lockerSpin 0.8s linear infinite;
    margin: 0 auto 10px;
}
@keyframes lockerSpin { to { transform: rotate(360deg); } }

/* Verification text below popup */
.locker-verify-text {
    text-align: center; font-size: 13px; color: #a1a1aa;
}

/* reCAPTCHA box */
.locker-captcha-box {
    display: flex; align-items: center; justify-content: space-between;
    background: #f9f9f9; border: 1px solid #d3d3d3; border-radius: 4px;
    padding: 14px 16px; box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.locker-captcha-left {
    display: flex; align-items: center; gap: 12px;
}
.locker-captcha-checkbox {
    width: 26px; height: 26px; border: 2px solid #c1c1c1; border-radius: 3px;
    background: #fff; cursor: pointer; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
    transition: all 0.2s;
}
.locker-captcha-checkbox.checked {
    background: #4285f4; border-color: #4285f4;
}
.locker-captcha-spinner {
    width: 20px; height: 20px; border: 2.5px solid #c1c1c1;
    border-top-color: #4285f4; border-radius: 50%;
    animation: lockerSpin 0.7s linear infinite;
}
.locker-captcha-label {
    font-size: 14px; color: #333; font-weight: 400;
    user-select: none;
}
.locker-captcha-right {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.recaptcha-logo { opacity: 0.7; }
.recaptcha-text { display: flex; flex-direction: column; align-items: center; }
.recaptcha-brand { font-size: 10px; color: #555; font-weight: 500; }
.recaptcha-links { font-size: 8px; color: #888; }


/* ===== VIDEO MODAL (Fullscreen Camera Feed) ===== */
.video-modal {
    position: fixed; inset: 0; background: #000; z-index: 200;
    display: flex; align-items: center; justify-content: center;
}
.live-video {
    width: 100%; height: 100%; object-fit: cover;
}
.live-video::-webkit-media-controls,
.live-video::-webkit-media-controls-enclosure,
.live-video::-webkit-media-controls-panel,
.live-video::-webkit-media-controls-overlay-play-button,
.live-video::-webkit-media-controls-fullscreen-button,
.live-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0;
    pointer-events: none;
}

.video-close-btn {
    position: absolute; top: 16px; right: 16px; z-index: 210;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
    pointer-events: none;
}
.video-close-btn.visible {
    opacity: 1; pointer-events: auto;
}


/* ===== UNLOCKED MODAL ===== */
.unlocked-modal {
    position: fixed; inset: 0; z-index: 180;
    display: flex; flex-direction: column; justify-content: flex-end;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
}
.unlocked-content {
    background: linear-gradient(180deg, #1c1c1e 0%, #111 100%);
    border-radius: 24px 24px 0 0; padding: 40px 24px 48px; text-align: center;
}
.unlock-icon-large { font-size: 48px; margin-bottom: 16px; }
.unlock-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.unlock-subtitle { font-size: 14px; color: #a1a1aa; margin-bottom: 28px; }
.open-feed-btn { max-width: 320px; margin: 0 auto; }

/* ===== INFO MODALS (FAQ, Privacy, Terms) ===== */
.info-modal {
    position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.85);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 16px; overflow-y: auto;
}
.info-modal-content {
    background: #1c1c1e; border-radius: 16px; width: 100%; max-width: 480px;
    max-height: 80vh; overflow-y: auto; padding: 24px;
}
.info-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.info-modal-header h2 { font-size: 20px; font-weight: 700; }
.modal-close-btn { flex-shrink: 0; }
.info-modal-body h4 { font-size: 15px; font-weight: 700; margin: 18px 0 8px; color: #facc15; }
.info-modal-body p { font-size: 13px; color: #a1a1aa; line-height: 1.6; }
.info-modal-body ul { padding-left: 20px; margin: 8px 0; }
.info-modal-body li { font-size: 13px; color: #a1a1aa; margin: 4px 0; list-style: disc; }
.info-date { font-size: 12px; color: #facc15; opacity: 0.7; }
.faq-item { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.faq-item:last-child { border-bottom: none; }
.faq-item h4 { margin-top: 0; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-shimmer {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
