/* ============ Hero 主页区域 ============ */
.hero-section {
    background: linear-gradient(135deg, #0b0e11 0%, #1a1e24 50%, #0b0e11 100%);
    border-bottom: 1px solid #2b2f36;
    padding: 32px 20px;
    text-align: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #f0b90b;
    box-shadow: 0 0 20px rgba(240, 185, 11, 0.15);
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #f0b90b;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.hero-desc {
    font-size: 13px;
    color: #848e9c;
    letter-spacing: 0.5px;
}

/* ============ NFTSniper 风格 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 浏览器自动填充样式覆盖 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #0b0e11 inset !important;
    -webkit-text-fill-color: #eaecef !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #eaecef;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #0b0e11;
    color: #eaecef;
    min-height: 100vh;
    font-size: 13px;
}

/* ============ 登录页 ============ */
.login-container {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; padding: 20px;
}
.login-card {
    background: #1b1d21; border: 1px solid #2b2f36; border-radius: 8px;
    padding: 36px; width: 100%; max-width: 380px;
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-header h1 { color: #f0b90b; font-size: 24px; margin-bottom: 6px; }
.login-header p { color: #848e9c; font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-footer { text-align: center; margin-top: 24px; color: #848e9c; font-size: 11px; }
.error-message {
    background: rgba(246,70,93,0.1); border: 1px solid #f6465d;
    border-radius: 4px; padding: 10px; color: #f6465d; font-size: 13px;
}

/* ============ 顶部导航栏 ============ */
.app-container { min-height: 100vh; display: flex; flex-direction: column; }

.header {
    background: #1b1d21;
    border-bottom: 1px solid #2b2f36;
    padding: 0 16px;
    height: 40px;
    display: flex;
    align-items: center;
}
.header-content {
    display: flex; align-items: center; width: 100%;
    gap: 0;
}
.logo {
    color: #eaecef; font-size: 14px; font-weight: 700;
    margin-right: 24px; white-space: nowrap;
}
.arrow { font-size: 10px; color: #848e9c; margin-left: 2px; }

/* 下拉菜单 */
.nav-tab-dropdown { position: relative; }
.nav-tab-dropdown .nav-tab { cursor: pointer; }
.dropdown-menu {
    display: none; position: absolute; top: 40px; left: 0;
    background: #1b1d21; border: 1px solid #2b2f36; border-radius: 4px;
    min-width: 140px; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    padding: 4px 0;
}
.nav-tab-dropdown:hover .dropdown-menu { display: block; }
.dropdown-item {
    padding: 8px 16px; font-size: 13px; color: #848e9c;
    cursor: pointer; transition: all 0.15s;
}
.dropdown-item:hover { background: #2b2f36; color: #eaecef; }
.dropdown-item.active { color: #f0b90b; }

/* 导航标签 - 模仿NFTSniper顶栏 */
.top-nav { display: flex; gap: 0; flex: 1; height: 40px; }
.nav-tab {
    padding: 0 16px; height: 40px; line-height: 40px;
    cursor: pointer; font-size: 13px; font-weight: 400;
    color: #848e9c; transition: all 0.15s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-tab:hover { color: #eaecef; }
.nav-tab.active {
    color: #eaecef; font-weight: 500;
    border-bottom-color: #f0b90b;
    background: none;
}

.header-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chain-select {
    background: #2b2f36; border: 1px solid #363a45; border-radius: 4px;
    padding: 4px 8px; color: #eaecef; font-size: 12px; height: 28px;
}
.chain-select:focus { outline: none; border-color: #f0b90b; }

/* ============ 主内容 ============ */
.content {
    flex: 1; padding: 16px;
    max-width: 100%; width: 100%;
}
.page { display: none; }
.page.active { display: block; }

.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid #2b2f36;
}
.page-header h2 { color: #eaecef; font-size: 16px; font-weight: 600; }
.page-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ 子标签 ============ */
.sub-tabs {
    display: flex; gap: 0; margin-bottom: 16px;
    border-bottom: 1px solid #2b2f36;
}
.sub-tab {
    padding: 8px 16px; cursor: pointer;
    font-size: 13px; color: #848e9c;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.sub-tab:hover { color: #eaecef; }
.sub-tab.active { color: #eaecef; border-bottom-color: #f0b90b; }

.sub-page { display: none; }
.sub-page.active { display: block; }

/* ============ 表单 ============ */
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-group label { color: #848e9c; font-weight: 500; font-size: 12px; }
.form-group input, .form-group select, .form-group textarea {
    background: #0b0e11; border: 1px solid #2b2f36; border-radius: 4px;
    padding: 8px 12px; color: #eaecef; font-size: 13px;
    transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #f0b90b;
}
.form-group textarea { resize: vertical; min-height: 60px; font-family: inherit; }

.form-row { display: flex; gap: 10px; align-items: flex-start; }
.flex-1 { flex: 1; }

/* ============ 卡片 ============ */
.card {
    background: #1b1d21; border: 1px solid #2b2f36;
    border-radius: 4px; padding: 16px;
}

/* ============ 按钮 ============ */
.btn {
    padding: 6px 14px; border: none; border-radius: 4px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; display: inline-flex;
    align-items: center; justify-content: center; gap: 4px;
    height: 28px; line-height: 1;
}
.btn-primary { background: #f0b90b; color: #0b0e11; }
.btn-primary:hover:not(:disabled) { background: #d4a50a; }
.btn-secondary { background: #2b2f36; color: #eaecef; }
.btn-secondary:hover:not(:disabled) { background: #363a45; }
.btn-success { background: #0ecb81; color: #0b0e11; }
.btn-success:hover:not(:disabled) { background: #0bb374; }
.btn-danger { background: #f6465d; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #d93a50; }
.btn-sm { padding: 4px 10px; font-size: 11px; height: 24px; }
.btn-lg { padding: 10px 24px; font-size: 13px; width: 100%; margin-top: 8px; height: 36px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ 钱包列表 ============ */
.wallet-content { display: flex; gap: 12px; }
.groups-panel {
    width: 160px; flex-shrink: 0;
    background: #1b1d21; border: 1px solid #2b2f36;
    border-radius: 4px; padding: 12px;
}
.groups-panel h3 { color: #848e9c; font-size: 12px; margin-bottom: 8px; text-transform: uppercase; }
.wallets-panel { flex: 1; min-width: 0; }

.groups-list { display: flex; flex-direction: column; gap: 2px; }
.group-item {
    padding: 6px 10px; background: transparent; border-radius: 4px;
    cursor: pointer; transition: all 0.15s; font-size: 12px; color: #848e9c;
}
.group-item:hover { background: #2b2f36; color: #eaecef; }
.group-item.active { background: #2b2f36; color: #f0b90b; }

/* 筛选栏 */
.filter-bar {
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 12px; padding: 8px 0;
    flex-wrap: wrap;
}
.filter-group {
    display: flex; align-items: center; gap: 10px;
}
.filter-label {
    color: #848e9c; font-size: 13px; white-space: nowrap;
}
.filter-input {
    background: #0b0e11; border: 1px solid #2b2f36; border-radius: 4px;
    padding: 5px 10px; color: #eaecef; font-size: 12px;
    width: 340px; font-family: 'SF Mono', monospace;
}
.filter-input:focus { outline: none; border-color: #f0b90b; }
.filter-input::placeholder { color: #484d56; }
.radio-item {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-size: 13px; color: #848e9c;
    user-select: none;
}
.radio-item input[type="radio"] { display: none; }
.radio-circle {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #484d56; display: inline-block;
    position: relative; transition: all 0.15s;
}
.radio-item input[type="radio"]:checked + .radio-circle,
.radio-item input[type="checkbox"]:checked + .radio-circle.multi {
    border-color: #f0b90b;
}
.radio-item input[type="radio"]:checked + .radio-circle::after,
.radio-item input[type="checkbox"]:checked + .radio-circle.multi::after {
    content: ''; position: absolute;
    top: 2px; left: 2px; width: 6px; height: 6px;
    background: #f0b90b; border-radius: 50%;
}
.radio-item input[type="radio"]:checked ~ span,
.radio-item:has(input:checked) { color: #eaecef; }

.table-container { overflow-x: auto; max-height: 500px; overflow-y: auto; }
.table-container table thead { position: sticky; top: 0; z-index: 2; background: #1a1e24; }
.wallets-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wallets-table th, .wallets-table td {
    padding: 8px 10px; text-align: left;
    border-bottom: 1px solid #1e2026;
}
.wallets-table th {
    background: #1b1d21; font-weight: 500; color: #848e9c;
    font-size: 11px; text-transform: uppercase;
    position: sticky; top: 0;
}
.wallets-table tbody tr:hover { background: #1e2329; }
.wallet-address {
    font-family: 'SF Mono', 'Courier New', monospace; font-size: 11px;
    color: #848e9c; cursor: pointer;
}
/* 隐藏number输入框的上下箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* 开关样式 */
.toggle-slider {
    width: 36px; height: 18px; background: #484d56; border-radius: 9px;
    position: relative; transition: background 0.2s; display: inline-block;
}
.toggle-slider::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px; background: #eaecef; border-radius: 50%;
    transition: transform 0.2s;
}
input:checked + .toggle-slider {
    background: #f0b90b;
}
input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.copy-icon {
    cursor: pointer; color: #484d56; font-size: 13px;
    transition: color 0.15s; vertical-align: middle;
}
.copy-icon:hover { color: #f0b90b; }
.wallet-balance { font-weight: 500; color: #0ecb81; font-size: 12px; }

/* ============ 选中钱包 ============ */
.selected-wallets-list {
    background: #0b0e11; border: 1px solid #2b2f36; border-radius: 4px;
    padding: 8px; font-size: 12px; color: #848e9c;
    max-height: 100px; overflow-y: auto;
}
.selected-wallet-tag {
    display: inline-block; background: #2b2f36; border-radius: 2px;
    padding: 2px 6px; margin: 1px; font-size: 11px; color: #eaecef;
}

/* ============ 表单内容区 ============ */
.collect-content, .contract-content, .inscription-content {
    max-width: 600px;
}

/* 分发页面 */
.distribute-page-header { margin-bottom: 12px; }
.distribute-page-header h2 { color: #eaecef; font-size: 16px; font-weight: 600; }

.distribute-settings {
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 16px; flex-wrap: wrap;
}

.distribute-dual-panel {
    display: flex; align-items: stretch; gap: 0;
}
.distribute-panel {
    flex: 1; min-width: 0; min-height: 360px;
    display: flex; flex-direction: column;
}
.distribute-panel .panel-header {
    color: #848e9c; font-size: 12px; text-transform: uppercase;
    margin-bottom: 10px; font-weight: 500;
}
.distribute-arrow {
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #f0b90b; padding: 0 20px;
    font-weight: 700; flex-shrink: 0;
}
.distribute-wallet-list {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
    max-height: 500px;
}
.distribute-wallet-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 4px; cursor: pointer;
    transition: background 0.15s; font-size: 12px;
}
.distribute-wallet-item:hover { background: #2b2f36; }
.distribute-wallet-item.selected { background: rgba(240,185,11,0.1); }
.distribute-wallet-item .wallet-name { color: #eaecef; min-width: 60px; }
.distribute-wallet-item .wallet-addr {
    color: #848e9c; font-family: 'SF Mono', monospace; font-size: 11px;
}
.distribute-textarea {
    flex: 1; background: #0b0e11; border: 1px solid #2b2f36; border-radius: 4px;
    padding: 10px 12px; color: #eaecef; font-size: 12px;
    font-family: 'SF Mono', monospace; resize: none; line-height: 1.8;
    min-height: 300px;
}
.distribute-textarea:focus { outline: none; border-color: #f0b90b; }
.distribute-textarea::placeholder { color: #484d56; }

@media (max-width: 768px) {
    .distribute-dual-panel { flex-direction: column; }
    .distribute-arrow { transform: rotate(90deg); padding: 10px 0; }
}

/* ============ 结果面板 ============ */
.results-panel {
    background: #1b1d21; border: 1px solid #2b2f36;
    border-radius: 4px; padding: 12px; margin-top: 12px;
    max-height: 400px; overflow-y: auto;
}
.results-panel h3 { color: #eaecef; margin-bottom: 8px; font-size: 13px; }
.result-item {
    background: #0b0e11; border-radius: 4px; padding: 8px 10px;
    margin-bottom: 4px; border-left: 3px solid #2b2f36; font-size: 12px;
    font-family: 'SF Mono', monospace;
}
.result-item.success { border-left-color: #0ecb81; }
.result-item.error { border-left-color: #f6465d; }
.result-item.pending { border-left-color: #f0b90b; }

/* ============ 模态框 ============ */
.modal {
    display: none; position: fixed; z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
}
.modal.show { display: flex; justify-content: center; align-items: center; padding: 20px; }
.modal-content {
    background: #1b1d21; border: 1px solid #2b2f36;
    border-radius: 8px; padding: 24px; width: 100%; max-width: 440px;
    max-height: 80vh; overflow-y: auto;
}
.modal-content h3 { color: #eaecef; margin-bottom: 16px; text-align: center; font-size: 15px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ============ 日志 ============ */
.log-panel {
    position: fixed; bottom: 0; left: 0; right: 0; height: 240px;
    background: #1b1d21; border-top: 1px solid #2b2f36; z-index: 100;
}
.log-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 16px; border-bottom: 1px solid #2b2f36;
}
.log-header h3 { color: #eaecef; font-size: 12px; }
.log-content {
    height: calc(100% - 36px); overflow-y: auto; padding: 8px 16px;
    font-family: 'SF Mono', 'Courier New', monospace; font-size: 11px; line-height: 1.6;
}
.log-entry { padding: 0; }
.log-entry.success { color: #0ecb81; }
.log-entry.error { color: #f6465d; }
.log-entry.info { color: #1e9cf4; }
.log-entry.warning { color: #f0b90b; }

/* ============ 通用 ============ */
.hidden { display: none !important; }
.loader {
    width: 12px; height: 12px; border: 2px solid #2b2f36;
    border-top: 2px solid #f0b90b; border-radius: 50%;
    animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.text-success { color: #0ecb81; }
.text-error { color: #f6465d; }
.text-warning { color: #f0b90b; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0b0e11; }
::-webkit-scrollbar-thumb { background: #2b2f36; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #363a45; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .header { padding: 0 8px; }
    .logo { font-size: 12px; margin-right: 12px; }
    .top-nav { overflow-x: auto; }
    .nav-tab { padding: 0 10px; font-size: 12px; }
    .content { padding: 10px; }
    .wallet-content { flex-direction: column; }
    .groups-panel { width: 100%; }
    .page-header { flex-direction: column; gap: 8px; }
    .form-row { flex-direction: column; }
}
