:root {
    --bg-dark: #ffffff;
    --bg-dark-secondary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --neon-green: #00cc4f;
    --neon-green-glow: rgba(0, 204, 79, 0.08);
    --neon-red: #ef4444;
    --neon-red-glow: rgba(239, 68, 68, 0.08);
    --neon-yellow: #f59e0b;
    --neon-yellow-glow: rgba(245, 158, 11, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

.hidden {
    display: none !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Elegant Dotted Starfield Background (Minimalist, Corporate) */
.starfield {
    position: fixed;
    top: 72px; /* Starts below the header to keep header area completely clean */
    left: 0;
    width: 100%;
    height: calc(100% - 72px);
    pointer-events: none;
    z-index: -1;
    background-image: 
        radial-gradient(1.5px 1.5px at 25px 35px, var(--neon-green) 100%, transparent),
        radial-gradient(2px 2px at 60px 85px, var(--text-primary) 100%, transparent),
        radial-gradient(1.5px 1.5px at 90px 180px, var(--neon-green) 100%, transparent),
        radial-gradient(2px 2px at 130px 140px, var(--text-secondary) 100%, transparent),
        radial-gradient(1.5px 1.5px at 180px 240px, var(--neon-green) 100%, transparent),
        radial-gradient(2px 2px at 220px 70px, var(--text-primary) 100%, transparent);
    background-repeat: repeat;
    background-size: 280px 280px;
    opacity: 0.15;
}

/* Telegram Gate Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s;
    opacity: 1;
    visibility: visible;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06), 0 0 30px rgba(0, 204, 79, 0.05);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    padding: 40px 32px;
    text-align: center;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-logo {
    margin-bottom: 24px;
}

.modal-logo img {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 204, 79, 0.15);
}

.logo-pulse {
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 204, 79, 0.15);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 204, 79, 0.3);
        transform: scale(1.03);
    }
}

.modal-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tg-alt-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: -8px;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.4;
}

.modal-footer {
    margin-top: 24px;
    font-size: 0.8rem !important;
    color: var(--text-secondary);
}

/* Header Styles with Neon Glow */
.app-header {
    border-bottom: 2px solid var(--neon-green);
    box-shadow: 0 4px 20px rgba(0, 204, 79, 0.08);
    background-color: var(--bg-dark-secondary); /* Same as footer background */
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.8px;
    text-transform: lowercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: var(--neon-green);
}

.nav-link.active-nav {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-neon {
    background-color: var(--neon-green);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--neon-green-glow);
}

.btn-neon:hover:not(:disabled) {
    background-color: #00b345;
    box-shadow: 0 6px 16px rgba(0, 204, 79, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
    padding: 14px;
}

.btn.disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* App Main */
.app-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.text-neon {
    color: var(--neon-green);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

/* Live Stats Bar */
.live-stats-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    margin: 0 auto 36px auto;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.stat-indicator-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
    animation: statPulse 2s infinite;
}

.stat-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-text strong {
    color: var(--text-primary);
    font-weight: 800;
    margin-left: 2px;
    display: inline-block;
}

@keyframes statPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 204, 79, 0.5);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 204, 79, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 204, 79, 0);
    }
}

/* Search Box Container */
.search-container {
    max-width: 640px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 8px 8px 8px 16px;
    border-radius: 16px;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--neon-green);
    box-shadow: 0 0 0 4px var(--neon-green-glow);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    width: 100%;
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 12px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* Error Banner */
.error-banner {
    background-color: #fef2f2;
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

/* Loading Spinner Section */
.loading-section {
    text-align: center;
    padding: 60px 0;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.neon-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f4f6;
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 24px;
}

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

.loader-container h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.loader-container p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Verdict Banners */
.verdict-banner {
    padding: 20px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

.verdict-safe {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.verdict-warning {
    background-color: #fffbeb;
    border: 1px solid #f59e0b;
    color: #78350f;
}

.verdict-danger {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Results Grid Dashboard */
.results-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    transition: all 0.3s;
}

.card:hover {
    border-color: #d1d5db;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.card-glow:hover {
    border-color: var(--neon-green);
    box-shadow: 0 10px 20px var(--neon-green-glow);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Grid alignment */
#score-card {
    grid-column: span 4;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#checks-card {
    grid-column: span 4;
}

#metadata-card {
    grid-column: span 4;
}

#market-card {
    grid-column: span 6;
}

#lp-card {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
}

#holders-card {
    grid-column: span 12;
}

/* Security Score Circular Gauge */
.score-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 10px auto;
}

.gauge-svg {
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: #f3f4f6;
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: var(--neon-green);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-weight: 800;
    display: flex;
    align-items: baseline;
}

#score-number {
    font-size: 2.5rem;
    color: var(--text-primary);
}

.score-total {
    font-size: 1rem;
    color: var(--text-secondary);
}

.score-status {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin: 12px 0 8px 0;
}

.verdict-summary {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Checklist details */
.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checklist li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.check-label {
    flex-grow: 1;
    color: var(--text-secondary);
}

.check-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.badge-loading {
    background-color: #f3f4f6;
    color: var(--text-secondary);
}

.badge-safe {
    background-color: #ecfdf5;
    color: #10b981;
}

.badge-danger {
    background-color: #fef2f2;
    color: #ef4444;
}

.badge-warning {
    background-color: #fffbeb;
    color: #f59e0b;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table-val {
    text-align: right;
    color: var(--text-primary);
    font-weight: 600;
}

.font-highlight {
    font-size: 1.05rem;
}

.address-link {
    font-family: monospace;
    color: #2563eb !important;
    cursor: pointer;
    font-size: 0.85rem !important;
    text-decoration: none;
}

.address-link:hover {
    text-decoration: underline;
    color: var(--neon-green) !important;
}

/* Liquidity Status gauge */
.lp-status-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    justify-content: center;
}

.lp-gauge {
    height: 24px;
    background-color: #f3f4f6;
    border-radius: 100px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.lp-gauge-bar {
    height: 100%;
    background-color: var(--neon-green);
    border-radius: 100px;
    transition: width 0.8s ease-in-out;
}

.lp-gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lp-details-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Holders List */
.holders-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.holders-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
}

.holder-rank {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 12px;
}

.holder-addr {
    font-family: monospace;
    color: var(--text-secondary);
}

.holder-pct {
    font-weight: 700;
    color: var(--text-primary);
    background-color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Holder Role Badges in UI */
.holder-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
}

.badge-role-pool {
    background-color: #e8fdf0;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-role-dev {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.badge-role-burn {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.badge-role-whale {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-role-fresh {
    background-color: #ecfeff;
    color: #155e75;
    border: 1px solid #cffafe;
}

.badge-role-contract {
    background-color: #fce7f3;
    color: #9d174d;
    border: 1px solid #fbcfe8;
}

.badge-role-trader {
    background-color: #f9fafb;
    color: #4b5563;
    border: 1px solid #f3f4f6;
}

/* Info & Education Section with 3 Columns */
.info-section {
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 32px;
}

.info-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.info-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.info-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-list li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 8px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.info-list li:last-child {
    grid-column: span 2;
}

.info-list li .holder-badge {
    margin-left: 0;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.uniswap-version-info h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.uniswap-version-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.uniswap-version-info h4:first-of-type {
    margin-top: 0;
}

/* Footer styles */
.app-footer-bar {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-dark-secondary);
    padding: 30px 24px;
    margin-top: auto;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-footer-bar p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-note {
    font-size: 0.75rem !important;
    opacity: 0.6;
}

/* Responsive adjust */
@media (max-width: 968px) {
    #score-card, #checks-card, #metadata-card, #market-card, #lp-card {
        grid-column: span 12;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }

    .info-grid-three {
        grid-template-columns: 1fr;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .info-list li:last-child {
        grid-column: span 1;
    }
}

/* Mobile specific styling */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        text-align: center;
    }

    .nav-right {
        gap: 16px;
    }

    .nav-link {
        font-size: 0.85rem;
    }

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

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

    .search-box {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .search-box input {
        font-size: 0.9rem;
        padding: 6px 0;
        text-align: left;
    }

    .search-box button {
        width: 100%;
        padding: 10px;
    }

    .card {
        padding: 16px;
    }

    .data-table td {
        font-size: 0.85rem;
        padding: 10px 0;
    }

    .results-grid {
        gap: 16px;
    }

    .info-card {
        padding: 18px;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .info-desc {
        font-size: 0.82rem;
        margin-bottom: 16px;
    }
    
    .info-list li {
        font-size: 0.8rem;
        padding: 6px;
    }
    
    .uniswap-version-info h4 {
        font-size: 0.85rem;
        margin-top: 12px;
        margin-bottom: 4px;
    }
    
    .uniswap-version-info p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
}
