/* ==========================================================================
   Global Styles - Adanos Software
   ========================================================================== */

/* Self-hosted fonts */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Colors - Text */
    --c-text: #1a1a1a;
    --c-text-secondary: #444;
    --c-muted: #888;
    --c-light: #999;
    --c-dim: #aaa;
    --c-white: #fff;

    /* Colors - Semantic */
    --c-green: #2e7d32;
    --c-red: #c62828;
    --c-blue: #1565c0;
    --c-bg: #f8f7f4;
    --c-bg-gradient: #f0efec;

    /* Colors - Borders */
    --c-border: #e8e8e8;
    --c-border-light: #f0f0f0;
    --c-border-medium: #ddd;
    --c-border-dark: #333;

    /* Colors - States */
    --c-bg-hover: #f5f5f5;
    --c-success: #10b981;
    --c-warning: #d97706;
    --c-error-bg: #fef2f2;
    --c-error-border: #fecaca;
    --c-error-text: #dc2626;

    /* Colors - Code Display */
    --c-code-bg: #f8fafc;
    --c-code-border: #e2e8f0;
    --c-code-text: #d4d4d4;
    --c-code-block: #0a0a0a;

    /* Colors - Status Backgrounds */
    --c-status-live: #e8f5e9;
    --c-status-oss: #e3f2fd;

    /* Fonts */
    --font-sans: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Sizing */
    --max-width: 1200px;
    --radius: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

/* Base */
body {
    font-family: var(--font-sans);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 16px 48px;
    background: rgba(248,247,244,0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-inner {
    max-width: calc(var(--max-width) - 96px);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.logo a { color: var(--c-text); text-decoration: none; }

.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link { font-size: 15px; color: var(--c-muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--c-text); }

.nav-btn {
    font-size: 15px;
    color: var(--c-white);
    background: var(--c-text);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--c-text);
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-btn:hover { background: #000; border-color: #000; }

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--c-text);
    background: var(--c-bg);
    border: 1px solid var(--c-border-medium);
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 20px;
    font-family: inherit;
    transition: all 0.2s;
}

.nav-dropdown-toggle:hover {
    background: var(--c-text);
    color: var(--c-white);
    border-color: var(--c-text);
}

.nav-dropdown-toggle:hover .nav-dropdown-icon {
    stroke: var(--c-white);
}

.nav-dropdown-icon {
    transition: transform 0.2s;
}

.nav-dropdown:focus-within .nav-dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
    z-index: 200;
    overflow: hidden;
}

.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    text-decoration: none;
    transition: background 0.15s;
}

.nav-dropdown-item:hover { background: var(--c-bg); }

.nav-dropdown-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-dropdown-icon-wrap svg {
    width: 26px;
    height: 26px;
    fill: var(--c-white);
}

.nav-dropdown-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-dropdown-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text);
}

.nav-dropdown-desc {
    font-size: 13px;
    color: var(--c-muted);
}

.external-icon {
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.5;
}

/* Mobile Navigation Toggle */
#nav-mobile-checkbox {
    display: none;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-mobile-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--c-text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

#nav-mobile-checkbox:checked ~ .nav-inner .nav-mobile-toggle .nav-mobile-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#nav-mobile-checkbox:checked ~ .nav-inner .nav-mobile-toggle .nav-mobile-bar:nth-child(2) {
    opacity: 0;
}

#nav-mobile-checkbox:checked ~ .nav-inner .nav-mobile-toggle .nav-mobile-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.nav-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-white);
    border-top: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 24px;
}

#nav-mobile-checkbox:checked ~ .nav-mobile-menu {
    display: block;
}

.nav-mobile-section {
    margin-bottom: 20px;
}

.nav-mobile-section:last-child { margin-bottom: 0; }

.nav-mobile-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-light);
    margin-bottom: 12px;
}

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-size: 15px;
    color: var(--c-text);
    text-decoration: none;
    border-bottom: 1px solid var(--c-border-light);
}

.nav-mobile-btn {
    display: block;
    text-align: center;
    font-size: 15px;
    color: var(--c-white);
    background: var(--c-text);
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 6px;
}

.nav-mobile-link:last-child { border-bottom: none; }
.nav-mobile-link:hover { color: var(--c-muted); }

.nav-mobile-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Icon colors (shared between desktop dropdown and mobile menu) */
.reddit { background: #FF4500; }
.x { background: #000; }
.stockalert { background: #215BD8; }

.nav-mobile-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--c-white);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--c-text);
    color: var(--c-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: var(--c-white);
    color: var(--c-text);
    border: 1px solid var(--c-border-medium);
}

.btn-secondary:hover {
    background: var(--c-bg-hover);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================================================
   Sections
   ========================================================================== */

section {
    padding: 48px;
    max-width: var(--max-width);
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-light);
    margin-bottom: 12px;
}

.section-label-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.section-label-row .section-label {
    margin-bottom: 0;
}

section h2 {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}

section > p {
    color: var(--c-text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 600px;
}

/* ==========================================================================
   Pulse Animation
   ========================================================================== */

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.pulse-dot {
    --pulse-size: 8px;
    width: var(--pulse-size);
    height: var(--pulse-size);
    background: var(--c-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}
.pulse-dot--sm { --pulse-size: 6px; }

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
    background: var(--c-text);
    color: var(--c-white);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    margin: 0 48px 48px;
    max-width: 1104px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 80px;
}

.contact-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.contact-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.contact-section > * { position: relative; z-index: 1; }
.contact-section h2 { color: var(--c-white); margin-bottom: 16px; }
.contact-section p { color: var(--c-muted); margin-bottom: 32px; }
.contact-section .section-label { color: var(--c-muted); }

.contact-section a {
    color: var(--c-white);
    font-size: 24px;
    text-decoration: none;
    border-bottom: 2px solid var(--c-text-secondary);
    padding-bottom: 4px;
    transition: border-color 0.2s;
}
.contact-section a:hover { border-color: var(--c-white); }
.contact-section a.contact-link { font-size: 20px; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    padding: 80px 48px 48px;
    background: var(--c-text);
    color: var(--c-muted);
    font-size: 13px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    max-width: calc(var(--max-width) - 96px);
    margin: 0 auto 48px;
}

.footer-col h4 {
    color: var(--c-white);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-col p { margin: 6px 0; line-height: 1.6; }
.footer-col a { color: var(--c-muted); text-decoration: none; }
.footer-col a:hover { color: var(--c-white); }

.footer-bottom {
    max-width: calc(var(--max-width) - 96px);
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid var(--c-border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-green {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-green svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Homepage - Hero
   ========================================================================== */

.hero-wrapper {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-gradient) 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 48px 120px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 32px;
}

.hero h1 > span { color: var(--c-text); }

.rotating-text {
    position: relative;
    padding-right: 8px;
}

.rotating-text::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 3px;
    background: var(--c-text);
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero p {
    font-size: 20px;
    color: var(--c-text-secondary);
    max-width: 700px;
    margin-bottom: 48px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-muted);
    margin-bottom: 24px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--c-light);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg { width: 20px; height: 20px; stroke: var(--c-light); }

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Floating data */
.data-float {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(0,0,0,0.35);
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ==========================================================================
   Homepage - Chart
   ========================================================================== */

.chart-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 50%;
    opacity: 0.6;
}

.chart-line {
    fill: none;
    stroke: var(--c-text);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-area { fill: url(#chartGradient); }

.candle { animation-delay: var(--delay, 0s); }
.candle-body { animation: candlePulse 4s ease-in-out infinite; animation-delay: inherit; }
.candle-wick { stroke-width: 2; }
.candle-green .candle-body { fill: var(--c-green); }
.candle-green .candle-wick { stroke: var(--c-green); }
.candle-red .candle-body { fill: var(--c-red); }
.candle-red .candle-wick { stroke: var(--c-red); }

@keyframes candlePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ==========================================================================
   Homepage - Products
   ========================================================================== */

section#about { padding-top: 32px; }

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

.product-card {
    background: var(--c-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--c-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}

.product-status {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.status-live { background: var(--c-status-live); color: var(--c-green); }
.status-dev { background: var(--c-bg-hover); color: var(--c-muted); }
.status-oss { background: var(--c-status-oss); color: var(--c-blue); }

.product-card h3 { font-size: 24px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.02em; }
.product-card p { color: var(--c-text-secondary); font-size: 15px; margin-bottom: 24px; }
.product-card ul { list-style: none; margin-bottom: 24px; }
.product-card li { padding: 8px 0; font-size: 14px; color: var(--c-text-secondary); border-bottom: 1px solid var(--c-border-light); }
.product-card a { color: var(--c-text); font-weight: 500; font-size: 14px; text-decoration: none; }
.product-card a:hover { text-decoration: underline; }

/* ==========================================================================
   Homepage - About
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text p { font-size: 18px; color: var(--c-text-secondary); margin-bottom: 24px; }

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.stat {
    text-align: center;
    padding: 32px;
    background: var(--c-white);
    border-radius: 12px;
    border: 1px solid var(--c-border);
}

.stat-number { font-size: 48px; font-weight: 700; letter-spacing: -0.03em; color: var(--c-text); }
.stat-label { font-size: 13px; color: var(--c-light); margin-top: 8px; }

.infra { margin-top: 48px; }
.infra-logos { display: flex; align-items: center; gap: 20px }
.infra-logos img { height: 60px; border-radius: 8px; filter: grayscale(100%); transition: all 0.2s; }
.infra-logos img:hover { opacity: 0.8; filter: grayscale(0%); }

/* ==========================================================================
   Sentiment Pages - Hero (Reddit & X)
   ========================================================================== */

.page-sentiment .hero {
    position: relative;
    padding: 160px 48px 80px;
    min-height: auto;
    overflow: hidden;
}

.hero-logo {
    position: absolute;
    right: 0;
    top: 60%;
    transform: translateY(-50%);
    width: 480px;
    height: 480px;
    opacity: 0.7;
    z-index: 2;
}

.page-x .hero-logo { opacity: 1; }

.page-sentiment .hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.1;
    margin-bottom: 24px;
}

.page-sentiment .hero p {
    max-width: 600px;
    margin-bottom: 32px;
}

.hero-ticker {
    position: absolute;
    bottom: 0;
    left: 48px;
    right: 500px;
    overflow: hidden;
    z-index: 1;
    mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}

.hero-ticker-content {
    display: flex;
    gap: 48px;
    animation: heroTicker 25s linear infinite;
    width: max-content;
}

.ticker-logo {
    width: 48px;
    min-width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

@keyframes heroTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.page-sentiment section { padding: 48px; }
.page-sentiment section#trending { padding-bottom: 24px; }
.page-sentiment section h2 { font-size: 36px; margin-bottom: 16px; }

/* ==========================================================================
   Reddit Sentiment - Trending Table
   ========================================================================== */

.trending-section {
    background: var(--c-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--c-border);
    padding: 48px;
    overflow-x: clip;
}

.trending-header {
    margin-bottom: 20px;
}

.trending-header h2 { margin-bottom: 0; }

.trending-hint {
    color: var(--c-muted);
    font-size: 14px;
    margin: 20px 0 0;
}

.update-info {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-light);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stock-table { width: 100%; border-collapse: collapse; }

.stock-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-light);
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
}

.stock-table td {
    padding: 16px;
    border-bottom: 1px solid var(--c-border-light);
    font-size: 14px;
}

.stock-table tbody tr:nth-child(even) { background: var(--c-bg); }
.stock-table tbody tr:hover { background: #fafafa; }
.stock-table tbody tr:last-child td { border-bottom: none; }

.stock-table .rank { font-family: var(--font-mono); color: var(--c-light); width: 40px; }
.stock-table .ticker { font-family: var(--font-mono); font-weight: 400; color: var(--c-text); }
.stock-table .company { color: var(--c-text-secondary); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-table .mentions { font-family: var(--font-mono); }
.stock-table .mentions-subs { color: var(--c-muted); }

/* Table Header Tooltips (CSS-only) */
.stock-table th.has-tooltip {
    position: relative;
    cursor: help;
}

.stock-table th.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-text);
    color: var(--c-white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 140px;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
}

.stock-table th.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.sentiment-bar { display: flex; align-items: center; gap: 12px; }
.sentiment-value { font-family: var(--font-mono); font-weight: 400; min-width: 45px; }
.sentiment-value.positive { color: var(--c-green); }
.sentiment-value.negative { color: var(--c-red); }
.sentiment-value.neutral { color: var(--c-muted); }

.bar-container {
    flex: 1;
    height: 6px;
    background: var(--c-border-light);
    border-radius: 3px;
    overflow: hidden;
    max-width: 120px;
}

.bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.bar-fill.positive { background: var(--c-green); }
.bar-fill.negative { background: var(--c-red); }
.bar-fill.neutral { background: var(--c-light); }

/* Validation icons */
.validated-icon { font-weight: 600; }
.validated-icon.yes { color: var(--c-green); }
.validated-icon.no { color: var(--c-muted); }

.trend-indicator { font-size: 16px; font-weight: 600; }
.trend-indicator.up { color: var(--c-green); }
.trend-indicator.down { color: var(--c-red); }
.trend-indicator.flat { color: var(--c-light); }

/* ==========================================================================
   Reddit Sentiment - API Documentation
   ========================================================================== */

.docs-section {
    background: var(--c-text);
    color: var(--c-white);
    max-width: none;
    padding: 48px;
}

.docs-inner {
    max-width: calc(var(--max-width) - 96px);
    margin: 0 auto;
}

.docs-section .section-label { color: var(--c-light); }
.docs-section h2 { color: var(--c-white); }
.docs-section > .docs-inner > p { color: var(--c-muted); margin-bottom: 32px; }
.docs-section > .docs-inner > p code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
}

/* Docs Info Grid */
.docs-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
}

.docs-info-item h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.docs-info-item code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--c-white);
}

.docs-info-item span {
    font-size: 13px;
    color: var(--c-white);
}

/* Endpoint Selector */
.endpoint-selector {
    margin-bottom: 24px;
}

.endpoint-selector label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-light);
    margin-bottom: 8px;
}

.endpoint-selector select {
    width: 100%;
    max-width: 320px;
    padding: 12px 16px;
    padding-right: 40px;
    font-family: var(--font-mono);
    font-size: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    color: var(--c-white);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.endpoint-selector select:hover,
.endpoint-selector select:focus {
    border-color: rgba(255,255,255,0.3);
    outline: none;
}

/* Endpoints */
.endpoint {
    display: none;
    padding: 32px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
}

.endpoint.active { display: block; }

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.endpoint-header code {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--c-white);
}

.method {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.method.get { background: var(--c-green); color: var(--c-white); }

.endpoint-desc {
    color: var(--c-dim);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.endpoint h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-light);
    margin: 24px 0 12px;
    font-weight: 500;
}

.endpoint h4:first-of-type { margin-top: 0; }

/* Params Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.params-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: top;
}

.params-table td:first-child {
    width: 160px;
    color: var(--c-white);
}

.params-table td:last-child { color: var(--c-dim); }

.params-table code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--c-border-light);
}

/* Code Blocks */
.endpoint pre {
    background: var(--c-code-block);
    border-radius: var(--radius);
    padding: 16px 20px;
    overflow-x: auto;
    margin-bottom: 8px;
}

.endpoint pre code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--c-code-text);
    line-height: 1.6;
}

/* ==========================================================================
   Reddit Sentiment - API Section
   ========================================================================== */

.api-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.api-info h2 { margin-bottom: 24px; line-height: 1.2; }
.api-info p { margin-bottom: 16px; color: var(--c-text-secondary); }

.api-features { list-style: none; margin: 24px 0; }

.api-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}
.api-features li:last-child { border-bottom: none; }

.api-features li::before { content: "\2713"; color: var(--c-green); font-weight: 600; }
.api-features a { color: var(--c-text); text-decoration: underline; text-underline-offset: 2px; }
.api-features a:hover { color: var(--c-text-secondary); }

.api-form-card {
    background: var(--c-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    padding: 40px;
}

.api-form-card h3 { font-size: 20px; margin-bottom: 8px; }
.api-form-card > p { color: var(--c-text-secondary); font-size: 14px; margin-bottom: 24px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--c-border-medium);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--c-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    color: var(--c-text);
    cursor: pointer;
    /* Safari iOS fix: reset native border-radius then apply custom */
    border-radius: 0;
    border-radius: var(--radius);
}

.form-checkbox {
    margin-bottom: 24px;
}

.form-checkbox label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--c-text-secondary);
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
}

.checkbox-label span {
    line-height: 1.4;
}

.checkbox-label a {
    color: var(--c-text);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--c-muted);
}

.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--c-text); }

.form-submit { width: 100%; margin-top: 8px; }

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--c-border-medium);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    resize: vertical;
    min-height: 80px;
}
.form-group textarea:focus { outline: none; border-color: var(--c-text); }

.form-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--c-error-bg);
    border: 1px solid var(--c-error-border);
    border-radius: var(--radius);
    color: var(--c-error-text);
    font-size: 14px;
}

.api-success {
    text-align: center;
    padding: 24px 0;
}
.api-success .success-icon {
    width: 48px;
    height: 48px;
    background: var(--c-success);
    color: var(--c-white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}
.api-success h4 {
    font-size: 18px;
    margin-bottom: 8px;
}
.api-success .warning {
    color: var(--c-warning);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}
.api-key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--c-code-bg);
    border: 1px solid var(--c-code-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}
.api-key-display code {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--c-text);
    word-break: break-all;
    text-align: left;
}
.btn-copy {
    padding: 8px 16px;
    background: var(--c-text);
    color: var(--c-white);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-copy:hover { background: var(--c-border-dark); }
.btn-copy.copied { background: var(--c-success); }
.rate-limit-info {
    font-size: 13px;
    color: var(--c-muted);
}
.rate-limit-info strong { color: var(--c-text); }

/* ==========================================================================
   Reddit Sentiment - Enterprise Features (in contact section)
   ========================================================================== */

.enterprise-features {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.enterprise-features li {
    color: var(--c-white);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enterprise-features li::before {
    content: "";
    width: 20px;
    height: 20px;
    background: var(--c-success);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Reddit Sentiment - FAQ
   ========================================================================== */

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

.faq-item {
    background: var(--c-white);
    border-radius: 12px;
    border: 1px solid var(--c-border);
    padding: 40px;
}

.faq-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.faq-item p { color: var(--c-text-secondary); font-size: 14px; line-height: 1.7; }

.faq-item code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--c-bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   Legal Pages (Privacy, Terms)
   ========================================================================== */

.page-legal section.legal-content {
    padding: 160px 48px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.page-legal {
    background: var(--c-bg);
}

.page-legal section.legal-content h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.legal-updated {
    color: var(--c-muted);
    font-size: 14px;
    margin-bottom: 48px;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--c-border);
}

.legal-section:first-of-type h2 {
    border-top: none;
    padding-top: 0;
}

.legal-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.legal-section p {
    color: var(--c-text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-section ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-section li {
    color: var(--c-text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal-section a {
    color: var(--c-text);
    text-decoration: underline;
}

.legal-section a:hover {
    color: var(--c-muted);
}

.legal-section strong {
    font-weight: 600;
    color: var(--c-text);
}

@media (max-width: 768px) {
    .page-legal section.legal-content {
        padding: 120px 20px 48px;
    }
    .page-legal section.legal-content h1 {
        font-size: 32px;
    }
    .legal-section h2 {
        font-size: 20px;
    }
}

/* ==========================================================================
   Tablet Styles
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-logo { opacity: 0.08; }
    .hero-ticker { right: 200px; }
}

/* ==========================================================================
   Mobile Styles
   ========================================================================== */

@media (max-width: 768px) {
    /* Nav */
    nav { padding: 14px 20px; }
    .nav-btn { padding: 6px 12px; font-size: 12px; }
    .nav-left .nav-dropdown { display: none; }
    .nav-right { display: none; }
    .nav-mobile-toggle { display: flex; }

    /* General */
    section { padding: 32px 20px; }
    section h2 { font-size: 26px; margin-bottom: 24px; }
    .section-label { margin-bottom: 8px; }

    /* Homepage Hero */
    .hero { padding: 60px 20px 80px; }
    .hero h1 { font-size: 38px; margin-bottom: 16px; }
    .hero p { font-size: 20px; margin-bottom: 0; }
    .live-indicator { margin-bottom: 16px; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { text-align: center; }
    .data-float { display: none; }
    .chart-container { height: 35%; opacity: 0.3; }

    /* Products */
    section#about { padding-top: 24px; }
    .products-grid { grid-template-columns: 1fr; gap: 16px; }
    .product-card { padding: 20px; }
    .product-card h3 { font-size: 18px; }
    .product-card ul { margin-bottom: 12px; }
    .product-card li { padding: 6px 0; font-size: 13px; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 24px; }
    .about-text p { font-size: 14px; margin-bottom: 12px; }
    .infra { margin-top: 24px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat { padding: 16px; }
    .stat-number { font-size: 28px; }
    .stat-label { font-size: 11px; }

    /* Contact */
    .contact-section { margin: 0 20px 40px; padding: 28px 20px; border-radius: 12px; }
    .contact-section h2 { font-size: 24px; }
    .contact-section p { margin-bottom: 16px; font-size: 14px; }
    .contact-section a { font-size: 15px; }

    /* Footer */
    footer { padding: 32px 20px 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
    .footer-col h4 { margin-bottom: 8px; font-size: 11px; }
    .footer-col p { margin: 3px 0; font-size: 11px; }
    .footer-bottom { padding-top: 16px; font-size: 11px; }

    /* Sentiment Pages (Reddit & X) */
    .page-sentiment .hero { padding: 120px 20px 80px; }
    .hero-logo { width: 280px; height: 280px; right: -40px; top: 40%; opacity: 0.08; }
    .page-x .hero-logo { opacity: 0.08; }
    .hero-ticker { bottom: 0; left: 20px; right: 0; }
    .ticker-logo { width: 40px; min-width: 40px; height: 40px; }
    .page-sentiment .hero h1 { font-size: 32px; }
    .page-sentiment .hero p { font-size: 16px; }
    .page-sentiment section { padding: 32px 20px; }
    .page-sentiment section h2 { font-size: 28px; line-height: 1.2; }

    .trending-section { padding: 20px; border-radius: var(--radius-lg); }
    .section-label-row { flex-wrap: wrap; margin-bottom: 16px; }
    .stock-table { font-size: 12px; }
    .stock-table th, .stock-table td { padding: 10px 6px; }
    .stock-table th:nth-child(3), .stock-table td:nth-child(3) { display: none; } /* Hide Buzz */
    .stock-table .bar-container { display: none; }
    .stock-table .rank { width: 28px; }
    .stock-table .mentions-full { display: none; }
    .sentiment-bar { gap: 0; }
    .sentiment-value { min-width: 38px; font-size: 12px; }

    .api-section { grid-template-columns: 1fr; gap: 20px; }
    .api-features { margin: 16px 0; }
    .api-features li { padding: 10px 0; }
    .api-form-card { padding: 20px; }

    .faq-grid { grid-template-columns: 1fr; gap: 16px; }
    .faq-item { padding: 20px; }

    .enterprise-features { flex-direction: column; gap: 12px; align-items: center; }

    .docs-section { padding: 32px 20px; }
    .docs-inner { max-width: none; }
    .docs-info { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
    .docs-info-item code, .docs-info-item span { font-size: 12px; }
    .endpoint-selector select { max-width: 100%; }
    .endpoint { padding: 20px; }
    .endpoint-header code { font-size: 14px; }
    .endpoint pre { padding: 16px; }
    .endpoint pre code { font-size: 11px; }
    .params-table td { padding: 8px; font-size: 12px; }
    .params-table td:first-child { width: 120px; }

    .page-sentiment .contact-section { margin: 0 20px 40px; padding: 32px 20px; border-radius: var(--radius-lg); }
}
