/* OKLMS Shared Styles v8 */
* { touch-action: manipulation; }

body { 
    background: #0d1117; 
    color: #e6edf3; 
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
}

.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; }
.text-up { color: #f85149; }
.text-down { color: #3fb950; }
.text-accent { color: #58a6ff; }
.text-muted { color: #8b949e; }
.bg-dark { background: #0d1117; }
.num-font { font-family: "DIN", "Roboto Mono", monospace; }

.signal-link { text-decoration: none; color: inherit; display: block; border-radius: 6px; transition: border-color 0.2s; border: 1px solid transparent; }
.signal-link:hover { border-color: #58a6ff; }

nav.top-nav { border-bottom: 1px solid #30363d; padding: 12px 16px; }

/* Bottom nav */
nav.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #161b22; border-top: 1px solid #30363d; z-index: 100; padding: 4px 0 6px 0; }
.bottom-nav .nav-inner { display: flex; justify-content: space-around; max-width: 600px; margin: 0 auto; }
.bottom-nav .nav-item { padding: 6px 0; text-align: center; font-size: 14px !important; font-weight: 500; color: #8b949e; text-decoration: none; flex: 1; line-height: 1.4 !important; transition: color 0.2s; }
.bottom-nav .nav-item.active { color: #58a6ff; }

.content-container { max-width: 48rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

/* Font size controls */
.font-size-controls { display: flex; gap: 6px; }
.font-size-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid #30363d; border-radius: 4px; background: #161b22; color: #8b949e; font-size: 12px !important; cursor: pointer; transition: all 0.2s; padding: 0; line-height: 1 !important; }
.font-size-btn:hover, .font-size-btn.active { color: #58a6ff; border-color: #58a6ff; background: #1f6feb22; }

.loading-placeholder { text-align: center; padding: 32px 0; color: #8b949e; }
.section-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; color: #8b949e; padding-bottom: 8px; border-bottom: 1px solid #30363d; }

/* ========== Skeleton Loading ========== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w100 { width: 100%; }
.skeleton-line.h20 { height: 20px; }

/* ========== Fade-in Animation ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ========== Briefing/Analysis Cards ========== */
.brief-card { background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.25s; position: relative; overflow: hidden; }
.brief-card:hover { border-color: #58a6ff; transform: translateY(-1px); }
.brief-card.latest { border-color: #1f6feb; border-width: 2px; }
.brief-card .card-badge { display: inline-block; font-size: 11px !important; padding: 2px 8px; border-radius: 10px; margin-bottom: 8px; font-weight: 600; }
.brief-card .badge-new { background: #1f6feb33; color: #58a6ff; border: 1px solid #1f6feb66; }
.brief-card .card-time { font-size: 12px !important; color: #8b949e; margin-bottom: 8px; }
.brief-card .card-title { font-size: 16px; font-weight: 700; color: #e6edf3; margin-bottom: 10px; line-height: 1.4; }
.brief-card .card-highlights { font-size: 13px; color: #c9d1d9; line-height: 1.6; }
.brief-card .card-highlights li { margin-bottom: 4px; list-style: none; padding-left: 0; }
.brief-card .card-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #484f58; font-size: 18px; transition: color 0.2s; }
.brief-card:hover .card-arrow { color: #58a6ff; }

/* ========== Detail Overlay ========== */
.detail-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #0d1117; z-index: 200; overflow-y: auto; display: none; }
.detail-overlay.show { display: block; animation: fadeIn 0.2s ease-out; }
.detail-header { position: sticky; top: 0; background: #0d1117; border-bottom: 1px solid #30363d; padding: 12px 16px; z-index: 10; display: flex; align-items: center; gap: 12px; }
.detail-back { color: #58a6ff; font-size: 14px; cursor: pointer; background: none; border: none; padding: 4px 8px; }
.detail-body { max-width: 48rem; margin: 0 auto; padding: 16px; }

/* ========== Markdown Content Rendering ========== */
.md-content { color: #c9d1d9; line-height: 1.8; }
.md-content h1, .md-content h2, .md-content h3 { color: #e6edf3; font-weight: 700; margin: 20px 0 10px; }
.md-content h1 { font-size: 1.3em; }
.md-content h2 { font-size: 1.15em; border-bottom: 1px solid #30363d; padding-bottom: 6px; }
.md-content h3 { font-size: 1.05em; color: #58a6ff; }
.md-content p { margin: 8px 0; }
.md-content strong, .md-content b { color: #f0f6fc; }
.md-content em { color: #d29922; font-style: normal; }
.md-content ul, .md-content ol { padding-left: 20px; margin: 8px 0; }
.md-content li { margin: 4px 0; }
.md-content hr { border: none; border-top: 1px solid #30363d; margin: 16px 0; }
.md-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9em; }
.md-content th, .md-content td { border: 1px solid #30363d; padding: 6px 10px; text-align: left; }
.md-content th { background: #21262d; color: #8b949e; font-weight: 600; }
.md-content td { background: #161b22; }
.md-content blockquote { border-left: 3px solid #58a6ff; padding-left: 12px; color: #8b949e; margin: 8px 0; }
.md-content code { background: #21262d; padding: 2px 6px; border-radius: 3px; font-size: 0.9em; color: #f0883e; }

/* ========== Heatmap Tiles ========== */
.heatmap-tile {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.heatmap-tile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.heatmap-tile.bullish::before { background: #f85149; }
.heatmap-tile.bearish::before { background: #3fb950; }
.heatmap-tile.neutral::before { background: #d29922; }

.heatmap-tile .tile-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.heatmap-tile .tile-stats { display: flex; gap: 12px; font-size: 13px; }

/* ========== Signal Card Enhancements ========== */
.signal-card-enhanced {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border-left: 3px solid transparent;
}

.signal-card-enhanced:hover { border-color: #58a6ff; }
.signal-card-enhanced.long { border-left-color: #f85149; }
.signal-card-enhanced.short { border-left-color: #3fb950; }