/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overscroll-behavior: none; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior: none; background: #fafafa; color: #1a1a2e; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
img { max-width: 100%; display: block; }

/* ===== Color System ===== */
:root {
  --primary: #81007f; --primary-light: #a82da6; --primary-lighter: #f3e0f3; --primary-dark: #5e005d;
  --primary-gradient: linear-gradient(135deg, #81007f 0%, #a82da6 50%, #c74ec5 100%);
  --primary-gradient-soft: linear-gradient(135deg, #f8f0f8 0%, #f3e0f3 100%);
  --bg: #fafafa; --bg-card: #ffffff; --bg-elevated: #ffffff;
  --fg: #1a1a2e; --fg-secondary: #6b7280; --fg-tertiary: #9ca3af; --fg-inverse: #ffffff;
  --border: #e5e7eb; --border-light: #f3f4f6;
  --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12); --shadow-primary: 0 4px 20px rgba(129,0,127,0.25);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 9999px;
}

/* ===== Page system ===== */
.page { display: none; } .page:first-child { display: block; }
#app { min-height: 100dvh; max-width: 100vw; overflow-x: hidden; background-color: var(--bg); color: var(--fg); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.5rem; border-radius: var(--radius-full); font-weight: 600; font-size: 1rem; transition: all 0.2s ease; letter-spacing: -0.01em; }
.btn-primary { background: var(--primary-gradient); color: var(--fg-inverse); box-shadow: var(--shadow-primary); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(129,0,127,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--fg); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: var(--primary-lighter); color: var(--primary); font-size: 0.85rem; padding: 0.5rem 1rem; }

/* ===== Animations ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes radarPulse { 0% { transform: scale(0.3); opacity: 0.8; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes ticker { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
@keyframes floatAvatar { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(4px, -6px) scale(1.03); } 50% { transform: translate(-3px, -10px) scale(1); } 75% { transform: translate(5px, -4px) scale(0.98); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes connectorMove { 0% { left: -20px; } 100% { left: 100%; } }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(400px) rotate(720deg); opacity: 0; } }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ===== LOGIN PAGE ===== */
.login-page { min-height: 100dvh; display: flex; flex-direction: column; }
.map-section { position: relative; height: 42vh; min-height: 260px; overflow: hidden; background: linear-gradient(180deg, #f8f0f8 0%, #f3e0f3 40%, #fff 100%); }
.map-bg { position: absolute; inset: 0; }
.map-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(129,0,127,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(129,0,127,0.04) 1px, transparent 1px); background-size: 40px 40px; }
.map-glow { position: absolute; top: 50%; left: 50%; width: 250px; height: 250px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(129,0,127,0.12) 0%, transparent 70%); border-radius: 50%; animation: pulse 4s ease-in-out infinite; }
.floating-avatars { position: absolute; inset: 0; }
.avatar-bubble { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: floatAvatar 4s ease-in-out infinite; z-index: 2; }
.avatar-img { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; border: 2.5px solid #fff; box-shadow: 0 2px 10px rgba(129,0,127,0.15); position: relative; z-index: 2; overflow: hidden; }
.avatar-pulse { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin-top: -22px; margin-left: -22px; border-radius: 50%; border: 1.5px solid rgba(129,0,127,0.2); animation: radarPulse 3s ease-out infinite; z-index: 1; }
.avatar-name { font-size: 0.6rem; font-weight: 600; color: var(--fg-secondary); background: rgba(255,255,255,0.85); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.match-lines { position: absolute; inset: 0; z-index: 1; } .match-svg { width: 100%; height: 100%; }
.match-ticker { position: absolute; top: 12px; right: 12px; width: 200px; height: 110px; overflow: hidden; z-index: 10; mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%); }
.ticker-track { animation: ticker 20s linear infinite; }
.ticker-item { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 4px 0; }
.ticker-pair { display: flex; align-items: center; gap: 4px; }
.ticker-avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.1); overflow: hidden; }
.ticker-heart { flex-shrink: 0; }
.ticker-text { font-size: 0.6rem; color: var(--fg-secondary); background: rgba(255,255,255,0.9); padding: 1px 8px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.ticker-text strong { color: var(--primary); }
.online-badge { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.92); padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; color: var(--fg); box-shadow: var(--shadow-md); z-index: 10; }
.online-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }

/* ===== Language Switcher ===== */
.lang-switcher { position: absolute; top: 12px; right: 12px; z-index: 10; }
.lang-trigger { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.92); font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; box-shadow: var(--shadow-sm); }
.lang-trigger:hover { border-color: var(--primary); box-shadow: 0 0 12px rgba(129,0,127,0.15); transform: scale(1.08); }
.lang-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px; background: rgba(255,255,255,0.98); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px; box-shadow: var(--shadow-lg); z-index: 100; animation: langDropAppear 0.2s ease; }
@keyframes langDropAppear { from { opacity: 0; transform: translateY(-6px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.lang-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0.55rem 0.75rem; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--fg-secondary); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.lang-option:hover { background: var(--primary-lighter); color: var(--fg); }
.lang-option.active { background: var(--primary-lighter); color: var(--primary); }
.lang-flag { font-size: 1.15rem; }
.lang-name { flex: 1; text-align: left; }
.lang-check { font-size: 0.8rem; color: var(--primary); font-weight: 700; }

.login-section { flex: 1; padding: 0 1.25rem 2rem; margin-top: -32px; position: relative; z-index: 20; }
.login-card { background: var(--bg-card); border-radius: var(--radius-xl); padding: 1.75rem 1.5rem 1.5rem; box-shadow: var(--shadow-lg); animation: slideUp 0.5s ease; }
.login-title { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.25rem; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-subtitle { font-size: 0.9rem; color: var(--fg-secondary); margin-bottom: 1.25rem; }
.gender-selector { display: flex; gap: 0.75rem; margin-bottom: 0.6rem; }
.gender-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radius-md); border: 2px solid var(--border); background: #f9fafb; font-size: 0.95rem; font-weight: 600; color: var(--fg-secondary); transition: all 0.2s; }
.gender-btn:hover { border-color: var(--primary-light); }
.gender-btn.active { border-color: var(--primary); background: var(--primary-lighter); color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(129,0,127,0.08); }
.gender-icon { font-size: 1.3rem; }
.gender-hint { font-size: 0.72rem; color: var(--fg-tertiary); text-align: center; margin-bottom: 1.25rem; }
.gender-hint strong { color: var(--primary); }
.phone-input-group { display: flex; align-items: center; background: #f9fafb; border: 1.5px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 1rem; transition: border-color 0.2s; }
.phone-input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(129,0,127,0.08); }
.country-code { display: flex; align-items: center; gap: 4px; padding: 0.875rem 0.75rem; border-right: 1px solid var(--border); background: #f3f4f6; cursor: pointer; flex-shrink: 0; }
.flag { font-size: 1.1rem; } .code { font-weight: 600; font-size: 0.9rem; color: var(--fg); }
.phone-input { flex: 1; padding: 0.875rem 1rem; border: none; background: transparent; font-size: 1rem; color: var(--fg); letter-spacing: 0.5px; }
.phone-input::placeholder { color: var(--fg-tertiary); }
.area-dropdown { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); max-height: 200px; overflow-y: auto; margin: -0.5rem 0 0.75rem; box-shadow: var(--shadow-lg); }
.area-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; font-size: 0.85rem; cursor: pointer; transition: background 0.15s; }
.area-item:hover { background: #f3f4f6; }
.area-item.active { background: var(--primary-lighter); color: var(--primary-dark); }
.area-name { flex: 1; font-weight: 500; } .area-code { color: var(--fg-tertiary); font-weight: 600; font-size: 0.8rem; }
.error-toast { display: flex; align-items: center; gap: 6px; padding: 0.6rem 1rem; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: var(--radius-md); font-size: 0.8rem; font-weight: 500; margin-bottom: 0.75rem; animation: fadeIn 0.2s ease; }
.btn-spinner { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.match-btn { margin-bottom: 1rem; } .match-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.terms-text { font-size: 0.72rem; color: var(--fg-tertiary); text-align: center; line-height: 1.5; }
.terms-text a { color: var(--primary); font-weight: 500; }
.how-it-works { margin-top: 1.5rem; background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); overflow: hidden; }
.how-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; background: none; font-size: 0.88rem; font-weight: 700; color: var(--fg); }
.how-toggle svg { transition: transform 0.3s; } .how-toggle svg.rotated { transform: rotate(180deg); }
.how-content { padding: 0 1.25rem 1.25rem; }
.step { display: flex; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-light); }
.step:last-child { border-bottom: none; }
.step-num { width: 28px; height: 28px; background: var(--primary-gradient); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; flex-shrink: 0; }
.step-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; }
.step-desc { font-size: 0.75rem; color: var(--fg-secondary); line-height: 1.4; }
/* Success Stories */
.success-stories { margin-top: 2rem; text-align: center; animation: fadeIn 0.6s ease 0.3s backwards; padding-bottom: 1rem; }
.stories-divider { height: 1px; background: var(--border); margin: 0 2rem 1.25rem; opacity: 0.5; }
.stories-carousel { overflow: hidden; position: relative; touch-action: pan-y; }
.story-card { display: none; flex-direction: column; align-items: center; gap: 0.75rem; animation: fadeIn 0.4s ease; }
.story-card.active { display: flex; }
.story-img { width: 100%; max-width: 320px; border-radius: 16px; object-fit: cover; aspect-ratio: 4/3; box-shadow: 0 4px 20px rgba(129,0,127,0.15); }
.story-chat { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 6px; padding: 0 0.25rem; }
.chat-bubble { padding: 8px 14px; border-radius: 16px; font-size: 0.8rem; line-height: 1.45; max-width: 88%; word-wrap: break-word; }
.chat-bubble.her { background: #f0e6f6; color: #5a2d6a; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble.him { background: var(--primary-gradient); background: linear-gradient(135deg, var(--primary), #a855f7); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.stories-dots { display: flex; justify-content: center; gap: 6px; margin-top: 0.75rem; }
.s-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all 0.3s; }
.s-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }
@media (min-width: 480px) { .login-section { max-width: 440px; margin-left: auto; margin-right: auto; } }
@media (min-height: 800px) { .map-section { height: 46vh; } }

/* ===== VERIFY PAGE ===== */
.verify-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.match-hero { position: relative; padding: 2.5rem 1.25rem 1.5rem; background: linear-gradient(180deg, #f8f0f8 0%, #f3e0f3 30%, var(--bg) 100%); display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.radar-bg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%); width: 320px; height: 320px; }
.radar-ring { position: absolute; inset: 0; border: 1.5px solid rgba(129,0,127,0.08); border-radius: 50%; animation: radarPulse 4s ease-out infinite; }
.radar-center-dot { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 12px rgba(129,0,127,0.4); }
.radar-sweep { position: absolute; top: 50%; left: 50%; width: 50%; height: 2px; transform-origin: left center; background: linear-gradient(90deg, var(--primary), transparent); animation: sweep 3s linear infinite; }
.match-pair { display: flex; align-items: center; gap: 1rem; position: relative; z-index: 2; margin-bottom: 1rem; }
.match-person { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.person-avatar { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; position: relative; overflow: hidden; }
.male-avatar { background: linear-gradient(135deg, #89f7fe, #66a6ff); border: 3px solid #fff; box-shadow: 0 4px 15px rgba(102,166,255,0.3); }
.female-avatar-self { background: linear-gradient(135deg, #ff9a9e, #fecfef); border: 3px solid #fff; box-shadow: 0 4px 15px rgba(255,154,158,0.3); }
.person-name { font-size: 0.85rem; font-weight: 700; color: var(--fg); }
.person-status { font-size: 0.65rem; font-weight: 600; padding: 1px 8px; border-radius: var(--radius-full); background: #dcfce7; color: #16a34a; }
.person-distance { display: flex; align-items: center; gap: 3px; font-size: 0.65rem; font-weight: 500; color: var(--primary); }
.match-connector { display: flex; align-items: center; justify-content: center; width: 80px; position: relative; }
.connector-line { width: 100%; height: 2px; background: linear-gradient(90deg, rgba(102,166,255,0.3), var(--primary), rgba(255,154,158,0.3)); border-radius: 1px; position: relative; overflow: hidden; }
.connector-pulse { position: absolute; top: -2px; left: -20px; width: 20px; height: 6px; background: linear-gradient(90deg, transparent, var(--primary), transparent); border-radius: 3px; animation: connectorMove 2s ease-in-out infinite; }
.match-heart-badge { position: absolute; width: 32px; height: 32px; background: var(--primary-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-primary); animation: pulse 2s ease-in-out infinite; }
.match-status-area { position: relative; z-index: 2; margin-bottom: 0.75rem; }
.status-text { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--fg-secondary); }
.status-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
.status-text.polling { color: var(--primary); }
.polling-spinner { width: 16px; height: 16px; border: 2px solid var(--primary-lighter); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
.match-info-bar { display: flex; gap: 0.5rem; position: relative; z-index: 2; }
.info-tag { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.85); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.65rem; font-weight: 500; color: var(--fg-secondary); box-shadow: var(--shadow-sm); }
.tag-dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; }
.verify-section { flex: 1; padding: 0 1.25rem 2.5rem; }
.verify-card { max-width: 440px; margin: 0 auto; animation: slideUp 0.4s ease; }
.title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem; }
.verify-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.help-btn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: none; background: var(--primary-lighter); color: var(--primary); transition: all 0.2s; flex-shrink: 0; overflow: visible; }
.help-btn svg { display: block; flex-shrink: 0; }
.help-link { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.help-link-text { font-size: 0.8rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.verify-desc { font-size: 0.85rem; color: var(--fg-secondary); line-height: 1.5; margin-bottom: 1rem; }
.code-display { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.code-group { display: flex; gap: 0.25rem; }
.code-char { width: 34px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--primary-lighter); border: 1.5px solid var(--primary-light); border-radius: 8px; font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); font-family: 'Courier New', monospace; }
.code-dash { font-size: 1.2rem; font-weight: 700; color: var(--fg-tertiary); margin: 0 -2px; }
.wa-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: linear-gradient(135deg, #25d366, #128c7e) !important; box-shadow: 0 4px 14px rgba(37,211,102,0.35) !important; margin-bottom: 0.75rem; }
.copy-toast { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0.5rem 1rem; background: #dcfce7; color: #16a34a; font-size: 0.78rem; font-weight: 600; border-radius: var(--radius-md); margin-bottom: 1.25rem; opacity: 0; transform: translateY(-8px); transition: all 0.3s; pointer-events: none; }
.copy-toast.show { opacity: 1; transform: translateY(0); }
.wa-guide { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; padding: 1rem; background: #f9fafb; border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.guide-step { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.8rem; font-weight: 500; color: var(--fg-secondary); }
.guide-step .step-num { width: 24px; height: 24px; font-size: 0.7rem; font-weight: 700; margin-top: 2px; }
.step-content { display: flex; flex-direction: column; gap: 2px; } .step-content strong { color: var(--primary-dark); font-weight: 700; }
.step-hint { font-size: 0.7rem; color: var(--fg-tertiary); font-weight: 400; }
.pairing-error { display: flex; align-items: center; gap: 6px; padding: 0.6rem 1rem; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: var(--radius-md); font-size: 0.8rem; font-weight: 500; margin-top: 0.75rem; }
.retry-btn { margin-left: auto; background: none; color: var(--primary); font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.polling-area { text-align: center; }
.polling-bar { height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.polling-fill { height: 100%; background: var(--primary-gradient); border-radius: 3px; transition: width 0.5s ease; }
.polling-text { font-size: 0.75rem; color: var(--fg-tertiary); font-weight: 500; }

/* Verified panel */
.verified-panel { display: flex; flex-direction: column; align-items: center; text-align: center; animation: slideUp 0.5s ease; }
.verified-badge { width: 64px; height: 64px; background: var(--primary-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; box-shadow: 0 8px 24px rgba(129,0,127,0.3); animation: pulse 2s ease-in-out infinite; }
.verified-title { font-size: 1.4rem; font-weight: 900; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.35rem; }
.verified-desc { font-size: 0.85rem; color: var(--fg-secondary); line-height: 1.5; margin-bottom: 1.5rem; max-width: 300px; }
.verified-stats { display: flex; align-items: center; width: 100%; background: #f9fafb; border-radius: var(--radius-md); padding: 0.85rem 0; margin-bottom: 1.5rem; }
.vstat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vstat-num { font-size: 1.1rem; font-weight: 800; color: var(--fg); }
.vstat-label { font-size: 0.65rem; color: var(--fg-tertiary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.vstat-divider { width: 1px; height: 28px; background: var(--border); }
.online-dot-text { display: flex; align-items: center; gap: 5px; }
.live-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
.match-again-btn { margin-bottom: 0.6rem; }
.match-again-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== PROFILE PAGE ===== */
.profile-page { min-height: 100dvh; background: var(--bg); padding-bottom: 2rem; }
.profile-header-bg { position: relative; padding: 2rem 1.25rem 0; background: linear-gradient(180deg, #f8f0f8 0%, #f3e0f3 60%, var(--bg) 100%); }
.header-pattern { position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, rgba(129,0,127,0.06) 0%, transparent 50%), radial-gradient(circle at 80% 60%, rgba(129,0,127,0.04) 0%, transparent 50%); }
.profile-card { position: relative; background: var(--bg-card); border-radius: var(--radius-xl); padding: 1.75rem 1.5rem; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; text-align: center; animation: slideUp 0.4s ease; }
.avatar-wrapper { position: relative; margin-bottom: 0.75rem; }
.avatar { width: 76px; height: 76px; background: linear-gradient(135deg, #89f7fe, #66a6ff); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; border: 3.5px solid #fff; box-shadow: 0 4px 15px rgba(102,166,255,0.25); }
.avatar-badge { position: absolute; bottom: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; }
.avatar-badge.online { background: var(--success); }
.user-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.1rem; }
.user-id { font-size: 0.8rem; color: var(--fg-secondary); font-weight: 500; margin-bottom: 0.6rem; }
.user-meta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: var(--fg-tertiary); font-weight: 500; margin-bottom: 1.25rem; }
.meta-item { display: flex; align-items: center; gap: 3px; } .meta-divider { color: var(--border); }
.stats-row { display: flex; align-items: center; width: 100%; background: #f9fafb; border-radius: var(--radius-md); padding: 0.85rem 0; }
.stat-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-size: 1.15rem; font-weight: 800; color: var(--fg); }
.stat-label { font-size: 0.65rem; color: var(--fg-tertiary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 28px; background: var(--border); }
.matches-section { padding: 1.5rem 1.25rem 0; max-width: 480px; margin: 0 auto; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.section-title { display: flex; align-items: center; gap: 0.4rem; font-size: 1rem; font-weight: 700; }
.section-count { font-size: 0.75rem; font-weight: 600; color: var(--fg-tertiary); background: var(--border-light); padding: 2px 10px; border-radius: var(--radius-full); }
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.35rem; }
.empty-desc { font-size: 0.85rem; color: var(--fg-secondary); margin-bottom: 1.5rem; }
.match-list { display: flex; flex-direction: column; gap: 0.6rem; }
.match-item { display: flex; align-items: center; gap: 0.75rem; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 0.85rem 1rem; box-shadow: var(--shadow-sm); animation: fadeInUp 0.4s ease backwards; transition: box-shadow 0.2s, transform 0.2s; }
.match-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.match-avatar-wrap { position: relative; flex-shrink: 0; }
.match-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); overflow: hidden; }
.match-online-dot { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; background: var(--success); border-radius: 50%; border: 2px solid #fff; }
.match-info { flex: 1; min-width: 0; }
.match-name { font-size: 0.9rem; font-weight: 700; color: var(--fg); margin-bottom: 1px; }
.match-detail { display: flex; align-items: center; gap: 3px; font-size: 0.72rem; color: var(--fg-secondary); font-weight: 500; }
.match-time { font-size: 0.65rem; color: var(--fg-tertiary); margin-top: 2px; }
.chat-btn { display: flex; align-items: center; gap: 4px; flex-shrink: 0; background: var(--primary-gradient); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; transition: all 0.2s; white-space: nowrap; box-shadow: var(--shadow-primary); }
.list-footer { margin-top: 1.5rem; } .find-btn { border-radius: var(--radius-lg); }

/* ===== CHAT PAGE ===== */
.chat-page { height: 100dvh; display: flex; flex-direction: column; background: #e8ddd3; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8beb4' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); max-width: 480px; margin: 0 auto; width: 100%; }
.chat-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; background: var(--primary-gradient); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(129,0,127,0.3); }
.back-btn { background: none; color: #fff; padding: 4px; display: flex; }
.header-user { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.header-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; border: 2px solid rgba(255,255,255,0.4); flex-shrink: 0; overflow: hidden; }
.header-info { min-width: 0; }
.header-name { font-size: 0.95rem; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-status { font-size: 0.72rem; opacity: 0.85; font-weight: 400; display: flex; align-items: center; gap: 4px; }
.header-status.typing { color: #c8ffc8; font-style: italic; }
.header-actions { display: flex; gap: 0.25rem; }
.action-btn { background: none; color: #fff; padding: 6px; border-radius: 50%; display: flex; transition: background 0.2s; }
.action-btn:hover { background: rgba(255,255,255,0.15); }
.messages-area { flex: 1; overflow-y: auto; padding: 0.75rem 0.75rem 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.date-badge { text-align: center; margin: 0.5rem 0; }
.date-badge span { background: rgba(0,0,0,0.12); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 3px 12px; border-radius: 10px; }
.system-message { text-align: center; margin: 0.25rem 0 0.5rem; }
.system-message span { background: rgba(129,0,127,0.12); color: var(--primary-dark); font-size: 0.72rem; font-weight: 500; padding: 5px 14px; border-radius: 12px; display: inline-block; }
.message-row { display: flex; align-items: flex-end; gap: 6px; max-width: 85%; }
.message-row.sent { align-self: flex-end; }
.message-row.received { align-self: flex-start; }
.msg-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; box-shadow: var(--shadow-sm); overflow: hidden; }
.message-bubble { padding: 0.5rem 0.7rem; border-radius: 12px; position: relative; animation: fadeIn 0.2s ease; }
.message-bubble.sent { background: #dcf8c6; border-bottom-right-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
.message-bubble.received { background: #ffffff; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
.msg-text { font-size: 0.9rem; line-height: 1.45; color: #111; margin: 0; word-break: break-word; }
.msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 2px; }
.msg-time { font-size: 0.6rem; color: #999; }
.msg-status { display: flex; align-items: center; }
.typing-bubble { padding: 0.65rem 0.9rem; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span { width: 7px; height: 7px; background: #999; border-radius: 50%; animation: typingBounce 1.4s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
.input-bar { display: flex; align-items: flex-end; gap: 0.4rem; padding: 0.5rem 0.6rem; background: #f0ebe3; border-top: 1px solid rgba(0,0,0,0.06); position: relative; }
.attach-btn { background: none; color: var(--fg-secondary); padding: 8px; display: flex; flex-shrink: 0; border-radius: 50%; }
.input-wrapper { flex: 1; display: flex; align-items: center; background: #fff; border-radius: 22px; padding: 0 0.5rem 0 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.msg-input { flex: 1; border: none; background: transparent; padding: 0.65rem 0; font-size: 0.9rem; color: var(--fg); min-width: 0; }
.msg-input::placeholder { color: var(--fg-tertiary); }
.emoji-btn { background: none; color: var(--fg-tertiary); padding: 4px; display: flex; flex-shrink: 0; cursor: pointer; }
.emoji-picker { position: absolute; bottom: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid rgba(0,0,0,0.1); padding: 0.5rem; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 200px; overflow-y: auto; z-index: 50; }
.emoji-picker span { font-size: 1.4rem; text-align: center; padding: 4px; cursor: pointer; border-radius: 6px; transition: background 0.15s; }
.emoji-picker span:hover { background: rgba(0,0,0,0.08); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--primary); color: #fff; transition: all 0.2s; box-shadow: var(--shadow-primary); }
.send-btn.active { background: var(--primary-gradient); transform: scale(1.05); }

/* ===== DIALOGS ===== */
.dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 1.25rem; }
/* Copy Guide Modal */
.copy-guide-dialog { background: var(--bg-card); border-radius: var(--radius-xl); max-width: 400px; width: 95%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: slideUp 0.35s ease; }
.copy-guide-img { padding: 1rem 1rem 0; }
.copy-guide-img img { width: 100%; border-radius: 12px; display: block; }
.copy-guide-body { padding: 1rem 1.25rem 1.5rem; text-align: center; }
.copy-guide-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.5rem; }
.copy-guide-desc { font-size: 0.85rem; color: var(--fg-secondary); line-height: 1.5; margin-bottom: 1rem; }
.modal-pairing-code { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 1.25rem; }
.modal-code-char { width: 36px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; font-family: 'Courier New', monospace; color: var(--primary-dark); background: var(--primary-lighter); border: 1.5px solid var(--primary-light); border-radius: 8px; }
.modal-code-dash { font-size: 1.2rem; font-weight: 700; color: var(--fg-tertiary); margin: 0 2px; }
.guide-dialog { background: var(--bg-card); border-radius: var(--radius-xl); max-width: 520px; width: 95%; max-height: 90vh; overflow: hidden; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.guide-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light); }
.guide-header h3 { font-size: 1rem; font-weight: 700; }
.guide-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f3f4f6; color: var(--fg-secondary); }
.platform-tabs { display: flex; gap: 0; padding: 0 1rem; border-bottom: 1px solid var(--border-light); }
.platform-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0.7rem 0; font-size: 0.85rem; font-weight: 600; color: var(--fg-tertiary); background: none; border-bottom: 2.5px solid transparent; transition: all 0.2s; }
.platform-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.guide-carousel { overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.35s ease; }
.carousel-slide { min-width: 100%; display: flex; align-items: center; justify-content: center; padding: 0.5rem 0; }
.slide-screenshot { max-width: 90%; max-height: 60vh; object-fit: contain; display: block; margin: 0 auto; border-radius: 6px; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.9); border-radius: 50%; box-shadow: var(--shadow-md); color: var(--fg); z-index: 5; }
.carousel-arrow.left { left: 8px; } .carousel-arrow.right { right: 8px; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 0.75rem 0 1.25rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all 0.2s; }
.dot.active { background: var(--primary); width: 20px; border-radius: 4px; }
.success-dialog { background: var(--bg-card); border-radius: var(--radius-xl); max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; position: relative; }
.dialog-body { padding: 2rem 1.5rem 1.75rem; text-align: center; position: relative; z-index: 2; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.confetti-piece { position: absolute; top: -10px; width: 8px; height: 8px; border-radius: 2px; animation: confettiFall 2.5s ease-in forwards; }
.dialog-avatars { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.dialog-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; border: 3px solid #fff; box-shadow: var(--shadow-md); overflow: hidden; }
.dialog-heart-wrap { animation: pulse 1s ease-in-out infinite; }
.dialog-title { font-size: 1.5rem; font-weight: 900; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.35rem; }
.dialog-subtitle { font-size: 0.9rem; color: var(--fg-secondary); margin-bottom: 1rem; }
.dialog-subtitle strong { color: var(--fg); }
.dialog-info { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-bottom: 1.5rem; }
.dialog-tag { display: flex; align-items: center; gap: 3px; background: var(--primary-lighter); color: var(--primary-dark); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; }
.dialog-actions { display: flex; flex-direction: column; gap: 0.6rem; }
@media (min-width: 480px) { .code-char { width: 38px; height: 48px; font-size: 1.3rem; } .profile-header-bg { max-width: 480px; margin: 0 auto; } }

/* Real avatar photos */
.avatar-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-img .avatar-photo { width: 100%; height: 100%; }
.ticker-avatar .avatar-photo { width: 100%; height: 100%; }
.person-avatar .avatar-photo { width: 100%; height: 100%; }
.match-avatar .avatar-photo { width: 100%; height: 100%; }
.dialog-avatar .avatar-photo { width: 100%; height: 100%; }
.msg-avatar .avatar-photo { width: 100%; height: 100%; }
.header-avatar .avatar-photo { width: 100%; height: 100%; }
