/* CamX v2 — Dark Theme */

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

:root {
    --bg: #0f0f0f;
    --card: #1a1a1a;
    --border: #2a2a2a;
    --accent: #ff6b35;
    --accent-hover: #ff8555;
    --text: #e0e0e0;
    --text-muted: #999;
    --green: #4caf50;
    --red: #f44336;
    --radius: 8px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ─── Navbar ────────────────────────────────────────────────── */

.navbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.nav-links a:hover {
    color: var(--text);
}

/* ─── Footer ────────────────────────────────────────────────── */

.footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* ─── Stat Grid ─────────────────────────────────────────────── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Badges ────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--border);
    color: var(--text-muted);
}

.badge-status {
    background: var(--text-muted);
    color: var(--bg);
}

.badge-status.online {
    background: var(--green);
    color: #fff;
}

.badge-status.offline {
    background: var(--border);
    color: var(--text-muted);
}

/* ─── Model Header ──────────────────────────────────────────── */

.model-header {
    margin-top: 2rem;
}

.model-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.model-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* ─── Chart ─────────────────────────────────────────────────── */

.model-chart, .compare-chart, .tag-chart {
    margin: 2rem 0;
}

.chart-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    position: relative;
    height: 300px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ─── Sections ──────────────────────────────────────────────── */

section {
    margin: 2rem 0;
}

section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ─── Bio ───────────────────────────────────────────────────── */

.model-bio p {
    color: var(--text);
    line-height: 1.8;
    max-width: 720px;
}

/* ─── Heatmap ───────────────────────────────────────────────── */

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
}

.heatmap-cell {
    background: color-mix(in srgb, var(--accent) var(--intensity, 0%), var(--border));
    border-radius: 3px;
    padding: 0.4rem 0;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    cursor: default;
}

/* ─── Tags ──────────────────────────────────────────────────── */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    color: var(--text);
    transition: border-color 0.2s;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tag-count {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

/* ─── Model Cards ───────────────────────────────────────────── */

.model-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.model-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: border-color 0.2s, transform 0.2s;
}

.model-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-gender {
    margin-right: 0.5rem;
}

.card-gender.female { color: #f48fb1; }
.card-gender.male { color: #64b5f6; }
.card-gender.trans { color: #ce93d8; }
.card-gender.couple { color: #ffb74d; }

.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Compare ───────────────────────────────────────────────── */

.compare-header {
    margin-top: 2rem;
}

.compare-header h1 {
    font-size: 1.75rem;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}

.compare-table th,
.compare-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.compare-table th {
    background: var(--border);
    font-size: 0.85rem;
    font-weight: 600;
}

.compare-table td {
    font-size: 0.9rem;
}

.compare-table td:first-child {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.tags-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.tags-col h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.compare-verdict {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.compare-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ─── CTA Button ────────────────────────────────────────────── */

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.cta-button:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ─── Homepage ──────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
}

.hero-sub {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.live-counter {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--green);
}

.home-section {
    margin: 2.5rem 0;
}

.country-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.country-link {
    display: inline-block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--text);
}

.country-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.country-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.muted {
    color: var(--text-muted);
    font-style: italic;
}

/* ─── Tag Header ────────────────────────────────────────────── */

.tag-header {
    margin-top: 2rem;
}

.tag-header h1 {
    font-size: 1.75rem;
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .model-header h1 {
        font-size: 1.5rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .model-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .heatmap-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .chart-container {
        height: 220px;
    }

    .compare-cta {
        flex-direction: column;
    }
}

@media (max-width: 375px) {
    .model-cards {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        gap: 0.75rem;
    }
}

/* Bio Card */
.bio-card {
    display: flex;
    gap: 1.5rem;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-left: 4px solid #ff6b35;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}
.bio-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.bio-text {
    color: #ccc;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Footer links */
.footer-links {
    margin-top: 0.5rem;
}
.footer-links a {
    color: #ff6b35;
    text-decoration: none;
}
.footer-links a:hover {
    text-decoration: underline;
}

/* Similar Models Grid */
.model-similar .model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* ─── Enhanced Hero ─────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 1rem 2rem;
    background: linear-gradient(180deg, #1a0a00 0%, #0f0f0f 100%);
    border-bottom: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(255,107,53,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,107,53,0.15);
    border: 1px solid rgba(255,107,53,0.3);
    color: #ff6b35;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.hero-accent {
    color: #ff6b35;
}
.hero-sub {
    color: #999;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid #2a2a2a;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #4caf50;
}
.live-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── Platform Stats Bar ────────────────────────────────────── */
.platform-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid #2a2a2a;
    background: #141414;
}
.platform-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    border-right: 1px solid #2a2a2a;
}
.platform-stat:last-child { border-right: none; }
.pstat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
}
.pstat-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Model Card Avatar ─────────────────────────────────────── */
.card-avatar {
    width: 100%;
    height: 6px;
    border-radius: 3px 3px 0 0;
    margin: -1rem -1rem 0.75rem -1rem;
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .platform-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .platform-stat:nth-child(2) { border-right: none; }
    .platform-stat:nth-child(3) { border-right: 1px solid #2a2a2a; }
}

/* ─── Model Header Enhanced ─────────────────────────────────── */
.model-header {
    position: relative;
    padding: 2.5rem 0 1.5rem;
    overflow: hidden;
}
.model-header-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.model-identity {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.model-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 3px solid rgba(255,107,53,0.4);
}
.model-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ─── Stat Card Icons ────────────────────────────────────────── */
.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: block;
}

/* ─── Section Badge ──────────────────────────────────────────── */
.section-badge {
    font-size: 0.75rem;
    background: rgba(255,107,53,0.15);
    color: #ff6b35;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 400;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* ─── Heatmap Legend ─────────────────────────────────────────── */
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #666;
}
.legend-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #1a1a1a, #ff6b35);
    max-width: 120px;
}

/* ─── CTA Enhanced ───────────────────────────────────────────── */
.model-cta {
    margin: 2rem 0;
}
.cta-wrapper {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255,107,53,0.08), transparent);
    border: 1px solid rgba(255,107,53,0.2);
    border-radius: 12px;
}
.cta-desc {
    color: #999;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #ff6b35;
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.cta-button:hover {
    background: #e55a25;
    transform: translateY(-2px);
}
.cta-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}
.pulse {
    box-shadow: 0 0 0 0 rgba(255,107,53,0.4);
    animation: ctaPulse 2s infinite;
}
@keyframes ctaPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,107,53,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255,107,53,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}

/* ─── Home About Section ─────────────────────────────────────── */
.home-about {
    margin: 3rem 0;
    padding: 2rem;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
}
.home-about h2 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    color: #ff6b35;
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.about-block h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}
.about-block p {
    font-size: 0.875rem;
    color: #999;
    line-height: 1.7;
}
