/* ============================================================
   AlpharvestPro .win Ghost Theme — v1.0.0
   Taiwan & Hong Kong Stock Analysis
   Design reference: alpharvestpro.com (homepage-alpharvest.php V5.0.0)
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,400;1,500;1,600&family=Noto+Sans+TC:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    /* Primary palette (matches alpharvestpro.com) */
    --primary-color: #c41e3a;
    --secondary-color: #8b0000;
    --accent-blue: #1976d2;
    --accent-green: #4CAF50;
    --accent-orange: #FF9800;
    --accent-gold: #FFD700;
    --accent-purple: #7c3aed;
    --accent-cyan: #39bae6;

    /* Gradients */
    --public-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --members-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --vip-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --diagnostic-gradient: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1a4a6e 100%);

    /* Text */
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #666666;
    --text-dim: #888888;

    /* Backgrounds */
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --bg-dark: #0a0e14;
    --bg-card-dark: #0d1117;

    /* Borders & shadows */
    --border-color: #e0e0e0;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --subtle-shadow: 0 1px 4px rgba(0,0,0,0.05);

    /* Terminal Pro Dark (for dashboard/reports embedded sections) */
    --terminal-bg: #0a0e14;
    --terminal-card: #0d1117;
    --terminal-border: #1c2333;
    --terminal-amber: #e6b450;
    --terminal-cyan: #39bae6;
    --terminal-text: #b3b1ad;
    --terminal-green: #7fd962;
    --terminal-red: #ff3333;
    --terminal-orange: #ffb454;
    --terminal-purple: #d4a5ff;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

/* ============================================================
   BILINGUAL TOGGLE (ZH-TW / EN)
   ============================================================ */
.lang-zh { display: inline; }
.lang-en { display: none; }
body.show-english .lang-zh { display: none; }
body.show-english .lang-en { display: inline; }

/* Block-level bilingual elements */
.lang-block-zh { display: block; }
.lang-block-en { display: none; }
body.show-english .lang-block-zh { display: none; }
body.show-english .lang-block-en { display: block; }

.language-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background: rgba(255,255,255,0.95);
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.lang-btn {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.85em;
    font-family: inherit;
    transition: all 0.3s;
    color: var(--text-dark);
}

.lang-btn:hover {
    background: var(--bg-light);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.site-title {
    font-family: 'Playfair Display', 'Times New Roman', Georgia, serif;
    font-style: italic;
    font-size: 3em;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: 2px;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-title a:hover {
    color: inherit;
    text-decoration: none;
}

.site-title-suffix {
    font-size: 0.4em;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0;
    font-style: normal;
    vertical-align: baseline;
}

.site-tagline {
    font-size: 0.95em;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 400;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-navigation {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 15px 25px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

/* Reports links — members-only */
.nav-menu .members-link a {
    position: relative;
}

.nav-menu .members-link a::after {
    content: '\1F513';
    font-size: 0.7em;
    margin-left: 4px;
    vertical-align: super;
}

.nav-menu .members-link.logged-in a::after {
    content: '';
}

/* VIP link */
.nav-menu .vip-link a {
    color: var(--accent-gold);
    font-weight: 600;
}

.nav-menu .vip-link a:hover {
    color: #FFC107;
    border-bottom-color: var(--accent-gold);
}

/* Latest Reports link — public */
.nav-menu .latest-link a {
    color: var(--accent-purple);
    font-weight: 600;
}

.nav-menu .latest-link a:hover {
    color: #9333ea;
    border-bottom-color: var(--accent-purple);
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5em;
    color: var(--text-dark);
}

/* ============================================================
   USER STATUS BAR
   ============================================================ */
.user-status-bar {
    background: linear-gradient(90deg, #2d3748 0%, #4a5568 100%);
    color: white;
    text-align: center;
    padding: 8px 20px;
    font-size: 0.85em;
}

.user-status-bar a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

.user-status-bar a:hover {
    text-decoration: underline;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ============================================================
   ACCESS LEVEL BADGES
   ============================================================ */
.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-badge.public {
    background: var(--public-gradient);
    color: white;
}

.access-badge.members {
    background: var(--members-gradient);
    color: white;
}

.access-badge.vip {
    background: var(--vip-gradient);
    color: white;
}

/* ============================================================
   SECTION HEADERS (shared pattern)
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    font-size: 1.3em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   DAILY MARKET SUMMARY
   ============================================================ */
.market-summary-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.market-summary-section h2 {
    font-size: 1.2em;
    margin: 0 0 20px 0;
    text-align: center;
    color: var(--text-dark);
}

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

.summary-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid;
    box-shadow: var(--subtle-shadow);
}

.summary-card.tw-summary {
    border-left-color: var(--primary-color);
}

.summary-card.hk-summary {
    border-left-color: var(--accent-blue);
}

.summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.summary-card-header h3 {
    font-size: 1em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-date {
    font-size: 0.75em;
    color: var(--text-dim);
    background: var(--bg-light);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Accordion subsections */
.summary-subsection {
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.summary-subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-light);
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-dark);
}

.summary-subsection-header::after {
    content: '\25BC';
    font-size: 0.65em;
    transition: transform 0.3s;
    color: var(--text-dim);
}

.summary-subsection.collapsed .summary-subsection-header::after {
    transform: rotate(-90deg);
}

.summary-subsection-body {
    padding: 12px 14px;
    font-size: 0.9em;
    line-height: 1.7;
    color: #444;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.summary-subsection.collapsed .summary-subsection-body {
    max-height: 0;
    padding: 0 14px;
    opacity: 0;
}

.summary-content {
    font-size: 0.9em;
    line-height: 1.7;
    color: #444;
}

.summary-content p {
    margin: 0 0 10px 0;
}

.summary-content p:last-child {
    margin-bottom: 0;
}

.summary-loading {
    text-align: center;
    padding: 30px;
    color: var(--text-dim);
}

.summary-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.summary-error {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9em;
}

.summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.summary-metric {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-light);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.summary-metric-value {
    font-weight: 600;
    color: var(--text-dark);
}

.summary-metric.positive .summary-metric-value {
    color: var(--accent-green);
}

.summary-metric.negative .summary-metric-value {
    color: var(--primary-color);
}

/* ============================================================
   DIAGNOSTIC LOOKUP SECTION
   ============================================================ */
.diagnostic-section {
    background: var(--diagnostic-gradient);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.diagnostic-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.diagnostic-section > * {
    position: relative;
    z-index: 1;
}

.diagnostic-header {
    text-align: center;
    margin-bottom: 20px;
}

.diagnostic-header h2 {
    font-size: 1.3em;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.diagnostic-header .subtitle {
    font-size: 0.85em;
    opacity: 0.75;
    margin: 0;
}

.diagnostic-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 650px;
    margin: 0 auto 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.diag-market-select {
    padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95em;
    cursor: pointer;
    min-width: 90px;
    font-family: inherit;
}

.diag-market-select option {
    background: #1e3a5f;
    color: white;
}

.diag-ticker-input {
    flex: 1;
    min-width: 180px;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.diag-ticker-input::placeholder {
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.diag-ticker-input:focus {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.15);
}

.diag-search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: #0d2137;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: inherit;
}

.diag-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79,195,247,0.4);
}

.diag-search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.diag-rate-limit {
    text-align: center;
    font-size: 0.78em;
    opacity: 0.6;
    margin-bottom: 5px;
}

.diag-rate-limit .used-up {
    color: #ff9800;
    opacity: 1;
}

.diag-result-area {
    max-width: 700px;
    margin: 0 auto;
    min-height: 0;
    transition: all 0.3s;
}

.diag-result-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    animation: diagFadeIn 0.35s ease;
}

@keyframes diagFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.diag-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.diag-ticker-name {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.diag-ticker-name .ticker {
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 1px;
}

.diag-ticker-name .company {
    font-size: 0.85em;
    opacity: 0.75;
}

.diag-score-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.25);
    padding: 8px 16px;
    border-radius: 20px;
}

.diag-score-badge .score-value {
    font-size: 1.4em;
    font-weight: 800;
}

.diag-score-badge .score-label {
    font-size: 0.75em;
    opacity: 0.7;
}

.diag-score-badge.score-high { border: 2px solid #4CAF50; }
.diag-score-badge.score-mid { border: 2px solid #FF9800; }
.diag-score-badge.score-low { border: 2px solid #f44336; }
.diag-score-badge.score-high .score-value { color: #81C784; }
.diag-score-badge.score-mid .score-value { color: #FFB74D; }
.diag-score-badge.score-low .score-value { color: #ef5350; }

.diag-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.diag-metric {
    text-align: center;
    padding: 10px 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
}

.diag-metric .metric-label {
    font-size: 0.7em;
    opacity: 0.65;
    display: block;
    margin-bottom: 4px;
}

.diag-metric .metric-value {
    font-size: 1.1em;
    font-weight: 700;
}

.diag-metric .metric-value.positive { color: #81C784; }
.diag-metric .metric-value.negative { color: #ef5350; }
.diag-metric .metric-value.neutral { color: #FFB74D; }

.diag-stage-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.diag-stage-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
}

.diag-stage-tag.active {
    background: rgba(76,175,80,0.25);
    border: 1px solid rgba(76,175,80,0.5);
    color: #a5d6a7;
}

.diag-stage-tag.inactive {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.35);
}

.diag-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.diag-full-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: #0d2137;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.3s;
}

.diag-full-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(79,195,247,0.3);
    color: #0d2137;
    text-decoration: none;
}

.diag-chart-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.3s;
}

.diag-chart-link:hover {
    color: white;
    text-decoration: none;
}

.diag-error {
    text-align: center;
    padding: 15px;
    margin-top: 15px;
    background: rgba(244,67,54,0.15);
    border: 1px solid rgba(244,67,54,0.3);
    border-radius: 8px;
    color: #ffcdd2;
    font-size: 0.9em;
    animation: diagFadeIn 0.35s ease;
}

.diag-not-found {
    text-align: center;
    padding: 15px;
    margin-top: 15px;
    background: rgba(255,152,0,0.12);
    border: 1px solid rgba(255,152,0,0.25);
    border-radius: 8px;
    color: #ffe0b2;
    font-size: 0.9em;
    animation: diagFadeIn 0.35s ease;
}

.diag-loading {
    text-align: center;
    padding: 20px;
    opacity: 0.7;
}

/* ============================================================
   LATEST REPORTS (PUBLIC — PURPLE GRADIENT)
   ============================================================ */
.latest-reports-section {
    background: var(--public-gradient);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: var(--card-shadow);
}

.latest-reports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.latest-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.latest-card h3 {
    font-size: 1.1em;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.latest-card .report-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.latest-card .report-date-badge {
    background: rgba(255,255,255,0.25);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
}

.latest-card .date-status {
    font-size: 0.85em;
    opacity: 0.8;
}

.latest-report-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.latest-report-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95em;
}

.latest-report-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
}

.latest-report-link .report-icon {
    font-size: 1.2em;
}

/* Index badge (TW200, HSLMI) */
.index-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: auto;
}

/* Mini-table preview */
.mini-table-wrapper {
    margin-top: 12px;
    overflow-x: auto;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8em;
}

.mini-table th {
    background: rgba(0,0,0,0.2);
    padding: 5px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

.mini-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}

.mini-table tr:hover {
    background: rgba(255,255,255,0.05);
}

.mini-table .ticker-link {
    color: #4fc3f7;
    font-weight: 600;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    text-decoration: none;
}

.mini-table .ticker-link:hover {
    text-decoration: underline;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.view-all-link:hover {
    color: white;
    text-decoration: none;
}

/* Score/RS badge colors in mini-tables */
.badge-score-high { color: #00ff88; font-weight: 700; }
.badge-score-mid { color: #FFD700; }
.badge-rs-elite { color: #00e5ff; font-weight: 700; }
.badge-rs-good { color: #FFD700; }
.badge-signal-pp { background: #4CAF50; color: #0d2137; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 0.9em; }
.badge-signal-bgu { background: #29b6f6; color: #0d2137; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 0.9em; }
.badge-signal-ur { background: #ffb454; color: #0d2137; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 0.9em; }

/* ============================================================
   REPORT ARCHIVES (MEMBERS-ONLY — WHITE BG + LOCK OVERLAY)
   ============================================================ */
.archives-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

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

.archive-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.archive-card h3 {
    font-size: 1.05em;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-card li {
    padding: 6px 0;
    font-size: 0.9em;
    border-bottom: 1px solid var(--border-color);
}

.archive-card li:last-child {
    border-bottom: none;
}

.archive-card li::before {
    content: '\2713';
    color: var(--accent-green);
    margin-right: 8px;
    font-weight: 700;
}

/* Lock overlay for non-members */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(3px);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    text-align: center;
    padding: 20px;
}

.lock-overlay .lock-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.lock-overlay .lock-text {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.lock-overlay .lock-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--members-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.lock-overlay .lock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(17,153,142,0.4);
    color: white;
    text-decoration: none;
}

/* ============================================================
   VIP UPSELL SECTION
   ============================================================ */
.vip-section {
    background: var(--vip-gradient);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.vip-section h2 {
    font-size: 1.3em;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vip-section p {
    margin: 0 0 20px 0;
    font-size: 0.95em;
    opacity: 0.9;
}

.vip-cta-btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.vip-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
    color: var(--primary-color);
    text-decoration: none;
}

/* ============================================================
   MEMBERSHIP CTA (Ghost-specific)
   ============================================================ */
.membership-cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.membership-cta-section h2 {
    font-size: 1.4em;
    margin: 0 0 12px 0;
}

.membership-cta-section p {
    font-size: 0.95em;
    opacity: 0.9;
    margin: 0 0 20px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.membership-cta-btn {
    display: inline-block;
    padding: 14px 35px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.membership-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: #667eea;
    text-decoration: none;
}

/* ============================================================
   GHOST POST CARDS (for index.hbs post listing)
   ============================================================ */
.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.post-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 20px;
}

.post-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.post-card-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--bg-light);
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
}

.post-card-tag:hover {
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
}

.post-card-title {
    font-size: 1.15em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.post-card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.post-card-excerpt {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--text-dim);
}

.post-card-date {
    color: var(--text-dim);
}

.post-card-reading-time {
    color: var(--text-dim);
}

/* Members-only indicator on cards */
.post-card-members-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--members-gradient);
    color: white;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
}

/* ============================================================
   SINGLE POST / PAGE
   ============================================================ */
.post-full {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.post-full-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-full-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.post-full-meta {
    font-size: 0.9em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.post-full-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* Ghost content styling */
.post-full-content {
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-full-content h2 {
    font-size: 1.5em;
    margin: 2em 0 0.5em;
    color: var(--text-dark);
}

.post-full-content h3 {
    font-size: 1.25em;
    margin: 1.5em 0 0.5em;
    color: var(--text-dark);
}

.post-full-content p {
    margin: 0 0 1.5em 0;
}

.post-full-content a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.post-full-content a:hover {
    color: var(--primary-color);
}

.post-full-content img {
    border-radius: 8px;
    margin: 1.5em 0;
}

.post-full-content blockquote {
    border-left: 4px solid var(--accent-blue);
    padding-left: 20px;
    margin: 1.5em 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-full-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-size: 0.9em;
}

.post-full-content pre {
    background: var(--bg-dark);
    color: var(--terminal-text);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-full-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-full-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.post-full-content th {
    background: var(--bg-light);
    padding: 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.post-full-content td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px 0;
}

.pagination a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    text-decoration: none;
}

.pagination .page-number {
    font-size: 0.9em;
    color: var(--text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #333;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 25px 20px;
    font-size: 0.85em;
    line-height: 1.6;
}

.site-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-disclaimer {
    font-size: 0.8em;
    opacity: 0.6;
    max-width: 800px;
    margin: 15px auto 0;
}

/* ============================================================
   NEW BADGE PULSE
   ============================================================ */
.new-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================================
   TRADINGVIEW WIDGETS
   ============================================================ */
.tradingview-ticker-tape {
    width: 100%;
    overflow: hidden;
}

.tradingview-widget-area {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.tradingview-widget-area .tradingview-widget-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .summary-grid,
    .latest-reports-grid,
    .archives-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2em;
    }

    .nav-toggle {
        display: block;
        text-align: center;
        width: 100%;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 20px;
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }

    .nav-menu a:hover {
        border-bottom: 1px solid var(--border-color);
        border-left-color: var(--primary-color);
    }

    .main-content {
        padding: 20px 15px;
    }

    .market-summary-section,
    .diagnostic-section,
    .latest-reports-section,
    .archives-section,
    .vip-section,
    .membership-cta-section {
        padding: 20px 15px;
        border-radius: 8px;
    }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .language-toggle {
        top: auto;
        bottom: 10px;
        right: 10px;
    }

    .post-feed {
        grid-template-columns: 1fr;
    }

    .post-full-title {
        font-size: 1.5em;
    }

    /* Hide Name column in mini-tables on mobile */
    .mini-table .col-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.6em;
    }

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

    .latest-card {
        padding: 15px;
    }

    /* Hide RS column in mini-tables on small screens */
    .mini-table .col-rs {
        display: none;
    }
}

/* ============================================================
   GHOST MEMBERS PORTAL (Subscribe / Signin overlay)
   ============================================================ */
.gh-portal-triggerbtn-iframe {
    /* Ghost membership portal button */
    z-index: 999 !important;
}

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   MINI-TABLE PREVIEWS
   ============================================================ */
.report-with-preview {
    margin-bottom: 6px;
}

.report-with-preview .latest-report-link {
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.report-with-preview:not(:has(.mini-preview-table)) .latest-report-link {
    border-radius: 8px;
}

.mini-table-container {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0 0 8px 8px;
    padding: 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
}

.mini-table-loading {
    padding: 12px;
    text-align: center;
    font-size: 0.8em;
    opacity: 0.6;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.mini-table-error {
    padding: 12px;
    text-align: center;
    font-size: 0.8em;
    color: #ff6b6b;
}

.mini-table-empty {
    padding: 12px;
    text-align: center;
    font-size: 0.8em;
    opacity: 0.5;
    font-style: italic;
}

.mini-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.75em;
    line-height: 1.4;
}

.mini-preview-table thead th {
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-preview-table tbody td {
    padding: 5px 8px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
}

.mini-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.mini-preview-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.mini-score-high { color: #00d4aa; font-weight: 700; }
.mini-rs-90 { color: #39bae6; font-weight: 700; }
.mini-rs-70 { color: #e6b450; font-weight: 600; }

.mini-signal-pp {
    display: inline-block;
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.9em;
}

.mini-signal-bgu {
    display: inline-block;
    background: rgba(57, 186, 230, 0.2);
    color: #39bae6;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.9em;
}

.mini-signal-ur {
    display: inline-block;
    background: rgba(230, 180, 80, 0.2);
    color: #e6b450;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.9em;
}

.mini-vcp-pattern {
    color: #39bae6;
    font-weight: 600;
}

.mini-view-all {
    display: block;
    text-align: right;
    padding: 6px 10px;
    font-size: 0.75em;
    color: #39bae6;
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-view-all:hover {
    color: #e6b450;
}

.col-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 768px) {
    .col-name { display: none; }
}

@media (max-width: 480px) {
    .col-rs { display: none; }
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
