/* ============================================
   StockPulse - Responsive CSS (Mobile-First)
   ============================================ */

/* ===========================================
   CSS Custom Properties (Design Tokens)
   =========================================== */
:root {
    /* Colors */
    --bg: #0a0a0b;
    --bg-card: #141416;
    --bg-hover: #1c1c1f;
    --border: #27272a;
    --text: #fafafa;
    --text-dim: #a1a1aa;
    --text-muted: #52525b;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --red: #ef4444;
    --yellow: #eab308;
    
    /* Spacing (mobile-first, smaller base) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    
    /* Border radius (soft, rounded - less angular) */
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Typography (mobile-first) */
    --font-xs: 0.75rem;
    --font-sm: 0.85rem;
    --font-base: 0.95rem;
    --font-lg: 1.1rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.75rem;
    --font-4xl: 2rem;
    
    /* Touch targets */
    --touch-min: 44px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Shadows (subtle depth) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);
    
    /* Container widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1100px;
}

/* ===========================================
   Base Reset & Typography
   =========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Safe area for iPhone notch */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===========================================
   Layout Components
   =========================================== */

/* Header - Mobile First */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-lg);
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header__inner {
    max-width: var(--container-xl);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-lg);
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo__icon {
    font-size: 1.25rem;
}

.header__clusters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
    max-width: min(100%, calc(100vw - 120px));
}

.header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header__nav--secondary {
    gap: var(--space-sm);
}

.header__nav-divider {
    width: 1px;
    height: 1.25rem;
    background: var(--border);
    flex-shrink: 0;
}

.header__link--primary {
    font-weight: 600;
    color: var(--text);
}

.header__link {
    color: var(--text-dim);
    font-size: var(--font-sm);
    font-weight: 500;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    padding: var(--space-sm);
}

.header__link:hover {
    color: var(--text);
    text-decoration: none;
}

.lang-switch {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: var(--font-xs);
    font-weight: 600;
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-switch:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

/* Main Content */
.main {
    flex: 1;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: var(--space-lg);
    width: 100%;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: var(--space-xl) var(--space-lg);
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
    text-align: center;
}

.footer__inner {
    max-width: var(--container-xl);
    margin: 0 auto;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.footer__link {
    color: var(--text-dim);
    font-size: var(--font-sm);
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
}

.footer__link:hover {
    color: var(--text);
}

.footer__disclaimer {
    color: var(--text-muted);
    font-size: var(--font-xs);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.footer__producthunt {
    margin: var(--space-lg) auto 0;
}

.footer__producthunt a {
    display: inline-block;
    line-height: 0;
}

.footer__producthunt img {
    display: block;
    max-width: 100%;
    height: auto;
}

.footer__stats {
    margin: var(--space-lg) 0;
}

/* Footer: compact support / feedback */
.footer__support {
    max-width: 420px;
    margin: var(--space-xl) auto var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    text-align: left;
}

.footer__support-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.footer__support-summary::-webkit-details-marker {
    display: none;
}

.footer__support-summary::marker {
    content: "";
}

.footer__support-title {
    margin: 0 0 var(--space-xs);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-dim);
    text-align: center;
}

.footer__support-hint {
    margin: 0;
    font-size: var(--font-xs);
    color: var(--text-muted);
    line-height: 1.45;
    text-align: center;
}

.footer__support[open] .footer__support-hint {
    margin-bottom: var(--space-md);
}

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

.footer__support-kinds {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-xs);
}

.footer__support-kind {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-xs);
    color: var(--text-dim);
    cursor: pointer;
}

.footer__support-kind input {
    accent-color: var(--accent, #6366f1);
}

.footer__support-label {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.footer__support-textarea,
.footer__support-input {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-sm);
    font-family: inherit;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 2.75rem;
}

.footer__support-textarea {
    min-height: 4.5rem;
    line-height: 1.4;
}

.footer__support-textarea:focus,
.footer__support-input:focus {
    outline: none;
    border-color: var(--text-dim);
}

.footer__support-btn {
    align-self: center;
    margin-top: var(--space-xs);
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--font-xs);
    font-weight: 500;
    color: var(--bg, #0a0a0b);
    background: var(--text-dim);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    min-height: var(--touch-min);
}

.footer__support-btn:hover:not(:disabled) {
    background: var(--text);
}

.footer__support-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.footer__support-status {
    margin: var(--space-sm) 0 0;
    min-height: 1.25em;
    font-size: var(--font-xs);
    text-align: center;
}

.footer__support-status--ok {
    color: var(--text-dim);
}

.footer__support-status--error {
    color: #f87171;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    color: var(--accent);
    font-weight: 600;
}

/* ===========================================
   UI Components
   =========================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    background: var(--accent);
    color: #fff;
    font-size: var(--font-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: inherit;
    min-height: var(--touch-min);
    white-space: nowrap;
}

.btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn--secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
}

.card__title {
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Form Elements */
.search-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 16px; /* Prevents iOS zoom on focus */
    font-family: inherit;
    min-height: var(--touch-min);
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-xl);
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(34, 197, 94, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero__title {
    font-size: var(--font-2xl);
    font-weight: 800;
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero__subtitle {
    color: var(--text-dim);
    font-size: var(--font-base);
    max-width: 520px;
    margin: 0 auto var(--space-xl);
    line-height: 1.5;
}

.hero__hint {
    font-size: var(--font-sm);
    color: var(--text-dim);
    margin: calc(-1 * var(--space-md)) 0 var(--space-lg);
}

/* Section Title */
.section-title {
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Grid Systems */
.market-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* VIX card full width on mobile */
.market-grid > .vix-card {
    grid-column: 1 / -1;
}

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

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

/* ===========================================
   Data Display Components
   =========================================== */

/* VIX Card */
.vix-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-card);
}

.vix-card__label {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.vix-card__value {
    font-size: var(--font-3xl);
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.vix-card__level {
    font-size: var(--font-sm);
    font-weight: 600;
}

.vix--low { border-color: var(--accent); }
.vix--low .vix-card__value,
.vix--low .vix-card__level { color: var(--accent); }

.vix--moderate .vix-card__value,
.vix--moderate .vix-card__level { color: var(--yellow); }

.vix--high { border-color: var(--red); }
.vix--high .vix-card__value,
.vix--high .vix-card__level { color: var(--red); }

.vix--extreme {
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}
.vix--extreme .vix-card__value,
.vix--extreme .vix-card__level { color: var(--red); }

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th {
    text-align: left;
    padding: var(--space-sm) var(--space-xs);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: var(--space-sm) var(--space-xs);
    border-bottom: 1px solid var(--border);
    font-size: var(--font-xs);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table__name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.table__price {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    white-space: nowrap;
}

.table__change {
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: right;
}

/* Table wrapper for horizontal scroll on mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Prevent text selection on touch */
.ticker-chip,
.btn,
.price-card {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Price Cards / My Tickers */
.prices-section {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.prices-section .section-title {
    justify-content: center;
}


.price-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 200px;
}

.price-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.price-card__ticker {
    font-size: var(--font-base);
    font-weight: 800;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.price-card__name {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-card__price {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.price-card__change {
    font-size: var(--font-sm);
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    margin-top: var(--space-xs);
}

/* Popular Tickers */
.popular-section {
    margin-top: var(--space-lg);
    text-align: center;
}

.popular-label {
    color: var(--text-dim);
    font-size: var(--font-sm);
    margin-bottom: var(--space-md);
}

.ticker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.ticker-chip {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    font-weight: 600;
    font-size: var(--font-sm);
    transition: all var(--transition-fast);
    min-height: var(--touch-min);
    display: inline-flex;
    align-items: center;
}

.ticker-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* ===========================================
   Stock Page Components
   =========================================== */

/* Breadcrumb */
.breadcrumb {
    font-size: var(--font-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.breadcrumb a {
    color: var(--text-dim);
}

/* Price Hero */
.price-hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.price-hero__ticker {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--accent);
}

.price-hero__name {
    color: var(--text-dim);
    margin-top: var(--space-xs);
}

.price-hero__price {
    font-size: var(--font-3xl);
    font-weight: 700;
}

.price-hero__change {
    font-size: var(--font-lg);
    font-weight: 600;
    margin-top: var(--space-xs);
}

.price-hero__freshness {
    font-size: var(--font-xs);
    color: var(--text-dim);
    margin-top: var(--space-xs);
}

.stock-methodology {
    font-size: var(--font-xs);
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* Verdict Banner (short verdict below price hero) */
.verdict-banner {
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius);
    font-size: var(--font-lg);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
}
.verdict-banner--overbought {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.verdict-banner--oversold {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.verdict-banner--strong_buy {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent);
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.verdict-banner--strong_sell {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.verdict-banner--neutral {
    background: rgba(161, 161, 170, 0.1);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

/* Data Rows */
.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
    gap: var(--space-md);
}

.row:last-child {
    border-bottom: none;
}

.row__label {
    color: var(--text-dim);
    font-size: var(--font-sm);
}

.row__value {
    font-weight: 600;
    font-size: var(--font-sm);
    text-align: right;
}

/* Signal Badge */
.signal {
    display: inline-flex;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    font-weight: 700;
}

.signal--strong-buy {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent);
}

.signal--buy {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent);
}

.signal--neutral {
    background: rgba(161, 161, 170, 0.15);
    color: var(--text-dim);
}

.signal--sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.signal--strong-sell {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red);
}

/* Verdict */
.verdict {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
}

.verdict__label {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.verdict__value {
    font-size: var(--font-base);
    font-weight: 700;
}

.verdict--bullish .verdict__value { color: var(--accent); }
.verdict--bearish .verdict__value { color: var(--red); }
.verdict--neutral .verdict__value { color: var(--yellow); }

/* CTA Section */
.cta-section {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.05) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-xl);
}

.cta-section__title {
    font-size: var(--font-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.cta-section__desc {
    color: var(--text-dim);
    margin-bottom: var(--space-xl);
}

.cta-section__trust {
    font-size: var(--font-sm);
    color: var(--text-dim);
    margin-top: var(--space-md);
    margin-bottom: 0;
}

/* Sticky CTA bar (mobile only) */
.sticky-cta-spacer {
    display: none;
}

.sticky-cta-bar {
    display: none;
}

@media (max-width: 767px) {
    .sticky-cta-spacer {
        display: block;
        height: 64px;
        flex-shrink: 0;
    }

    .sticky-cta-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    }

    .sticky-cta-bar__btn {
        flex: 1;
        padding: var(--space-md) var(--space-lg);
        border-radius: var(--radius);
        font-weight: 600;
        font-size: var(--font-sm);
        text-align: center;
        text-decoration: none;
        transition: background 0.15s, color 0.15s;
    }

    .sticky-cta-bar__btn--primary {
        background: var(--accent);
        color: #fff;
    }

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

    .sticky-cta-bar__btn--secondary {
        background: var(--bg);
        color: var(--text);
        border: 1px solid var(--border);
    }

    .sticky-cta-bar__btn--secondary:hover {
        background: var(--bg-card);
        color: var(--text);
    }
}

/* Other Stocks Section */
.other-section {
    margin-bottom: var(--space-xl);
}

.other-section__title {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
}

/* Not Found Page */
.not-found {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.not-found__icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.not-found__title {
    font-size: var(--font-xl);
    margin-bottom: var(--space-sm);
}

.not-found__desc {
    color: var(--text-dim);
    margin-bottom: var(--space-xl);
}

/* ===========================================
   Ads
   =========================================== */
.ad-slot {
    margin: var(--space-xl) 0;
    text-align: center;
}

.ad-slot--placeholder {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: var(--font-xs);
}

/* ===========================================
   Share Buttons
   =========================================== */
.share-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.share-label {
    color: var(--text-dim);
    font-size: var(--font-sm);
    font-weight: 500;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    transition: all var(--transition-base);
}

.share-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.share-btn--twitter:hover { background: #1DA1F2; color: #fff; }
.share-btn--telegram:hover { background: #0088cc; color: #fff; }
.share-btn--vk:hover { background: #4680C2; color: #fff; }
.share-btn--linkedin:hover { background: #0077B5; color: #fff; }

/* ===========================================
   Utility Classes
   =========================================== */
.text-green { color: var(--accent); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* Hide/Show utilities */
.hide-mobile { display: none; }
.show-mobile { display: block; }
.show-mobile-flex { display: flex; }

/* ===========================================
   MOBILE LAYOUT FIXES (≤ 767px)
   =========================================== */
@media (max-width: 767px) {
    .header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .header__inner {
        flex-wrap: wrap;
        gap: var(--space-sm);
        min-width: 0;
    }
    
    .logo {
        font-size: var(--font-base);
        min-width: 0;
        overflow: hidden;
    }
    
    .logo span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .logo__icon {
        flex-shrink: 0;
        font-size: 1.1rem;
    }
    
    .header__clusters {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
        max-width: none;
    }
    
    .header__nav {
        flex-shrink: 0;
        gap: var(--space-sm);
        align-items: center;
    }
    
    .header__link {
        padding: var(--space-xs);
        font-size: var(--font-xs);
        line-height: 1.2;
    }
    
    .lang-switch {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
        min-width: 36px;
        line-height: 1.2;
        align-items: center;
    }
    
    .main {
        padding: var(--space-md) var(--space-md);
        width: 100%;
        min-width: 0;
    }
    
    .search-form {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .search-form .btn {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .popular-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    
    .ticker-chips {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .hero {
        padding: var(--space-xl) 0;
    }
    
    .hero__title {
        font-size: var(--font-xl);
        word-wrap: break-word;
    }
    
    .hero__subtitle {
        font-size: var(--font-sm);
        max-width: 100%;
    }
    
    .price-hero {
        padding: var(--space-md) var(--space-lg);
    }
    
    .price-hero__ticker {
        font-size: var(--font-xl);
    }
    
    .price-hero__price {
        font-size: var(--font-2xl);
    }
    
    .price-hero__change {
        font-size: var(--font-base);
    }
    
    .verdict-banner {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-base);
    }
    
    .card {
        padding: var(--space-md);
    }
    
    .row {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .row__label {
        flex: 0 0 auto;
    }
    
    .row__value {
        flex: 1 1 100%;
        text-align: left;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .share-buttons {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .share-btn {
        width: 44px;
        height: 44px;
    }
    
    .cta-section {
        padding: var(--space-xl) var(--space-md);
    }
    
    .cta-section__title {
        font-size: var(--font-lg);
    }
    
    .footer {
        padding: var(--space-lg) var(--space-md);
    }
    
    .footer__links {
        gap: var(--space-md);
    }
    
    .data-table {
        min-width: 300px;
    }
}

/* ===========================================
   SMALL MOBILE FIXES (< 375px)
   =========================================== */
@media (max-width: 374px) {
    :root {
        --space-lg: 12px;
        --space-xl: 16px;
        --font-2xl: 1.25rem;
        --font-3xl: 1.5rem;
    }
    
    .hero__title {
        font-size: 1.4rem;
    }
    
    .hero__subtitle {
        font-size: 0.9rem;
    }
    
    .price-card {
        padding: var(--space-sm);
    }
    
    .price-card__ticker {
        font-size: 0.9rem;
    }
    
    .price-card__price {
        font-size: 1rem;
    }
    
    .ticker-chip {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9rem;
    }
    
    .vix-card__value {
        font-size: 1.5rem;
    }
    
    .data-table th,
    .data-table td {
        padding: var(--space-sm);
        font-size: 0.75rem;
    }
}

/* ===========================================
   TABLET BREAKPOINT (768px+)
   =========================================== */
@media (min-width: 768px) {
    :root {
        --space-lg: 20px;
        --space-xl: 32px;
        --space-2xl: 48px;
        
        --font-base: 1rem;
        --font-lg: 1.15rem;
        --font-xl: 1.35rem;
        --font-2xl: 1.75rem;
        --font-3xl: 2rem;
        --font-4xl: 2.5rem;
    }
    
    .header {
        padding: var(--space-lg) var(--space-xl);
    }
    
    .logo {
        font-size: var(--font-xl);
    }
    
    .logo__icon {
        font-size: 1.5rem;
    }
    
    .main {
        padding: var(--space-xl);
    }
    
    .hero {
        padding: var(--space-2xl) 0;
    }
    
    .hero__title {
        font-size: var(--font-3xl);
    }
    
    
    /* Market grid stays 1 column on tablet */
    .market-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables get more space on tablet */
    .data-table th {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-xs);
    }
    
    .data-table td {
        padding: var(--space-md);
        font-size: var(--font-sm);
    }
    
    .table__name {
        max-width: none;
    }
    
    .table__price,
    .table__change {
        font-size: var(--font-sm);
    }
    
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prices-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Price hero side by side */
    .price-hero {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
    
    .price-hero__price,
    .price-hero__change {
        text-align: right;
    }
    
    /* Utility show/hide */
    .hide-mobile { display: block; }
    .hide-tablet { display: none; }
    .show-mobile { display: none; }
}

/* ===========================================
   DESKTOP BREAKPOINT (1024px+)
   =========================================== */
@media (min-width: 1024px) {
    :root {
        --space-xl: 40px;
        --space-2xl: 56px;
        --space-3xl: 72px;
        
        --font-xl: 1.5rem;
        --font-2xl: 2rem;
        --font-3xl: 2.5rem;
        --font-4xl: 3rem;
    }
    
    .main {
        padding: var(--space-2xl) var(--space-xl);
    }
    
    /* Search form horizontal on desktop only (keeps full placeholder on mobile/tablet) */
    .search-form {
        flex-direction: row;
    }
    
    .search-form .search-input {
        flex: 1;
        min-width: 0;
    }
    
    .search-form .btn {
        width: auto;
    }
    
    .hero {
        padding: var(--space-3xl) 0 var(--space-2xl);
    }
    
    .hero__title {
        font-size: var(--font-4xl);
    }
    
    /* Market grid: VIX + 2 tables side by side */
    .market-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .market-grid > .vix-card {
        grid-column: 1 / -1;
    }
    
    .analysis-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .prices-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    /* Cards get more padding */
    .card {
        padding: var(--space-xl);
    }
    
    .price-hero {
        padding: var(--space-2xl);
    }
    
    .price-hero__ticker {
        font-size: var(--font-2xl);
    }
    
    .price-hero__price {
        font-size: var(--font-4xl);
    }
    
    /* Utility show/hide */
    .hide-tablet { display: block; }
    .hide-desktop { display: none; }
}

/* ===========================================
   Large Desktop (1200px+)
   =========================================== */
@media (min-width: 1200px) {
    /* Market grid: VIX full width, tables side by side */
    .market-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .market-grid > .vix-card {
        grid-column: auto;
    }
}

/* ===========================================
   Extra Large Desktop (1280px+)
   =========================================== */
@media (min-width: 1280px) {
    .prices-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===========================================
   Accessibility & Touch Improvements
   =========================================== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .price-card:hover {
        transform: none;
    }
    
    .share-btn:hover {
        transform: none;
    }
}

/* Focus states for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================================
   Print Styles
   =========================================== */
@media print {
    .header,
    .footer,
    .ad-slot,
    .share-buttons,
    .cta-section {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .card {
        border: 1px solid #ccc;
        background: #fff;
    }
}
