/* ============================================================
   TiktokHub — Main CSS
   Dark, minimal, TikTok-inspired aesthetic
   ============================================================ */

:root {
    --red:      #ff0050;
    --red-dim:  rgba(255, 0, 80, 0.15);
    --cyan:     #00f2ea;
    --white:    #ffffff;
    --grey-100: #f5f5f5;
    --grey-200: #e0e0e0;
    --grey-400: #888888;
    --grey-600: #444444;
    --grey-700: #2a2a2a;
    --grey-800: #1a1a1a;
    --grey-900: #0d0d0d;
    --bg:       #090909;
    --card:     #111111;
    --card2:    #161616;
    --border:   rgba(255,255,255,0.07);
    --radius:   12px;
    --radius-lg:20px;
    --font:     'Space Grotesk', sans-serif;
    --font-hero:'Syne', sans-serif;
    --shadow:   0 4px 30px rgba(0,0,0,0.5);
    --glow:     0 0 40px rgba(255,0,80,0.2);
    --trans:    all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--grey-600); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(9,9,9,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: 64px;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-hero); font-weight: 800; font-size: 1.25rem;
    white-space: nowrap;
}
.logo-icon {
    width: 32px; height: 32px;
    background: var(--red); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff;
}
.nav-links {
    display: flex; align-items: center; gap: 8px;
}
.nav-link {
    padding: 6px 14px; border-radius: 8px;
    font-size: .875rem; font-weight: 500;
    color: var(--grey-400);
    transition: var(--trans);
}
.nav-link:hover { color: var(--white); background: var(--card); }

.nav-btn {
    padding: 8px 18px; border-radius: 10px;
    font-size: .875rem; font-weight: 600;
    background: var(--red); color: #fff;
    transition: var(--trans);
}
.nav-btn:hover { background: #e0003e; transform: translateY(-1px); }
.nav-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--grey-400);
}
.nav-btn-outline:hover { color: var(--white); border-color: var(--grey-600); background: var(--card); }

.nav-burger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--trans); }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page { padding-top: 64px; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(255,0,80,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 100px;
    background: var(--red-dim); border: 1px solid rgba(255,0,80,0.3);
    font-size: .8rem; font-weight: 600; color: var(--red);
    margin-bottom: 28px;
    animation: fadeDown .6s ease both;
}
.hero h1 {
    font-family: var(--font-hero); font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -0.03em;
    animation: fadeUp .7s ease .1s both;
}
.hero h1 .accent { color: var(--red); }
.hero p {
    margin: 20px auto 0; max-width: 560px;
    font-size: 1.1rem; color: var(--grey-400);
    animation: fadeUp .7s ease .2s both;
}
.hero-actions {
    margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    animation: fadeUp .7s ease .3s both;
}
.hero-claim {
    margin-top: 40px;
    animation: fadeUp .7s ease .4s both;
}
.claim-input-wrap {
    display: inline-flex; align-items: center;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden;
    max-width: 420px; width: 100%;
}
.claim-prefix {
    padding: 0 14px; color: var(--grey-400); font-size: .9rem;
    border-right: 1px solid var(--border); white-space: nowrap;
}
.claim-input-wrap input {
    flex: 1; background: none; border: none; padding: 14px 16px;
    color: var(--white); font-family: var(--font); font-size: .95rem; outline: none;
}
.claim-input-wrap button {
    background: var(--red); border: none; padding: 0 20px;
    height: 50px; color: #fff; font-weight: 600; font-size: .875rem;
    cursor: pointer; transition: var(--trans); white-space: nowrap;
}
.claim-input-wrap button:hover { background: #e0003e; }

/* Hero mockup */
.hero-mockup {
    margin: 60px auto 0; max-width: 900px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    animation: fadeUp .8s ease .5s both;
}
.mockup-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.mockup-card img { width: 100%; }
.mockup-card-placeholder {
    height: 300px;
    background: linear-gradient(135deg, var(--card) 0%, var(--card2) 100%);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px; color: var(--grey-600);
}

/* ============================================================
   STATS STRIP
   ============================================================ */
.stats-strip {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
    text-align: center;
}
.stat-number {
    font-family: var(--font-hero); font-size: 2.5rem; font-weight: 800; color: var(--white);
}
.stat-label { font-size: .875rem; color: var(--grey-400); margin-top: 4px; }

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--trans);
}
.feature-card:hover {
    border-color: rgba(255,0,80,0.3);
    transform: translateY(-3px);
    box-shadow: var(--glow);
}
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--red-dim); color: var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: .875rem; color: var(--grey-400); line-height: 1.6; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
    max-width: 760px; margin: 0 auto;
}
.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
}
.pricing-card.popular {
    border-color: var(--red);
    box-shadow: 0 0 40px rgba(255,0,80,0.15);
}
.popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--red); color: #fff;
    padding: 4px 16px; border-radius: 100px; font-size: .75rem; font-weight: 700;
    white-space: nowrap;
}
.pricing-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.pricing-price {
    font-family: var(--font-hero); font-size: 2.5rem; font-weight: 800;
    margin-bottom: 4px;
}
.pricing-period { font-size: .85rem; color: var(--grey-400); margin-bottom: 24px; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.pricing-features li {
    font-size: .875rem; display: flex; gap: 10px; align-items: flex-start;
}
.pricing-features li .check { color: var(--red); flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-tag {
    display: inline-block; padding: 4px 14px; border-radius: 100px;
    background: var(--red-dim); color: var(--red);
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 16px;
}
.section-title {
    font-family: var(--font-hero); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
    letter-spacing: -0.02em; line-height: 1.2;
}
.section-sub {
    margin-top: 12px; font-size: 1rem; color: var(--grey-400); max-width: 560px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px; border: none;
    font-family: var(--font); font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: var(--trans); text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #e0003e; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,0,80,0.4); }
.btn-secondary { background: var(--card2); color: var(--white); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--card); border-color: var(--grey-600); }
.btn-lg { padding: 15px 30px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: .8rem; border-radius: 8px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 40px;
    max-width: 460px; width: 100%;
}
.form-title {
    font-family: var(--font-hero); font-size: 1.75rem; font-weight: 800;
    margin-bottom: 8px;
}
.form-sub { font-size: .9rem; color: var(--grey-400); margin-bottom: 32px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; color: var(--grey-200); }
.form-input {
    width: 100%; padding: 12px 14px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; color: var(--white);
    font-family: var(--font); font-size: .9rem;
    transition: var(--trans); outline: none;
}
.form-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
.form-input::placeholder { color: var(--grey-600); }
.form-error { font-size: .8rem; color: #ff4d4d; margin-top: 4px; }
.form-hint  { font-size: .8rem; color: var(--grey-400); margin-top: 4px; }
.form-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--grey-600); font-size: .8rem;
}
.form-divider::before, .form-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-layout {
    display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 64px);
}
.dash-sidebar {
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.dash-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px;
    font-size: .875rem; font-weight: 500; color: var(--grey-400);
    transition: var(--trans);
}
.dash-nav-item:hover, .dash-nav-item.active {
    color: var(--white); background: var(--card2);
}
.dash-nav-item.active { color: var(--red); }
.dash-nav-item i { width: 18px; text-align: center; }
.dash-content { padding: 32px; overflow-y: auto; }
.dash-header { margin-bottom: 28px; }
.dash-title { font-family: var(--font-hero); font-size: 1.75rem; font-weight: 800; }
.dash-sub { font-size: .9rem; color: var(--grey-400); margin-top: 4px; }

.stats-cards {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px;
}
.stats-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.stats-card-value { font-family: var(--font-hero); font-size: 1.75rem; font-weight: 800; }
.stats-card-label { font-size: .8rem; color: var(--grey-400); margin-top: 4px; }

/* ============================================================
   PUBLIC PROFILE PAGE
   ============================================================ */
.profile-page {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    padding: 80px 16px 40px;
}
.profile-banner {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
    background-size: cover; background-position: center;
}
.profile-card {
    width: 100%; max-width: 500px;
    background: rgba(15,15,15,0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    overflow: hidden;
}
.profile-top {
    padding: 32px 28px 24px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    position: relative;
}
.profile-avatar-wrap {
    position: relative; width: 88px; height: 88px; margin-bottom: 14px;
}
.profile-avatar {
    width: 88px; height: 88px; border-radius: 50%;
    border: 3px solid var(--red);
    object-fit: cover;
}
.profile-avatar-default {
    width: 88px; height: 88px; border-radius: 50%;
    background: linear-gradient(135deg, var(--red) 0%, #8b00ff 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; border: 3px solid transparent;
}
.profile-verified { position: absolute; bottom: 0; right: 0; color: #1da1f2; font-size: .85rem; }
.profile-name { font-family: var(--font-hero); font-size: 1.4rem; font-weight: 800; }
.profile-username { font-size: .85rem; color: var(--grey-400); margin-top: 2px; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.profile-badge { padding: 3px 8px; border-radius: 6px; font-size: .7rem; font-weight: 700; }
.profile-bio { font-size: .875rem; color: var(--grey-200); margin-top: 12px; line-height: 1.5; }
.profile-views {
    font-size: .75rem; color: var(--grey-600);
    margin-top: 10px; display: flex; align-items: center; gap: 4px;
}
.profile-links {
    padding: 0 20px 24px;
    display: flex; flex-direction: column; gap: 10px;
}
.profile-link {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px; border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    transition: var(--trans); font-size: .9rem; font-weight: 500;
    cursor: pointer;
}
.profile-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.15);
}
.profile-link-icon { width: 24px; text-align: center; font-size: 1.1rem; }
.profile-link-label { flex: 1; }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.leaderboard-table {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.lb-row {
    display: grid; grid-template-columns: 50px 1fr auto;
    align-items: center; gap: 16px; padding: 16px 20px;
    border-bottom: 1px solid var(--border); transition: var(--trans);
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--card2); }
.lb-rank { font-family: var(--font-hero); font-size: 1.1rem; font-weight: 800; color: var(--grey-600); }
.lb-rank.top1 { color: #ffd700; }
.lb-rank.top2 { color: #c0c0c0; }
.lb-rank.top3 { color: #cd7f32; }
.lb-user { display: flex; align-items: center; gap: 12px; }
.lb-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--red), #8b00ff);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; object-fit: cover; flex-shrink: 0;
}
.lb-username { font-weight: 600; }
.lb-name { font-size: .8rem; color: var(--grey-400); }
.lb-views { font-family: var(--font-hero); font-weight: 700; color: var(--red); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.faq-q {
    width: 100%; padding: 18px 20px;
    display: flex; justify-content: space-between; align-items: center;
    background: none; border: none; color: var(--white);
    font-family: var(--font); font-size: .9rem; font-weight: 600;
    cursor: pointer; text-align: left; transition: var(--trans);
}
.faq-q:hover { background: var(--card2); }
.faq-q .arrow { transition: transform .25s ease; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.faq-a-inner { padding: 0 20px 18px; font-size: .875rem; color: var(--grey-400); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 300px; }

/* ============================================================
   TOAST / ALERTS
   ============================================================ */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    padding: 12px 24px; border-radius: 12px;
    font-size: .875rem; font-weight: 600; z-index: 9999;
    animation: toastIn .3s ease both;
    max-width: 90vw; text-align: center;
}
.toast-success { background: #1a3a2a; color: #4ade80; border: 1px solid #2d6a4a; }
.toast-error   { background: #3a1a1a; color: #f87171; border: 1px solid #7a2a2a; }

.alert {
    padding: 12px 16px; border-radius: 10px; font-size: .875rem;
    margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start;
}
.alert-error   { background: #2a1010; border: 1px solid #5a2020; color: #f87171; }
.alert-success { background: #102a1a; border: 1px solid #205a30; color: #4ade80; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
    background: linear-gradient(135deg, rgba(255,0,80,0.1) 0%, rgba(139,0,255,0.1) 100%);
    border: 1px solid rgba(255,0,80,0.2);
    border-radius: var(--radius-lg); padding: 60px 40px;
    text-align: center;
}
.cta-banner h2 { font-family: var(--font-hero); font-size: 2rem; font-weight: 800; }
.cta-banner p { color: var(--grey-400); margin-top: 10px; margin-bottom: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--card); border-top: 1px solid var(--border);
    padding: 60px 0 0;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px 40px;
    display: grid; grid-template-columns: 1fr auto; gap: 60px;
}
.footer-tagline { font-size: .875rem; color: var(--grey-400); margin-top: 10px; max-width: 260px; }
.footer-cols { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: .875rem; font-weight: 700; margin-bottom: 4px; color: var(--white); }
.footer-col a { font-size: .85rem; color: var(--grey-400); transition: var(--trans); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid var(--border); padding: 20px 24px;
    max-width: 1200px; margin: 0 auto;
    font-size: .8rem; color: var(--grey-600);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar { display: none; }
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column; align-items: stretch;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--card); padding: 16px; border-bottom: 1px solid var(--border);
        gap: 6px;
    }
    .nav-burger { display: flex; }
    .hero { padding: 60px 0 50px; }
    .hero-mockup { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { flex-direction: column; gap: 30px; }
    .section { padding: 50px 0; }
    .stats-cards { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-red    { color: var(--red); }
.text-grey   { color: var(--grey-400); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.grid-center { place-items: center; }
.w-full { width: 100%; }
