/* ===== TACTICAL OS V2.6 - JARVIS HUD COMMAND CENTER ===== */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1428;
    --bg-card: #111832;
    --bg-card-hover: #161e3d;
    --border-color: #1a2340;
    --border-glow: #1e2a4a;

    --text-primary: #e8eaf0;
    --text-secondary: #8892b0;
    --text-muted: #5a6380;

    --neon-red: #ff4757;
    --neon-orange: #ff9f43;
    --neon-yellow: #feca57;
    --neon-green: #00d2d3;
    --neon-cyan: #0abde3;
    --neon-blue: #3742fa;
    --neon-purple: #a855f7;

    --neon-red-glow: rgba(255, 71, 87, 0.15);
    --neon-orange-glow: rgba(255, 159, 67, 0.15);
    --neon-yellow-glow: rgba(254, 202, 87, 0.15);
    --neon-green-glow: rgba(0, 210, 211, 0.15);
    --neon-cyan-glow: rgba(10, 189, 227, 0.15);
    --neon-purple-glow: rgba(168, 85, 247, 0.15);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --nav-height: 70px;
    --header-height: 56px;
    --transition-duration: 0.3s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- App Container --- */
.app-container {
    position: relative;
    max-width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* --- HUD Grid Background --- */
.hud-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(0, 210, 211, 0.05) 25%, rgba(0, 210, 211, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 210, 211, 0.05) 75%, rgba(0, 210, 211, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 210, 211, 0.05) 25%, rgba(0, 210, 211, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 210, 211, 0.05) 75%, rgba(0, 210, 211, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* --- HUD Scanlines --- */
.hud-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 210, 211, 0.03) 0px,
        rgba(0, 210, 211, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* --- Ambient Glow --- */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--neon-purple);
    top: -100px;
    right: -100px;
    animation: glowPulse 8s ease-in-out infinite;
}

.glow-2 {
    width: 350px;
    height: 350px;
    background: var(--neon-cyan);
    bottom: 20%;
    left: -100px;
    animation: glowPulse 10s ease-in-out infinite reverse;
}

.glow-3 {
    width: 300px;
    height: 300px;
    background: var(--neon-green);
    top: 40%;
    right: -80px;
    animation: glowPulse 12s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.06; transform: scale(1); }
    50% { opacity: 0.12; transform: scale(1.1); }
}

/* --- HUD Corner Brackets --- */
.hud-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--neon-cyan);
    opacity: 0.6;
    pointer-events: none;
}

.corner-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* --- HUD Panel Style --- */
.hud-panel {
    position: relative;
    border: 1px solid rgba(0, 210, 211, 0.3);
    background: linear-gradient(135deg, rgba(0, 210, 211, 0.05) 0%, rgba(168, 85, 247, 0.03) 100%);
    box-shadow: 0 0 20px rgba(0, 210, 211, 0.1), inset 0 0 20px rgba(0, 210, 211, 0.05);
}

.hud-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.5;
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    height: var(--header-height);
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 210, 211, 0.1);
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.header-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.title {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-text {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title .version {
    color: var(--neon-green);
    font-size: 0.8rem;
    background: rgba(0, 210, 211, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--neon-green);
}

.subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-control {
    display: flex;
    align-items: center;
}

.audio-btn {
    background: rgba(0, 210, 211, 0.1);
    border: 1px solid rgba(0, 210, 211, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    transition: all var(--transition-duration);
}

.audio-btn:hover {
    background: rgba(0, 210, 211, 0.2);
    box-shadow: 0 0 10px rgba(0, 210, 211, 0.3);
}

.audio-icon {
    width: 16px;
    height: 16px;
}

.audio-status {
    letter-spacing: 1px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--neon-green);
    letter-spacing: 2px;
    padding: 6px 10px;
    background: rgba(0, 210, 211, 0.1);
    border: 1px solid rgba(0, 210, 211, 0.3);
    border-radius: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--neon-green);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-green); }
    50% { opacity: 0.4; box-shadow: 0 0 2px var(--neon-green); }
}

/* --- Main Content --- */
.main-content {
    position: relative;
    z-index: 2;
    padding-bottom: calc(var(--nav-height) + 16px);
}

/* --- Page System --- */
.page {
    display: none;
    padding: 16px;
    animation: fadeIn var(--transition-duration) ease;
}

.page.active {
    display: block;
}

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

/* --- Page Header Bar --- */
.page-header-bar {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.page-title.green { color: var(--neon-green); }
.page-title.cyan { color: var(--neon-cyan); }
.page-title.purple { color: var(--neon-purple); }
.page-title.orange { color: var(--neon-orange); }

.page-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Search Bar --- */
.search-bar-container {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(0, 210, 211, 0.05);
    border: 1px solid rgba(0, 210, 211, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all var(--transition-duration);
}

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

.search-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 210, 211, 0.1);
    box-shadow: 0 0 10px rgba(0, 210, 211, 0.2);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* --- Data Cards --- */
.data-cards-container {
    margin-bottom: 16px;
}

.data-cards-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-duration);
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.data-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-glow);
    box-shadow: 0 8px 24px rgba(0, 210, 211, 0.15);
}

.card-vix { border-color: rgba(255, 71, 87, 0.25); }
.card-fng { border-color: rgba(255, 159, 67, 0.25); }
.card-usdtwd { border-color: rgba(0, 210, 211, 0.25); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.card-vix .card-label { color: var(--neon-red); }
.card-fng .card-label { color: var(--neon-orange); }
.card-usdtwd .card-label { color: var(--neon-green); }

.card-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-value {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-change {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
}

.card-change.positive { color: var(--neon-green); }
.card-change.negative { color: var(--neon-red); }
.card-change.neutral { color: var(--text-muted); }

/* --- Main Grid Layout --- */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Section Cards --- */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-duration);
}

.section-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 24px rgba(0, 210, 211, 0.1);
}

.section-header {
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.section-title.green { color: var(--neon-green); }
.section-title.yellow { color: var(--neon-yellow); }
.section-title.orange { color: var(--neon-orange); }
.section-title.cyan { color: var(--neon-cyan); }
.section-title.purple { color: var(--neon-purple); }
.section-title.red { color: var(--neon-red); }

/* --- Clickable Cards --- */
a.section-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-2px);
}

/* --- Macro Terminal --- */
.wealth-terminal {
    cursor: pointer;
}

.wealth-data {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wealth-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wealth-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.wealth-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neon-green);
}

.wealth-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.wealth-arrow {
    margin-left: auto;
    font-size: 1.5rem;
    color: var(--neon-green);
    cursor: pointer;
    transition: transform var(--transition-duration);
}

.wealth-arrow:hover {
    transform: translateX(4px);
}

/* --- Motivation Card --- */
.motivation-content {
    padding: 4px 0;
}

.quote {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.quote-zh {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.quote-author {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-yellow);
    letter-spacing: 1px;
}

/* --- History Card --- */
.history-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.history-year {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neon-orange);
    line-height: 1;
    min-width: 60px;
}

.history-event {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.history-event-zh {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* --- Trivia Card --- */
.trivia-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.trivia-fact {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.trivia-fact-zh {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-duration);
}

.filter-btn:hover {
    border-color: var(--neon-green);
    color: var(--text-secondary);
}

.filter-btn.active {
    background: rgba(0, 210, 211, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 210, 211, 0.2);
}

/* --- Video Cards --- */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-duration);
    position: relative;
    overflow: hidden;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

.video-card.channel-nicolas::before { background: var(--neon-green); }
.video-card.channel-alan::before { background: var(--neon-orange); }
.video-card.channel-alex::before { background: var(--neon-cyan); }

.video-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 210, 211, 0.1);
}

.video-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.video-date {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
}

.video-channel-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tag-nicolas {
    background: rgba(0, 210, 211, 0.15);
    color: var(--neon-green);
    border: 1px solid rgba(0, 210, 211, 0.3);
}

.tag-alan {
    background: rgba(255, 159, 67, 0.15);
    color: var(--neon-orange);
    border: 1px solid rgba(255, 159, 67, 0.3);
}

.tag-alex {
    background: rgba(10, 189, 227, 0.15);
    color: var(--neon-cyan);
    border: 1px solid rgba(10, 189, 227, 0.3);
}

.video-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.video-overview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.video-tickers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ticker-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(168, 85, 247, 0.12);
    color: var(--neon-purple);
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.video-yt-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity var(--transition-duration);
}

.video-yt-link:hover {
    opacity: 0.8;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn var(--transition-duration) ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp var(--transition-duration) ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    padding-right: 12px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--transition-duration);
}

.modal-close:hover {
    color: var(--neon-red);
}

.modal-body {
    padding: 16px 20px 24px;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--neon-green);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.modal-section-title.orange { color: var(--neon-orange); }
.modal-section-title.cyan { color: var(--neon-cyan); }
.modal-section-title.purple { color: var(--neon-purple); }
.modal-section-title.yellow { color: var(--neon-yellow); }

.modal-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-key-points {
    list-style: none;
    padding: 0;
}

.modal-key-points li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 6px 0 6px 16px;
    position: relative;
    border-bottom: 1px solid rgba(26, 35, 64, 0.5);
}

.modal-key-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-green);
}

.modal-key-points li:last-child {
    border-bottom: none;
}

.modal-trend-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.modal-trend-item {
    background: rgba(15, 20, 40, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
}

.modal-trend-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-trend-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

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

.modal-ticker {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 20, 40, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
}

.modal-ticker-symbol {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-ticker-change {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
}

.modal-ticker-change.up { color: var(--neon-green); }
.modal-ticker-change.down { color: var(--neon-red); }

.modal-yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--neon-red);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-duration);
    letter-spacing: 1px;
}

.modal-yt-btn:hover {
    background: rgba(255, 71, 87, 0.2);
}

/* --- Wealth Page --- */
.wealth-section {
    margin-bottom: 12px;
}

.resource-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 20, 40, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-duration);
}

.resource-card:hover {
    background: rgba(15, 20, 40, 0.7);
    border-color: var(--border-glow);
}

.resource-icon {
    font-size: 1.5rem;
    min-width: 36px;
    text-align: center;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.resource-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.resource-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform var(--transition-duration);
}

.resource-card:hover .resource-arrow {
    transform: translateX(4px);
    color: var(--text-secondary);
}

.resource-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(168, 85, 247, 0.12);
    color: var(--neon-purple);
    border: 1px solid rgba(168, 85, 247, 0.25);
    white-space: nowrap;
}

a.resource-link {
    text-decoration: none;
    color: inherit;
}

a.resource-link:hover {
    background: rgba(15, 20, 40, 0.7);
}

.resource-info-card {
    opacity: 0.7;
}

/* --- Knowledge Expand --- */
.knowledge-expand {
    display: none;
    padding: 12px 16px;
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: -4px;
    margin-bottom: 4px;
}

.knowledge-expand.active {
    display: block;
    animation: fadeIn var(--transition-duration) ease;
}

.knowledge-expand pre {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 0 0 env(safe-area-inset-bottom, 0);
}

.nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--nav-height);
    max-width: 500px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    padding: 8px 16px;
    transition: color var(--transition-duration);
    position: relative;
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.nav-label {
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--neon-green);
}

.nav-dot {
    display: none;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 6px var(--neon-green);
}

.nav-item.active .nav-dot {
    display: block;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Utility --- */
.hidden {
    display: none !important;
}

.text-green { color: var(--neon-green); }
.text-cyan { color: var(--neon-cyan); }
.text-orange { color: var(--neon-orange); }
.text-purple { color: var(--neon-purple); }
.text-red { color: var(--neon-red); }
.text-yellow { color: var(--neon-yellow); }

/* --- Loading Skeleton --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 0.85rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* --- Tablet: 480px - 768px --- */
@media (min-width: 480px) and (max-width: 767px) {
    .main-content {
        max-width: 100%;
        margin: 0 auto;
    }

    .data-cards-row {
        gap: 12px;
    }

    .card-value {
        font-size: 1.2rem;
    }

    .main-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        border-radius: 16px;
        margin-bottom: 20px;
        max-height: 80vh;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-trend-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Desktop: 768px and up --- */
@media (min-width: 768px) {
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }

    .data-cards-row {
        gap: 16px;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .main-grid {
        grid-template-columns: 1fr 1fr;
    }

    .video-card {
        padding: 20px;
    }

    .modal-content {
        border-radius: 16px;
        margin-bottom: 40px;
        max-height: 80vh;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-trend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-list {
        gap: 16px;
    }
}

/* --- Large Desktop: 1024px and up --- */
@media (min-width: 1024px) {
    .main-content {
        max-width: 1400px;
    }

    .data-cards-row {
        gap: 20px;
    }

    .main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* --- Mobile: under 480px --- */
@media (max-width: 479px) {
    :root {
        --nav-height: 64px;
        --header-height: 52px;
    }

    .header {
        padding: 10px 16px;
    }

    .title {
        font-size: 0.95rem;
        gap: 4px;
    }

    .title .version {
        font-size: 0.7rem;
        padding: 1px 4px;
    }

    .subtitle {
        font-size: 0.65rem;
    }

    .header-right {
        gap: 8px;
    }

    .audio-btn {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    .audio-icon {
        width: 14px;
        height: 14px;
    }

    .live-badge {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    .live-dot {
        width: 6px;
        height: 6px;
    }

    .main-content {
        padding-bottom: calc(var(--nav-height) + 12px);
    }

    .page {
        padding: 12px;
    }

    .data-cards-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .data-card {
        padding: 10px;
    }

    .card-value {
        font-size: 1rem;
    }

    .card-label {
        font-size: 0.6rem;
    }

    .main-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .section-card {
        padding: 12px;
    }

    .page-title {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .video-card {
        padding: 12px;
    }

    .video-title {
        font-size: 0.85rem;
    }

    .video-overview {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }

    .filter-btn {
        font-size: 0.65rem;
        padding: 6px 10px;
    }

    .modal-content {
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
    }

    .modal-title {
        font-size: 0.95rem;
    }

    .modal-body {
        padding: 12px 16px 20px;
    }

    .nav-item {
        padding: 6px 12px;
        font-size: 0.55rem;
    }

    .nav-icon {
        width: 18px;
        height: 18px;
    }

    .hud-corner {
        width: 10px;
        height: 10px;
        border-width: 1px;
    }

    .resource-card {
        padding: 10px;
    }

    .resource-icon {
        font-size: 1.2rem;
        min-width: 30px;
    }

    .resource-info h4 {
        font-size: 0.8rem;
    }

    .resource-info p {
        font-size: 0.68rem;
    }
}
/* ===== SVG ICON STYLES =====
