/* Shared stylesheet for all generated stocks/{TICKER}/ pages.
   Extracted from the stocks/index.html template so 135 pages share one
   cached file instead of each inlining ~25KB of identical CSS.
   Edit THIS file (and the template structure in stocks/index.html), then
   re-run: node generate-stock-pages.cjs */

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #080B12;
    color: #fff;
    overflow-x: hidden;
    width: 100%;
    line-height: 1.6;
}

/* NAV */
nav {
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    background: rgba(8, 11, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-img { height: 50px; width: auto; }

.nav-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    max-width: 420px;
    margin: 0 24px;
}

.nav-links { display: flex; gap: 40px; align-items: center; }

.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: #fff; }

.nav-cta {
    padding: 10px 24px;
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
    color: white !important;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(96,165,250,0.3);
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(96,165,250,0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px; height: 44px;
    cursor: pointer;
    z-index: 9999;
    background: rgba(96,165,250,0.9);
    border-radius: 8px;
}

.hamburger span {
    display: block; height: 2px; width: 22px;
    background: #fff; border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -4px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8,11,18,0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-top: 100px;
    padding-bottom: 60px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
}

.mobile-menu a:hover { color: #60A5FA; }
.mobile-menu .nav-cta { padding: 14px 32px; font-size: 18px; margin-top: 16px; }

/* BREADCRUMB */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover { color: rgba(255,255,255,0.8); }

.breadcrumb-sep { color: rgba(255,255,255,0.2); }

.breadcrumb-current { color: rgba(255,255,255,0.6); font-weight: 500; }

/* MAIN CONTENT */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 110px 24px 80px;
}

/* STOCK HEADER */
.stock-header-card {
    position: relative;
    background: linear-gradient(135deg, rgba(96,165,250,0.06) 0%, rgba(74,222,128,0.04) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 28px 28px 24px;
    margin-bottom: 16px;
    overflow: hidden;
}

.stock-header-card::before {
    content: '';
    position: absolute;
    top: -60px; left: -60px;
    width: 260px; height: 260px;
    background: radial-gradient(ellipse, rgba(96,165,250,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.stock-header-card::after {
    content: '';
    position: absolute;
    bottom: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(ellipse, rgba(74,222,128,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.stock-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    z-index: 1;
}

.stock-identity { display: flex; flex-direction: column; gap: 6px; }

.stock-symbol {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stock-name {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

.stock-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.45);
}

.stock-price-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.stock-price {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1;
    color: #fff;
}

.stock-change {
    font-size: 15px;
    font-weight: 600;
    margin-top: 2px;
}

.up { color: #4ADE80; }
.down { color: #ef5350; }

.delayed-label {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    margin-top: 4px;
}

/* CHART CONTAINER */
.chart-wrapper {
    background: #0f0f0f;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.chart-controls {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
}

.range-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.range-btn:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.8); }
.range-btn.active { background: rgba(96,165,250,0.15); border-color: rgba(96,165,250,0.4); color: #60A5FA; }

#chart { width: 100%; height: 300px; }

.chart-disclaimer {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    padding: 8px 16px;
}

/* CTA BANNER */
.cta-banner {
    background: linear-gradient(135deg, rgba(96,165,250,0.12) 0%, rgba(30,83,229,0.08) 100%);
    border: 1px solid rgba(96,165,250,0.25);
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.cta-banner-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.cta-banner-text p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.cta-banner-btns { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

.btn-primary {
    padding: 10px 22px;
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(96,165,250,0.3);
    white-space: nowrap;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(96,165,250,0.4); }

.btn-ghost {
    padding: 10px 22px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-ghost:hover { border-color: rgba(255,255,255,0.3); color: #fff; }

/* KEY STATS */
.section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 32px;
}

.stat-cell {
    background: #0f0f0f;
    padding: 16px 18px;
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.stat-value.na { color: rgba(255,255,255,0.25); font-size: 14px; }

/* COMPANY DESCRIPTION */
.description-section {
    margin-bottom: 32px;
}

.description-text {
    font-size: 15px;
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.description-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.read-more {
    background: none;
    border: none;
    color: #60A5FA;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 4px;
}

.read-more:hover { text-decoration: underline; }

/* BOTTOM CTA */
.bottom-cta {
    text-align: center;
    padding: 48px 24px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    margin-bottom: 40px;
}

.bottom-cta h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}

.bottom-cta p {
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    margin-bottom: 24px;
}

.bottom-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* LOADING / ERROR */
.loading-state, .error-state {
    text-align: center;
    padding: 80px 24px;
    color: rgba(255,255,255,0.4);
}

.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: #60A5FA;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-state h3 { font-size: 20px; margin-bottom: 8px; color: rgba(255,255,255,0.7); }

/* POPULAR STOCKS */
.popular-stocks {
    margin-bottom: 48px;
}

.tickers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tickers-grid a {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.15s;
}

.tickers-grid a:hover {
    background: rgba(96,165,250,0.1);
    border-color: rgba(96,165,250,0.3);
    color: #fff;
}

/* FOOTER */
footer {
    padding: 40px 40px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

.footer-links { margin-bottom: 16px; }

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    margin: 0 12px;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover { color: #60A5FA; }

.footer-disclaimer { font-size: 11px; color: rgba(255,255,255,0.25); margin-bottom: 8px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    nav { padding: 16px 24px; }
    .nav-links { display: none; }
    .nav-search-bar { display: none !important; }
    .hamburger { display: flex; }
}

@media (max-width: 700px) {
    nav { padding: 16px 20px; }
    .container { padding: 90px 16px 60px; }
    .stock-header-card { padding: 20px 18px; }
    .stock-symbol { font-size: 30px; }
    .stock-price { font-size: 32px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stock-header { flex-direction: column; }
    .stock-price-block { text-align: left; align-items: flex-start; }
    #chart { height: 240px; }
}
