* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #0e1117;
    --bg-secondary: #161a23;
    --card-bg: #1a1e29;
    --border-color: #2c3444;
    --text-primary: #ffffff;
    --text-secondary: #9ea3ae;
    --text-muted: #5e6673;
    --accent-green: #26a69a;
    --accent-red: #ef5350;
    --accent-blue: #2962ff;
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    padding-bottom: 128px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal {
    animation: fadeIn 0.2s ease-out forwards;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 16px;
}

.modal-box {
    animation: modalAppear 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    background: #171b26;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(38, 166, 154, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(38, 166, 154, 0); }
    100% { box-shadow: 0 0 0 0 rgba(38, 166, 154, 0); }
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-footer {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.modal-token-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.modal-token-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.bonus-box {
    background: rgba(38, 166, 154, 0.05);
    border: 1px dashed var(--accent-green);
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.success-icon-circle {
    width: 64px;
    height: 64px;
    background: rgba(38, 166, 154, 0.1);
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent-green);
}

.modal-trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
}

.bonus-icon {
    color: var(--accent-green);
    flex-shrink: 0;
}

.bonus-title {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.bonus-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.vote-confirm-text {
    font-size: 18px;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
    height: 44px;
    margin-top: 12px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Utility Classes */
.mono {
    font-family: var(--font-mono);
}

.green {
    color: var(--accent-green);
}

.red {
    color: var(--accent-red);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* A) STICKY HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #131722;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.header-container {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    gap: 12px;
    padding: 0 12px;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.header-logo-dexscreener {
    height: 32px;
    filter: invert(1);
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.token-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.token-pair {
    font-size: 11px;
    color: var(--accent-blue);
    margin-top: -2px;
    font-family: var(--font-mono);
}

.badges-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-solana {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-pump {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.icon-btn:active {
    transform: scale(0.95);
}

/* Main Content */
.main-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

/* Cards Base */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: #3b4353;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

/* B) VOTE CARD - PRIORITY */
.vote-card {
    margin-top: 4px;
}

.vote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.vote-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.live-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-green);
    background: transparent;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.vote-question {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.vote-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.vote-btn {
    flex: 1;
    height: 44px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: var(--font-ui);
}

.vote-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.vote-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.vote-yes {
    background: rgba(38, 166, 154, 0.1); /* Напівпрозорий фон */
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

.vote-yes:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
    background: var(--accent-green);
    color: #000
}

.vote-no {
    background: rgba(239, 83, 80, 0.1);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    box-shadow: 0 4px 16px rgba(239, 83, 80, 0.25);
}

.vote-no:hover {
    box-shadow: 0 6px 20px rgba(239, 83, 80, 0.35);
    background: var(--accent-red);
    color: #fff;
}

.vote-stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.vote-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vote-stat .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vote-stat .stat-value {
    font-size: 14px;
    font-weight: 600;
}

.progress-bar-container {
    margin-bottom: 12px;
}

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    display: flex;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-yes {
    background: var(--accent-green);
}

.progress-no {
    background: var(--accent-red);
}

.vote-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* C) BANNER CARD */
.banner-card {
    padding: 0;
    overflow: hidden;
    border: none;
}

.banner-image-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: brightness(0.7); */
}

.banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
}

.banner-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* D) ACTION ROW */
.action-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-pill {
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-pill:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.action-pill:active {
    transform: scale(0.98);
}

.action-pill.secondary {
    border-style: dashed;
}

/* E) STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value-large {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Time Chips */
.time-chips {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.time-chip {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.time-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.time-value {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.time-chip.green {
    border-color: rgba(38, 166, 154, 0.3);
    background: rgba(38, 166, 154, 0.03);
}

.time-chip.red {
    border-color: rgba(239, 83, 80, 0.3);
    background: rgba(239, 83, 80, 0.03);
}

/* F) FLOW STATS */
.flow-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.flow-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flow-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.flow-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.flow-split {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.split-label {
    font-weight: 500;
}

.split-label.green {
    color: var(--accent-green);
}

.split-label.red {
    color: var(--accent-red);
}

.split-label span {
    margin-left: 4px;
    font-weight: 600;
}

.bar-container {
    margin-top: 2px;
}

.bar-bg {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    display: flex;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.bar-buy {
    background: var(--accent-green);
}

.bar-sell {
    background: var(--accent-red);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0 -4px;
}

/* Secondary Actions */
.secondary-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* G) INFO CARD */
.info-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.info-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-ticker {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.info-socials {
    display: flex;
    gap: 8px;
}

.social-btn {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.social-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.info-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* Spacer */
.bottom-spacer {
    height: 60px;
}

/* H) FOOTER NAV */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #131722;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 100;
}

.nav-tab {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    padding-top: 4px;
}

.nav-tab svg {
    stroke-width: 1.5;
}

.nav-tab.active {
    color: var(--accent-blue);
    margin-top: -2px;
}

.nav-tab:active {
    transform: scale(0.95);
}

/* Responsive */
@media (min-width: 480px) {
    body {
        padding-bottom: 128px;
    }

    .footer-nav {
        /* position: relative; */
        border-top: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0px;
        margin: 0 0px 0px;
        background: #131722;
    }

    .bottom-spacer {
        display: flex;
    }
}

/* Animations */
@keyframes countUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: countUp 0.4s ease forwards;
}

/* Disabled vote state */
.vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;


::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #2c3444;
}
