:root {
    --bg-dark: #050505;
    --bg-glass: rgba(20, 20, 25, 0.7);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --primary: #3b82f6;
    --cyan: #06b6d4;
    --purple: #a855f7;
    --gold: #eab308;
    --btc-orange: #f7931a; 
    
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    
    --font-family: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- 动态背景 --- */
.glow-bg {
    position: fixed; width: 600px; height: 600px; border-radius: 50%; filter: blur(120px); z-index: -1; opacity: 0.15;
    animation: floatGlow 20s infinite alternate ease-in-out;
}
.glow-purple { top: -200px; left: -200px; background: var(--purple); }
.glow-cyan { bottom: -200px; right: -200px; background: var(--cyan); animation-delay: -10s; }
.grid-texture {
    position: fixed; inset: 0; z-index: -1; opacity: 0.2;
    background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* --- 动画定义 --- */
@keyframes floatGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes neonPulse {
    0%, 100% { filter: brightness(1); text-shadow: 0 0 20px currentColor; }
    50% { filter: brightness(1.3); text-shadow: 0 0 40px currentColor, 0 0 10px currentColor; }
}
@keyframes sweep {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 0.5; }
    100% { left: 100%; opacity: 0; }
}

.fade-in { animation: fadeIn 1s ease-out backwards; }
.fade-up { animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.container { max-width: 1280px; margin: 0 auto; padding: 20px; }

/* Header */
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 40px; flex-wrap: wrap; gap: 20px; }
.brand-group { display: flex; gap: 15px; align-items: center; }
.logo-box {
    width: 50px; height: 50px; min-width: 50px;
    background: linear-gradient(135deg, var(--btc-orange), var(--gold));
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff; box-shadow: 0 0 25px rgba(247, 147, 26, 0.4);
}
.titles h1 { font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 5px; }
.titles .subtitle { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 2px; display: block; }

/* Header Actions (Top Right) */
.header-actions { display: flex; align-items: center; gap: 12px; }

.icon-link {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-light);
    border-radius: 50%; color: var(--text-muted); transition: 0.3s;
    font-size: 1rem;
}
.icon-link:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: var(--cyan); box-shadow: 0 0 10px rgba(6, 182, 212, 0.2); }

.divider-v { width: 1px; height: 24px; background: rgba(255,255,255,0.1); margin: 0 5px; }

.btn-glass {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-light);
    color: var(--text-main); padding: 8px 16px; border-radius: 20px; cursor: pointer;
    font-family: var(--font-family); transition: 0.3s; white-space: nowrap; font-size: 0.9rem;
}
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: var(--cyan); }


/* Layout */
.main-layout { display: grid; grid-template-columns: 360px 1fr; gap: 25px; align-items: start; }

/* Panels */
.panel {
    background: var(--bg-glass); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-light); border-radius: 24px; padding: 24px;
    margin-bottom: 25px; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: border-color 0.3s;
}
.panel:hover { border-color: var(--border-hover); }
.panel-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); }

/* Form Controls */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }

.assets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.asset-btn {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-light);
    border-radius: 12px; padding: 15px 8px; cursor: pointer; text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80px;
}
.asset-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hover); transform: translateY(-3px); }
.asset-btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg); transition: 0s;
}
.asset-btn:hover::before { animation: sweep 0.8s ease-in-out; }

.asset-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
    border-color: var(--cyan); box-shadow: 0 0 20px rgba(6, 182, 212, 0.2) inset;
}
.asset-btn i { font-size: 1.5rem; display: block; margin-bottom: 8px; color: var(--text-muted); transition: 0.3s; }
.asset-btn.active i, .asset-btn.active span { color: #fff; font-weight: 600; }
.asset-btn.active i { transform: scale(1.1); color: var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); }
.asset-btn span { font-size: 0.8rem; color: var(--text-muted); line-height: 1.2; }

.comp-tag { font-size: 0.75rem; background: rgba(0,0,0,0.3); padding: 10px; border-radius: 8px; margin-top: 10px; color: var(--text-muted); line-height: 1.4; display: none; border-left: 2px solid var(--gold); }

/* Inputs */
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-box { position: relative; }
.input-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); opacity: 0.7; }
input[type="number"] {
    width: 100%; background: rgba(0,0,0,0.4); border: 1px solid var(--border-light);
    color: #fff; padding: 12px 10px 12px 40px; border-radius: 12px; font-family: var(--font-family); font-size: 1rem;
    transition: 0.3s;
}
input[type="number"]:focus { border-color: var(--cyan); background: rgba(0,0,0,0.6); box-shadow: 0 0 15px rgba(6, 182, 212, 0.1); }

.freq-toggle { display: flex; background: rgba(0,0,0,0.4); border-radius: 12px; padding: 4px; }
.freq-toggle input { display: none; }
.freq-toggle label {
    flex: 1; text-align: center; padding: 10px; margin: 0; cursor: pointer; border-radius: 10px; font-size: 0.9rem; transition: 0.3s; color: var(--text-muted);
}
.freq-toggle input:checked + label { background: var(--bg-glass); color: var(--cyan); box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-weight: 600; }

/* Sliders & Advanced */
.advanced-group { background: rgba(255,255,255,0.02); padding: 18px; border-radius: 16px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.04); }
.slider-row { margin-bottom: 18px; }
.slider-wrapper { display: flex; align-items: center; gap: 15px; }
input[type="range"] { flex: 1; height: 6px; background: #222; border-radius: 3px; -webkit-appearance: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--cyan); border-radius: 50%; cursor: pointer; box-shadow: 0 0 15px var(--cyan); border: 2px solid #fff; }
#stepUpVal { width: 45px; text-align: right; color: var(--cyan); font-weight: 600; font-size: 0.95rem; }

/* Switch */
.switch-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider-round {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333; transition: .4s; border-radius: 34px; border: 1px solid var(--border-light);
}
.slider-round:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 2px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider-round { background-color: var(--primary); border-color: var(--primary); }
input:checked + .slider-round:before { transform: translateX(20px); }

.years-row { display: flex; gap: 12px; }
.year-input { flex: 1; }

.expert-mode summary { cursor: pointer; color: var(--text-muted); font-size: 0.85rem; padding: 8px 0; transition: 0.3s; user-select: none; }
.expert-mode summary:hover { color: var(--primary); }
.expert-content { margin-top: 10px; border-left: 2px solid var(--primary); padding-left: 12px; background: rgba(59, 130, 246, 0.05); padding: 12px; border-radius: 0 12px 12px 0;}
.expert-content p { font-size: 0.75rem; color: #64748b; margin-bottom: 10px; }
.small { position: relative; width: 100px; }
.small input { padding: 8px 25px 8px 10px; text-align: center; }
.suffix { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; }


/* Right Column Data */
.data-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 25px; }
.card {
    padding: 24px; border-radius: 20px; background: var(--bg-glass); border: 1px solid var(--border-light);
    backdrop-filter: blur(25px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-hover); }
.card .label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; display: block; font-weight: 500; }
.card .value { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.neon-cyan { color: var(--cyan); }
.neon-purple { color: var(--purple); }
.neon-pulse { animation: neonPulse 4s ease-in-out infinite alternate; }
.card .tag { font-size: 0.75rem; background: rgba(255,255,255,0.1); display: inline-block; padding: 4px 8px; border-radius: 6px; margin-top: 8px; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }

/* Chart */
.chart-box { height: 380px; width: 100%; position: relative; }

/* Table Panel */
.table-panel { padding: 0; overflow: hidden; }
.table-panel h3 { padding: 24px 24px 15px; font-size: 1.1rem; color: var(--text-main); border-bottom: 1px solid var(--border-light); margin-bottom: 0; }
.table-container { max-height: 400px; overflow-y: auto; width: 100%; }
.table-container::-webkit-scrollbar { width: 6px; }
.table-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.table-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th { 
    position: sticky; top: 0; background: rgba(10, 10, 15, 0.95); z-index: 10; backdrop-filter: blur(10px);
    text-align: left; padding: 14px 24px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-light); white-space: nowrap;
}
tbody td { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.03); color: #e2e8f0; font-feature-settings: "tnum"; white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,0.04); }
tbody tr.future-row td { color: var(--purple); background: rgba(168, 85, 247, 0.03); }
.positive { color: var(--cyan); font-weight: 600; }

/* Footer */
footer { display: flex; justify-content: center; margin-top: 40px; padding-bottom: 30px; }
.disclaimer { font-size: 0.75rem; color: #525252; text-align: center; }

/* --- Mobile Responsive --- */
@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .col-left { order: 1; }
    .col-right { order: 2; }
}

@media (max-width: 768px) {
    .container { padding: 15px; }
    header { padding: 15px 0 30px; }
    .titles h1 { font-size: 1.3rem; }
    .data-cards { grid-template-columns: 1fr; gap: 15px; }
    .card .value { font-size: 1.8rem; }
    .chart-box { height: 300px; }
    .header-actions { margin-left: auto; } /* 移动端靠右 */
}

@media (max-width: 400px) {
    .assets-grid { grid-template-columns: repeat(2, 1fr); } 
    .input-row { grid-template-columns: 1fr; }
    .table-container th, .table-container td { padding: 10px 15px; font-size: 0.85rem; }
    .header-actions { width: 100%; justify-content: flex-end; margin-top: 10px; }
}