/* ═══════════════════════════════════════════════════════════════════════════
   SIR Voter Search — Kerala Electoral Roll Lookup
   Premium dark-mode UI with glassmorphism, animations, and bilingual support
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties (Design Tokens) ───────────────────────────────── */
:root {
    /* Colors - Deep indigo/violet palette */
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2a;
    --bg-card: rgba(20, 20, 55, 0.6);
    --bg-card-hover: rgba(30, 30, 75, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-strong: rgba(255, 255, 255, 0.08);

    --text-primary: #f0f0ff;
    --text-secondary: #a0a0cc;
    --text-muted: #6b6b99;
    --text-malayalam: #c8b8ff;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a78bfa;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-glow-strong: rgba(99, 102, 241, 0.5);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(99, 102, 241, 0.3);
    --border-card: rgba(255, 255, 255, 0.08);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Gender colors */
    --male-accent: #3b82f6;
    --male-bg: rgba(59, 130, 246, 0.1);
    --female-accent: #ec4899;
    --female-bg: rgba(236, 72, 153, 0.1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Font */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-malayalam: 'Noto Sans Malayalam', sans-serif;
}

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Animated Background ─────────────────────────────────────────────────── */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    bottom: 10%;
    left: -10%;
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #a78bfa, transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -14s;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(40px, 30px) scale(1.02);
    }
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 24px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    transition: var(--transition-normal);
}

.logo-icon:hover {
    transform: rotate(-5deg) scale(1.05);
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* ─── Main Content ────────────────────────────────────────────────────────── */
main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: calc(100vh - 64px - 80px);
}

/* ─── Hero Section ────────────────────────────────────────────────────────── */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-glass-strong);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-tertiary);
    margin-bottom: 20px;
    animation: fadeInDown 0.6s ease-out;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
    animation: fadeInDown 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border-subtle);
}

.home-disclaimer {
    margin-top: 24px;
    display: inline-flex;
    padding: 8px 16px;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: var(--radius-full);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.home-disclaimer p {
    font-size: 0.75rem;
    color: #eab308;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.home-disclaimer p a,
.disclaimer a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: var(--transition-fast);
}

.home-disclaimer p a:hover,
.disclaimer a:hover {
    color: var(--accent-primary);
    text-decoration-thickness: 2px;
}

.ml-text {
    font-family: var(--font-malayalam);
    color: var(--text-malayalam);
    font-size: 0.9em;
    opacity: 0.8;
}

/* ─── Search Container ────────────────────────────────────────────────────── */
.search-container {
    animation: fadeInUp 0.6s ease-out 0.3s both;
    position: sticky;
    top: 12px;
    z-index: 100;
    transition: var(--transition-normal);
}

.search-container.is-sticky {
    max-width: 600px;
    margin: 0 auto;
    transform: translateY(0);
}

.search-container.is-sticky .search-box {
    background: var(--bg-card-hover);
    backdrop-filter: blur(20px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-tip-neon {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.25s both;
}

.search-tip-neon p {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ff3131;
    text-shadow: 0 0 5px rgba(255, 49, 49, 0.4), 0 0 10px rgba(255, 49, 49, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 4px;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    background: var(--bg-card-hover);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.search-box:focus-within .search-icon {
    color: var(--accent-primary);
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--text-primary);
    padding: 14px 8px;
    min-width: 0;
}

#search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-glass-strong);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: 4px;
    transition: var(--transition-fast);
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* Search Hints */
.search-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.hint-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

.hint-chip:hover {
    background: var(--bg-glass-strong);
    border-color: var(--border-accent);
    color: var(--accent-tertiary);
    transform: translateY(-1px);
}

/* ─── Results Section ─────────────────────────────────────────────────────── */
.results-section {
    padding-bottom: 40px;
    animation: fadeInUp 0.4s ease-out;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}

.results-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.results-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ─── Voter Card ──────────────────────────────────────────────────────────── */
.voter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    animation: cardSlideIn 0.4s ease-out both;
}

.voter-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    background: var(--bg-card-hover);
}

.voter-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.voter-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.share-btn:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.voter-card-name {
    flex: 1;
}

.voter-card-name .name-en {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.voter-card-name .name-ml {
    font-family: var(--font-malayalam);
    font-size: 0.95rem;
    color: var(--text-malayalam);
    margin-top: 2px;
    font-weight: 500;
}

.voter-card-id {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-tertiary);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--transition-fast);
}

.voter-card-id:hover {
    background: var(--accent-glow-strong);
}

.voter-card-id .copy-icon {
    opacity: 0.6;
    transition: var(--transition-fast);
}

.voter-card-id:hover .copy-icon {
    opacity: 1;
}

.voter-card-body {
    padding: 16px 20px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-primary);
}

.detail-value .ml-sub {
    font-family: var(--font-malayalam);
    font-size: 0.82rem;
    color: var(--text-malayalam);
    display: block;
    margin-top: 1px;
}

/* Gender Badge */
.gender-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.gender-badge.male {
    background: var(--male-bg);
    color: var(--male-accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.gender-badge.female {
    background: var(--female-bg);
    color: var(--female-accent);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

/* Age Badge */
.age-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Serial number badge in card */
.serial-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-glass-strong);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    animation: fadeInUp 0.4s ease-out;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state .ml-text {
    margin-top: 8px;
    display: block;
}

/* ─── Loading State ───────────────────────────────────────────────────────── */
.loading-state {
    text-align: center;
    padding: 60px 24px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    padding: 24px;
    text-align: center;
    margin-top: 40px;
}

.footer-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.disclaimer-section {
    max-width: 600px;
    margin: 16px auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.mobile-detailed-disclaimer {
    display: none;
    /* Hidden by default (desktop) */
}

.disclaimer {
    font-size: 0.75rem !important;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.disclaimer:last-child {
    margin-bottom: 0;
}

.footer-note {
    margin-top: 4px;
    font-size: 0.72rem !important;
    opacity: 0.6;
}

/* ─── Global Animations ───────────────────────────────────────────────────── */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Toast / Copy notification ───────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card-hover);
    border: 1px solid var(--border-accent);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1000;
    transition: transform 0.3s var(--transition-spring);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    header {
        padding: 0 16px;
    }

    .header-content {
        height: 56px;
    }

    .logo-text h1 {
        font-size: 0.95rem;
    }

    .logo-text p {
        font-size: 0.6rem;
    }

    main {
        padding: 0 16px;
    }

    .hero-section {
        padding: 40px 0 24px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1;
        min-width: 100px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    /* Sticky Search on Mobile */
    .search-container {
        position: sticky;
        top: 8px;
        width: 100%;
        margin-bottom: 30px;
        z-index: 100;
    }

    .search-container.is-sticky {
        padding: 0 4px;
    }

    /* Hide hints while searching/scrolled on mobile */
    .search-container.is-sticky .search-hints {
        display: none;
    }

    /* Also hide hints when there's an active query on mobile */
    body.is-searching-active .search-hints {
        display: none;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Mobile Disclaimer Positioning */
    .desktop-disclaimer {
        display: none !important;
    }

    .mobile-detailed-disclaimer {
        display: block;
        margin-top: 20px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        text-align: left;
    }

    .mobile-detailed-disclaimer .disclaimer {
        font-size: 0.7rem !important;
        line-height: 1.4;
        color: var(--text-secondary);
        margin-bottom: 10px;
    }

    .mobile-detailed-disclaimer .ml-text {
        font-size: 0.75rem !important;
        margin-bottom: 0;
    }

    /* Enhanced Voter Cards for Mobile */
    .voter-card {
        padding: 0;
        overflow: hidden;
        border-radius: var(--radius-md);
        background: linear-gradient(135deg, rgba(20, 20, 55, 0.8), rgba(15, 15, 45, 0.9));
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .voter-card-header {
        padding: 20px 16px;
        background: rgba(255, 255, 255, 0.03);
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .voter-card-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 12px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-subtle);
    }

    .voter-card-body {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .detail-item {
        padding: 10px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-sm);
    }

    .search-hints {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        margin-top: 12px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .search-hints::-webkit-scrollbar {
        display: none;
    }

    .hint-chip {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    /* Touch targets */
    .share-btn,
    .clear-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 1.3rem;
    }

    .hero-badge {
        font-size: 0.72rem;
    }

    .stat-chip {
        font-size: 0.72rem;
        padding: 4px 10px;
    }
}

/* ─── Scrollbar Styling ───────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ─── Selection ───────────────────────────────────────────────────────────── */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ─── Highlight matched text ──────────────────────────────────────────────── */
.highlight {
    background: rgba(99, 102, 241, 0.25);
    color: var(--accent-tertiary);
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
}