:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --text: #171717;
    --text-muted: #737373;
    --text-light: #a3a3a3;

    --accent: #2563eb;
    --accent-light: #dbeafe;

    --reddit: #FF5722;
    --tiktok: #00F2EA;
    --youtube: #FF0000;
    --google: #4285F4;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 8px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

.header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: var(--space-xs);
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    text-align: center;
}

.metric-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -1px;
    margin-bottom: var(--space-xs);
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.topics-highlight {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 16px;
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.section-title-large {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.5px;
}

.section-subtitle-large {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-lg);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.topic-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: var(--space-lg);
    transition: all 0.2s ease;
    cursor: pointer;
}

.topic-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.topic-rank {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(37, 99, 235, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.topic-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.topic-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bar-item {
    display: grid;
    grid-template-columns: 200px 1fr 80px;
    align-items: center;
    gap: var(--space-md);
}

.bar-label {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
}

.distribution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.donut-container {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.donut-svg {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 13px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.legend-value {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    margin-left: auto;
}

.language-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.lang-item {
    display: grid;
    grid-template-columns: 40px 1fr 50px;
    align-items: center;
    gap: var(--space-sm);
}

.lang-code {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lang-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.lang-fill {
    height: 100%;
    background: var(--text);
    border-radius: 3px;
    opacity: 0.3;
    transition: width 0.5s ease;
}

.lang-percent {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.growing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.growing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
}

.growing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.growing-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.growing-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-left: var(--space-sm);
}

.growing-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.content-feed {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.content-item {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.content-item:last-child {
    border-bottom: none;
}

.content-platform {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.platform-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.platform-dot.reddit { background: var(--reddit); }
.platform-dot.tiktok { background: var(--tiktok); }
.platform-dot.youtube { background: var(--youtube); }
.platform-dot.google_maps { background: var(--google); }

.platform-name {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.content-text {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-views {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.footer {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-light);
}

.footer-dot {
    margin: 0 var(--space-sm);
}

.loading {
    color: var(--text-light);
    font-size: 13px;
    text-align: center;
    padding: var(--space-lg);
}

.cta-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.cta-section-top {
    margin-top: var(--space-md);
    margin-bottom: var(--space-xl);
}

.cta-button {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.cta-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--border);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.modal-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.modal-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--accent);
}

.modal-submit {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.modal-submit:hover {
    background: #1d4ed8;
}

.modal-submit:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.modal-success {
    display: none;
    text-align: center;
    color: #16a34a;
    font-weight: 500;
    padding: var(--space-md);
    background: #dcfce7;
    border-radius: var(--radius);
    margin-top: var(--space-md);
}

.modal-success.show {
    display: block;
}

#subscribe-form.hidden {
    display: none;
}

@media (max-width: 768px) {
    .hero-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .section-title-large {
        font-size: 22px;
    }

    .bar-item {
        grid-template-columns: 120px 1fr 60px;
    }

    .content-item {
        grid-template-columns: 60px 1fr 60px;
    }
}
