/* ============================================
   PAYNIACS — Tim Payne Follower Number App
   MVP Web App | Mobile-First | Dark Mode
   ============================================ */

:root {
    --bg: #050505;
    --bg-elevated: #0a0a10;
    --bg-card: #111118;
    --text: #f0f0f5;
    --text-muted: #777788;
    --gold: #FFD700;
    --gold-dim: #bfa030;
    --accent: #ff3b3b;
    --border: #1a1a22;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.noise {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.gold { color: var(--gold); }

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(5,5,5,0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.logo {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: var(--gold);
}

.header nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}
.header nav a:hover { color: var(--gold); }

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 100px 20px 60px;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255,215,0,0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255,59,59,0.05) 0%, transparent 50%),
        var(--bg);
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,215,0,0.1);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid rgba(255,215,0,0.2);
    animation: pulse 2.5s infinite;
}

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

.hero-title {
    font-size: clamp(2.6rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 40px;
}

.hero-sub strong { color: var(--text); }

.hero-stats {
    display: flex;
    gap: 44px;
    margin-bottom: 44px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat { text-align: center; }
.stat-num {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--gold);
}
.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 34px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gold);
    color: #000;
    box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,215,0,0.45);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Sections */
.container {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 80px 0; }

.section-title {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 44px;
    font-size: 1.05rem;
}

/* Generator */
.generator {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.input-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group:focus-within { 
    border-color: var(--gold); 
    box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px 0 20px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
}

#igHandle {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 16px 0;
    outline: none;
}
#igHandle::placeholder { color: #444; }

#generateBtn {
    border-radius: 0;
    padding: 16px 26px;
}

/* Result Area */
.result-area { animation: fadeUp 0.6s ease-out; }
.hidden { display: none !important; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 44px 30px;
    text-align: center;
    margin-bottom: 36px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.result-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.result-number {
    font-size: clamp(3.2rem, 10vw, 5.5rem);
    font-weight: 900;
    color: var(--gold);
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 10px;
}

.result-handle {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.result-rank {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    background: rgba(255,215,0,0.1);
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Canvas */
.card-preview-wrapper { text-align: center; }
.card-preview-wrapper h3 {
    margin-bottom: 18px;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

#shareCanvas {
    max-width: 100%;
    width: 300px;
    height: auto;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.card-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Premium */
.premium {
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.premium-badge {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    position: relative;
    transition: transform 0.25s, border-color 0.25s;
}
.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.pricing-card.featured {
    border-color: var(--gold);
    box-shadow: 0 4px 24px rgba(255,215,0,0.1);
}

.pricing-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #000;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 4px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 14px;
}

.pricing-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 26px;
    line-height: 1.55;
}

.contact-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.contact-note a { color: var(--gold); text-decoration: none; font-weight: 600; }
.contact-note a:hover { text-decoration: underline; }

/* Leaderboard */
.leaderboard {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.leaderboard-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lb-header, .lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 120px 100px;
    gap: 12px;
    padding: 14px 20px;
    align-items: center;
}

.lb-header {
    background: rgba(255,215,0,0.04);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.lb-row {
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(255,215,0,0.03); }

.lb-rank {
    font-weight: 900;
    color: var(--gold);
}
.lb-handle { font-weight: 600; }
.lb-num { font-family: 'SF Mono', monospace; color: var(--gold); font-weight: 700; }
.lb-date { color: var(--text-muted); font-size: 0.78rem; }

/* Footer */
.footer {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-logo {
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.footer-links { margin-bottom: 20px; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 14px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
    font-size: 0.78rem;
    color: #444;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 600px) {
    .header nav { display: none; }
    .hero-stats { gap: 24px; }
    .stat-num { font-size: 1.5rem; }
    .lb-header, .lb-row {
        grid-template-columns: 40px 1fr 100px;
        padding: 12px 14px;
    }
    .lb-header span:nth-child(4),
    .lb-row span:nth-child(4) { display: none; }
    .pricing-grid { grid-template-columns: 1fr; }
    .card-actions { flex-direction: column; }
    .card-actions button { width: 100%; }
    #shareCanvas { width: 260px; }
}
