:root {
    --sidebar-bg: #fdfdfd;
    --main-bg: #ffffff;
    --card-bg: #ffffff;
    --accent: #020617; /* 更深沉、简约的深蓝色 */
    --accent-dim: #f1f5f9;
    --text-main: #1e293b;
    --text-dim: #64748b;
    --border-color: #f1f5f9;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-subtle: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--main-bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Home Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--text-main);
    text-align: center;
    padding: 80px 24px;
    position: relative;
}

/* Brand Header */
.brand-container {
    display: flex;
    flex-direction: column; /* 改为垂直排列更简约 */
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-logo {
    width: 80px; /* 从 48px 加大到 80px */
    height: 80px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-logo::before {
    content: '';
    width: 36px; /* 同步加大内部图标 */
    height: 36px;
    border: 4px solid #fff;
    border-radius: 50%;
}

.hero-logo::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 18px; /* 同步加大内部图标 */
    background: #fff;
    bottom: 20px;
    right: 20px;
    transform: rotate(-45deg);
    border-radius: 1px;
}

.brand-name-group {
    text-align: center;
}

.brand-name-cn {
    font-size: 42px;
    font-weight: 500; /* 与第一行 hero-title 保持一致的常规粗细 */
    color: var(--accent);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.brand-name-en {
    font-size: 16px;
    font-weight: 500; /* 与第一行 hero-title 保持一致的常规粗细 */
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 6px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 500; /* 从 400 调至 500，增加适度厚度 */
    margin-bottom: 20px;
    letter-spacing: 0.01em;
    color: var(--accent);
    max-width: 800px;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-dim);
    margin-bottom: 56px;
    max-width: 600px;
    line-height: 1.6;
    font-weight: 400;
}

/* Search Container */
.search-container {
    width: 100%;
    max-width: 640px;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-input-wrapper {
    width: 100%;
    position: relative; /* 核心：让按钮相对于这个 wrapper 居中 */
}

.search-box {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 0 120px 0 24px;
    color: var(--accent);
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-subtle);
    height: 52px;
    line-height: 49px;
}

.search-box::placeholder {
    color: #94a3b8;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    padding: 0 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    z-index: 2;
}

.search-btn:hover {
    opacity: 0.9;
    transform: translateY(-50%) scale(0.98);
}

.search-hint {
    margin-top: 16px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

/* Dropdown */
.chain-dropdown {
    margin-bottom: 16px; /* 紧凑一点 */
    position: relative;
    width: 100%;
    max-width: 640px; /* 与搜索框等宽 */
}

.dropdown-select {
    width: 100%;
    height: 52px; /* 与搜索框高度完全一致 */
    padding: 0 24px;
    border-radius: 16px; /* 与搜索框圆角一致 */
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: var(--accent);
    cursor: pointer;
    font-size: 15px; /* 与搜索框字体大小一致 */
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s;
    text-align: left; /* 改为左对齐 */
}

.dropdown-select:hover {
    border-color: #cbd5e1;
}

.dropdown-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* 增加下拉箭头图标 */
.chain-dropdown::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* Stats */
.stats-summary {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    gap: 48px;
    width: 100%;
    max-width: 900px;
}

.stat-item {
    text-align: center;
    min-width: 140px;
}

.stat-label {
    color: var(--text-dim);
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

/* Result Page Styles */
.result-header {
    background: #ffffff;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-cyan {
    background: var(--accent-dim);
    color: var(--accent);
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
}

.btn-ghost:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.main-container {
    display: flex;
    height: calc(100vh - 72px);
    background: #ffffff;
}

#mountNode {
    flex: 1;
    position: relative;
    background: #ffffff;
}

.side-panel {
    width: 380px;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent);
}

.summary-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
}

.node-info .info-item {
    margin-bottom: 16px;
}

.info-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-section { padding: 40px 16px; justify-content: flex-start; }
    .hero-title { font-size: 28px; margin-bottom: 12px; }
    .hero-subtitle { font-size: 15px; margin-bottom: 40px; }
    
    .brand-container { margin-bottom: 40px; }
    .hero-logo { width: 52px; height: 52px; }
    .brand-name-cn { font-size: 34px; }

    .search-container, .chain-dropdown {
        max-width: 100%;
        width: 100%;
    }

    .search-box {
        padding: 0 16px; /* 手机端不需要预留按钮位置，因为按钮会放下面 */
        height: 48px;
        line-height: 46px;
        border-radius: 12px;
        font-size: 14px;
    }

    .search-btn {
        position: static; /* 手机端取消绝对定位 */
        transform: none;
        width: 100%;
        height: 48px;
        margin-top: 12px;
        border-radius: 12px;
        font-size: 15px;
    }

    .search-input-wrapper {
        display: flex;
        flex-direction: column;
    }

    .dropdown-select {
        height: 48px;
        border-radius: 12px;
        font-size: 14px;
        padding: 0 16px;
    }

    .stats-summary { 
        flex-direction: column; 
        gap: 24px; 
        margin-top: 40px;
        padding: 0 20px;
    }
    
    .stat-item {
        min-width: unset;
        width: 100%;
        padding: 16px;
        background: var(--accent-dim);
        border-radius: var(--radius-md);
    }

    .stat-value { font-size: 24px; }

    /* Result Page Mobile */
    .result-header {
        height: auto;
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .result-header > div:first-child {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .result-header > div:last-child {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .main-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 120px);
    }

    .graph-section {
        min-height: 300px;
        max-height: 400px;
    }

    #mountNode {
        height: 300px;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    #progressPanel {
        padding: 24px 16px;
    }

    #progressIcon {
        font-size: 36px;
    }

    #progressTitle {
        font-size: 16px;
    }

    #progressDesc {
        font-size: 13px;
    }

    .side-panel {
        width: 100%;
        padding: 16px;
        gap: 16px;
    }

    .summary-card {
        padding: 16px;
    }

    .summary-title {
        font-size: 14px;
    }

    .summary-text {
        font-size: 13px;
    }

    /* 支付弹窗手机端优化 */
    #paymentModal > div {
        width: 90% !important;
        max-width: 400px;
        padding: 24px !important;
        border-radius: 16px !important;
        margin: 16px;
    }

    #modalAmount { font-size: 24px !important; }
    
    /* 刷新按钮优化 */
    #refreshBtn {
        padding: 6px 10px;
    }
}

/* Footer */
.footer-home {
    margin-top: auto;
    padding: 48px 0;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 400;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-section > * {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.brand-container { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.3s; }
.chain-dropdown { animation-delay: 0.4s; }
.search-container { animation-delay: 0.5s; }
.stats-summary { animation-delay: 0.6s; }
