/* Near Me USA - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Sora:wght@400;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --font-body: 'Outfit', 'Segoe UI', sans-serif;
    --font-display: 'Sora', sans-serif;
    --max-width: 1320px;
    --transition: 0.4s ease;
}

/* Dark Theme (default) */
[data-theme="dark"] {
    --bg: #0B0F1A;
    --header-bg: rgba(11,15,26,0.9);
    --card-bg: rgba(255,255,255,0.03);
    --card-border: rgba(255,255,255,0.06);
    --card-hover: rgba(56,152,236,0.08);
    --card-hover-border: rgba(56,152,236,0.25);
    --text: #E8ECF4;
    --text-muted: rgba(255,255,255,0.45);
    --accent: #3898EC;
    --accent-grad: linear-gradient(135deg, #3898EC, #2563EB);
    --tab-inactive: rgba(255,255,255,0.55);
    --tab-border: rgba(255,255,255,0.1);
    --tab-bg: rgba(255,255,255,0.03);
    --search-bg: rgba(255,255,255,0.04);
    --search-border: rgba(255,255,255,0.1);
    --search-placeholder: rgba(255,255,255,0.3);
    --footer-border: rgba(255,255,255,0.06);
    --footer-text: rgba(255,255,255,0.25);
    --glow1: rgba(56,152,236,0.08);
    --glow2: rgba(16,185,129,0.06);
    --listing-color: rgba(56,152,236,0.7);
    --section-bg: rgba(255,255,255,0.03);
    --section-border: rgba(255,255,255,0.06);
    --input-bg: rgba(255,255,255,0.04);
    --input-border: rgba(255,255,255,0.1);
    --select-bg: rgba(20,24,36,1);
    --label-color: rgba(255,255,255,0.5);
    --info-bg: rgba(56,152,236,0.06);
    --info-border: rgba(56,152,236,0.15);
    --ad-bg: rgba(255,255,255,0.03);
    --ad-border: rgba(255,255,255,0.06);
    --ad-grad: linear-gradient(160deg, rgba(56,152,236,0.05), rgba(139,92,246,0.05));
    --ad-icon-bg: rgba(255,255,255,0.06);
    --ad-label: rgba(255,255,255,0.25);
    --ad-text: rgba(255,255,255,0.5);
    --usa-text: rgba(56,152,236,0.9);
    --shadow-color: rgba(56,152,236,0.3);
    --shadow-hover: 0.3;
    --live-badge-bg: rgba(16,185,129,0.15);
    --live-badge-color: #10B981;
    --live-badge-border: rgba(16,185,129,0.3);
    --coming-badge-bg: rgba(245,158,11,0.15);
    --coming-badge-color: #F59E0B;
    --coming-badge-border: rgba(245,158,11,0.3);
    --vote-bg: rgba(255,255,255,0.05);
    --vote-border: rgba(255,255,255,0.1);
    --vote-active-bg: rgba(56,152,236,0.15);
    --vote-active-border: rgba(56,152,236,0.4);
    --suggestion-bg: rgba(139,92,246,0.06);
    --suggestion-border: rgba(139,92,246,0.2);
    --winner-bg: rgba(56,152,236,0.08);
    --winner-border: rgba(56,152,236,0.2);
    --counter-bg: rgba(255,255,255,0.04);
    --counter-border: rgba(255,255,255,0.08);
    --dot-empty: rgba(255,255,255,0.15);
    --dot-filled: #3898EC;
    --phase-item-bg: rgba(255,255,255,0.02);
    --phase-item-border: rgba(255,255,255,0.05);
    --phase-muted: rgba(255,255,255,0.35);
    --phase-note: rgba(255,255,255,0.3);
}

/* Light Theme */
[data-theme="light"] {
    --bg: #F4F7FB;
    --header-bg: rgba(255,255,255,0.95);
    --card-bg: #FFFFFF;
    --card-border: rgba(0,0,0,0.08);
    --card-hover: rgba(37,99,235,0.05);
    --card-hover-border: rgba(37,99,235,0.25);
    --text: #1A2332;
    --text-muted: rgba(26,35,50,0.55);
    --accent: #2563EB;
    --accent-grad: linear-gradient(135deg, #2563EB, #3B82F6);
    --tab-inactive: rgba(26,35,50,0.55);
    --tab-border: rgba(0,0,0,0.12);
    --tab-bg: rgba(0,0,0,0.03);
    --search-bg: rgba(0,0,0,0.04);
    --search-border: rgba(0,0,0,0.12);
    --search-placeholder: rgba(26,35,50,0.35);
    --footer-border: rgba(0,0,0,0.08);
    --footer-text: rgba(26,35,50,0.35);
    --glow1: rgba(37,99,235,0.06);
    --glow2: rgba(59,130,246,0.04);
    --listing-color: rgba(37,99,235,0.7);
    --section-bg: #FFFFFF;
    --section-border: rgba(0,0,0,0.08);
    --input-bg: rgba(0,0,0,0.03);
    --input-border: rgba(0,0,0,0.12);
    --select-bg: #FFFFFF;
    --label-color: rgba(26,35,50,0.55);
    --info-bg: rgba(37,99,235,0.05);
    --info-border: rgba(37,99,235,0.15);
    --ad-bg: #FFFFFF;
    --ad-border: rgba(0,0,0,0.08);
    --ad-grad: linear-gradient(160deg, rgba(37,99,235,0.04), rgba(59,130,246,0.04));
    --ad-icon-bg: rgba(0,0,0,0.04);
    --ad-label: rgba(26,35,50,0.3);
    --ad-text: rgba(26,35,50,0.45);
    --usa-text: rgba(37,99,235,0.85);
    --shadow-color: rgba(37,99,235,0.2);
    --shadow-hover: 0.1;
    --live-badge-bg: rgba(16,185,129,0.1);
    --live-badge-color: #059669;
    --live-badge-border: rgba(16,185,129,0.25);
    --coming-badge-bg: rgba(245,158,11,0.1);
    --coming-badge-color: #D97706;
    --coming-badge-border: rgba(245,158,11,0.25);
    --vote-bg: rgba(0,0,0,0.03);
    --vote-border: rgba(0,0,0,0.1);
    --vote-active-bg: rgba(37,99,235,0.1);
    --vote-active-border: rgba(37,99,235,0.35);
    --suggestion-bg: rgba(139,92,246,0.05);
    --suggestion-border: rgba(139,92,246,0.15);
    --winner-bg: rgba(37,99,235,0.06);
    --winner-border: rgba(37,99,235,0.15);
    --counter-bg: rgba(0,0,0,0.03);
    --counter-border: rgba(0,0,0,0.08);
    --dot-empty: rgba(0,0,0,0.12);
    --dot-filled: #2563EB;
    --phase-item-bg: rgba(0,0,0,0.02);
    --phase-item-border: rgba(0,0,0,0.06);
    --phase-muted: rgba(26,35,50,0.4);
    --phase-note: rgba(26,35,50,0.35);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* Ambient Background */
.ambient { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; }
.ambient .glow1 { position: absolute; top: -20%; left: -10%; width: 500px; height: 500px; background: radial-gradient(circle, var(--glow1) 0%, transparent 70%); border-radius: 50%; }
.ambient .glow2 { position: absolute; bottom: -15%; right: -5%; width: 600px; height: 600px; background: radial-gradient(circle, var(--glow2) 0%, transparent 70%); border-radius: 50%; }

/* Header */
.header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 0 32px;
    transition: background var(--transition);
}
.header-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 88px; gap: 12px;
}

/* Logo */
.logo-group { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-img { height: 72px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 10px var(--shadow-color)); }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--text); letter-spacing: -0.3px; }
.logo-usa { font-family: var(--font-display); font-weight: 400; font-size: 12px; color: var(--usa-text); display: block; margin-top: -2px; letter-spacing: 2.5px; text-transform: uppercase; }

/* Navigation Tabs */
.nav-tabs { display: flex; gap: 6px; }
.tab-btn {
    padding: 10px 22px; border-radius: 100px;
    border: 1px solid var(--tab-border);
    background: var(--tab-bg);
    color: var(--tab-inactive);
    font-size: 14px; font-weight: 400;
    font-family: var(--font-body);
    cursor: pointer; transition: all 0.3s ease;
}
.tab-btn.active {
    border: none;
    background: var(--accent-grad);
    color: #fff; font-weight: 600;
    box-shadow: 0 4px 20px var(--shadow-color);
}

/* Search */
.search-wrap { position: relative; min-width: 200px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--search-placeholder); font-size: 16px; pointer-events: none; }
.search-input {
    width: 100%; padding: 10px 16px 10px 42px; border-radius: 100px;
    border: 1px solid var(--search-border); background: var(--search-bg);
    color: var(--text); font-size: 14px; font-family: var(--font-body);
    outline: none; box-sizing: border-box;
}
.search-input::placeholder { color: var(--search-placeholder); }

/* Theme Toggle */
.theme-toggle {
    position: relative; width: 52px; height: 28px; border-radius: 100px;
    border: none; cursor: pointer; padding: 0; flex-shrink: 0;
    transition: background 0.3s ease;
}
[data-theme="dark"] .theme-toggle { background: rgba(56,152,236,0.25); }
[data-theme="light"] .theme-toggle { background: rgba(37,99,235,0.15); }
.toggle-knob {
    position: absolute; top: 3px; width: 22px; height: 22px; border-radius: 50%;
    transition: left 0.3s ease, background 0.3s ease;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
[data-theme="dark"] .toggle-knob { left: 26px; background: #3898EC; box-shadow: 0 2px 8px rgba(56,152,236,0.4); }
[data-theme="light"] .toggle-knob { left: 3px; background: #2563EB; box-shadow: 0 2px 8px rgba(37,99,235,0.3); }

/* Desktop controls group */
.desktop-controls { display: flex; align-items: center; gap: 12px; }

/* Mobile nav tray */
.mobile-tray {
    overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.3s ease;
}
.mobile-tray.open { max-height: 200px; padding: 10px 0 14px 0; opacity: 1; border-top: 1px solid var(--card-border); }
.mobile-tray.closed { max-height: 0; padding: 0; opacity: 0; border-top: none; }
.mobile-tabs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tab {
    padding: 9px 18px; border-radius: 100px; font-size: 13px;
    font-family: var(--font-body); cursor: pointer;
    white-space: nowrap; flex-shrink: 0; transition: all 0.3s ease;
}

/* Chevron toggle */
.chevron-btn {
    background: none; border: none; color: var(--text); font-size: 20px;
    cursor: pointer; padding: 8px; display: flex; align-items: center;
    justify-content: center; transition: transform 0.3s ease;
}
.chevron-btn.open { transform: rotate(180deg); }

/* Mobile controls */
.mobile-controls { display: flex; align-items: center; gap: 10px; }

/* Main layout */
.main-layout {
    max-width: var(--max-width); margin: 0 auto; padding: 32px;
    display: flex; gap: 32px; position: relative; z-index: 1;
}
.main-content { flex: 1; min-width: 0; }

/* Sidebar ad */
.sidebar { width: 260px; flex-shrink: 0; }
.sidebar-sticky { position: sticky; top: 120px; }

/* Ad unit */
.ad-unit { background: var(--ad-bg); border: 1px solid var(--ad-border); border-radius: 16px; overflow: hidden; }
.ad-label { font-size: 10px; color: var(--ad-label); text-transform: uppercase; letter-spacing: 1.5px; padding: 10px 16px; text-align: center; border-bottom: 1px solid var(--ad-border); font-weight: 500; }
.ad-body { background: var(--ad-grad); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.ad-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ad-icon-bg); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 12px; }
.ad-title { font-size: 14px; font-weight: 600; color: var(--ad-text); margin-bottom: 4px; }
.ad-size { font-size: 12px; color: var(--ad-label); }

/* Cards grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 16px; padding: 24px 20px; cursor: pointer;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.card:hover {
    background: var(--card-hover); border-color: var(--card-hover-border);
    transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,var(--shadow-hover));
}
.card-icon { font-size: 32px; margin-bottom: 10px; }
.card-name { font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.card-count { font-size: 12px; color: var(--listing-color); font-weight: 500; }

/* Vote card */
.card.voted { background: var(--vote-active-bg); border-color: var(--vote-active-border); }
.card.maxed { opacity: 0.5; cursor: default; }
.card.maxed:hover { transform: none; box-shadow: none; }
.card-leader { position: absolute; top: 8px; right: 10px; font-size: 14px; }
.card-vote-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.vote-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.vote-count.active { color: var(--accent); }
.vote-badge {
    padding: 3px 10px; border-radius: 100px; font-size: 10px; font-weight: 600;
    background: var(--vote-bg); color: var(--text-muted);
    border: 1px solid var(--vote-border); transition: all 0.3s ease;
}
.vote-badge.active { background: var(--accent-grad); color: #fff; border: none; }

/* Vote counter */
.vote-counter {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 100px;
    background: var(--counter-bg); border: 1px solid var(--counter-border);
}
.vote-dots { display: flex; gap: 5px; }
.vote-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--dot-empty); transition: background 0.3s ease;
}
.vote-dot.filled { background: var(--dot-filled); box-shadow: 0 0 6px color-mix(in srgb, var(--dot-filled) 33%, transparent); }
.vote-counter-text { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* Section panels */
.section-panel {
    background: var(--section-bg); border: 1px solid var(--section-border);
    border-radius: 20px; padding: 48px 40px;
}
.section-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text); margin: 0 0 16px 0; }

/* Suggestion box */
.suggestion-box {
    flex: 1; background: var(--suggestion-bg); border: 1px solid var(--suggestion-border);
    border-radius: 16px; padding: 20px 24px;
}
.suggestion-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.suggestion-row { display: flex; gap: 8px; }
.suggestion-input {
    flex: 1; padding: 10px 16px; border-radius: 100px;
    border: 1px solid var(--input-border); background: var(--input-bg);
    color: var(--text); font-size: 14px; font-family: var(--font-body); outline: none;
}
.suggestion-btn {
    padding: 10px 20px; border-radius: 100px; border: none;
    background: var(--accent-grad); color: #fff; font-size: 13px; font-weight: 600;
    font-family: var(--font-body); cursor: pointer; flex-shrink: 0;
    box-shadow: 0 2px 12px var(--shadow-color);
}
.suggestion-success { font-size: 12px; color: var(--live-badge-color); margin-top: 8px; font-weight: 500; }

/* Winner box */
.winner-box {
    min-width: 240px; background: var(--winner-bg); border: 1px solid var(--winner-border);
    border-radius: 16px; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center;
}
.winner-label { font-size: 11px; font-weight: 600; color: var(--phase-muted); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; }
.winner-content { display: flex; align-items: center; gap: 10px; }
.winner-icon { font-size: 28px; }
.winner-name { font-size: 16px; font-weight: 700; color: var(--text); }
.winner-votes { font-size: 12px; color: var(--accent); font-weight: 500; }
.winner-empty { font-size: 14px; color: var(--text-muted); }

/* Section headers */
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-heading { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--text); margin: 0; }

/* Badges */
.badge {
    padding: 4px 14px; border-radius: 100px; font-size: 11px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
}
.badge-live { background: var(--live-badge-bg); color: var(--live-badge-color); border: 1px solid var(--live-badge-border); }
.badge-coming { background: var(--coming-badge-bg); color: var(--coming-badge-color); border: 1px solid var(--coming-badge-border); }
.pulse-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--live-badge-color);
    display: inline-block; animation: pulse 2s infinite;
}

/* Roadmap items */
.roadmap-item {
    display: flex; align-items: center; gap: 20px;
    padding: 20px 24px; border-radius: 14px;
    background: var(--phase-item-bg); border: 1px solid var(--phase-item-border);
}
.roadmap-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.roadmap-phase { font-size: 11px; color: var(--phase-muted); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px; }
.roadmap-title { font-size: 16px; font-weight: 500; color: var(--text); }
.roadmap-status { padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.roadmap-note { margin-top: 32px; color: var(--phase-note); font-size: 14px; font-style: italic; line-height: 1.6; }

/* Info panel */
.info-panel { background: var(--info-bg); border: 1px solid var(--info-border); border-radius: 14px; padding: 32px; }
.info-text { color: var(--text-muted); font-size: 16px; line-height: 1.7; }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--label-color); margin-bottom: 8px; letter-spacing: 0.5px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 14px 18px; border-radius: 12px;
    border: 1px solid var(--input-border); background: var(--input-bg);
    color: var(--text); font-size: 15px; font-family: var(--font-body);
    outline: none; box-sizing: border-box;
}
.form-select { background: var(--select-bg); cursor: pointer; }
.form-textarea { resize: vertical; }
.btn-primary {
    padding: 14px 36px; border-radius: 100px; border: none;
    background: var(--accent-grad); color: #fff; font-size: 15px; font-weight: 600;
    font-family: var(--font-body); cursor: pointer;
    box-shadow: 0 4px 20px var(--shadow-color);
}

/* Footer */
.footer {
    border-top: 1px solid var(--footer-border);
    padding: 32px; text-align: center; color: var(--footer-text);
    font-size: 13px; position: relative; z-index: 1;
}

/* Top bar (suggestion + winner) */
.top-bar { display: flex; gap: 16px; margin-bottom: 28px; }

/* Page heading */
.page-heading { margin-bottom: 32px; }
.page-title { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--text); margin: 0 0 8px 0; letter-spacing: -0.5px; }
.page-subtitle { font-size: 16px; color: var(--text-muted); font-weight: 300; line-height: 1.5; }

/* Tab content sections */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Coming soon helper text */
.coming-help { font-size: 13px; color: var(--text-muted); margin: 0 0 16px 0; }

/* Animations */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Responsive */
@media (max-width: 860px) {
    .header { padding: 0 16px; }
    .header-inner { height: 74px; }
    .logo-img { height: 58px; }
    .logo-text { font-size: 17px; }
    .logo-usa { font-size: 10px; }
    .desktop-nav, .desktop-controls { display: none !important; }
    .mobile-controls { display: flex !important; }
    .mobile-tray-wrap { display: block !important; }
    .main-layout { padding: 20px 16px; flex-direction: column; }
    .sidebar { display: none; }
    .mobile-ad { display: block !important; padding: 0 16px 24px 16px; position: relative; z-index: 1; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card { padding: 18px 14px; border-radius: 14px; }
    .card-icon { font-size: 26px; }
    .card-name { font-size: 13px; }
    .section-panel { padding: 28px 20px; }
    .section-title { font-size: 22px; }
    .section-heading { font-size: 20px; }
    .page-title { font-size: 24px; }
    .page-subtitle { font-size: 14px; }
    .page-heading { margin-bottom: 24px; }
    .top-bar { flex-direction: column; gap: 12px; }
    .winner-box { min-width: auto; }
    .suggestion-box { padding: 18px; }
    .info-panel { padding: 24px; }
    .info-text { font-size: 14px; }
    .roadmap-item { gap: 14px; flex-wrap: wrap; }
    .btn-primary { width: 100%; }
    .footer { padding: 24px 16px; }
}

@media (min-width: 861px) {
    .mobile-controls { display: none !important; }
    .mobile-tray-wrap { display: none !important; }
    .mobile-ad { display: none !important; }
}
