/* ============================================================
   工银积存金价格监控 - 玻璃形态科技金融风UI
   基于 UI/UX Pro Max Glassmorphism 设计系统：
   - backdrop-filter: blur(16px) + saturate(120%)
   - 半透明背景 rgba(15, 23, 42, 0.4-0.55)
   - 极细边框 1px rgba(255,255,255,0.06-0.12)
   - 顶部光线反射 pseudo-element
   - 多层次景深 z-index 分层
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
    /* 深空底色 - 玻璃形态需要丰富的下层色彩 */
    --bg-deep: #040a18;
    --bg-space: #060e24;
    --bg-elevated: #0d1730;

    /* 玻璃面板 */
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-bg-hover: rgba(20, 30, 52, 0.55);
    --glass-bg-card: rgba(12, 19, 35, 0.50);
    --glass-bg-input: rgba(10, 16, 28, 0.55);
    --glass-blur: 16px;

    /* 边框 */
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-hover: rgba(255, 255, 255, 0.14);
    --border-accent: rgba(59, 130, 246, 0.25);
    --border-gold: rgba(245, 158, 11, 0.25);

    /* 文字 */
    --text-primary: #e8edf5;
    --text-secondary: #94a3b8;
    --text-muted: #5c6e8a;

    /* 强调色 */
    --accent-blue: #60a5fa;
    --accent-gold: #f59e0b;
    --accent-green: #34d399;
    --accent-purple: #a78bfa;
    --accent-red: #f87171;

    /* 字体 */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', 'Courier New', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-sans);
    /* 深邃渐变背景 — 玻璃形态的"画布底色" */
    background:
        radial-gradient(ellipse 120% 80% at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 100% 60% at 80% 100%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        linear-gradient(170deg, #040a18 0%, #060e24 35%, #0a1530 70%, #060c1c 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ---------- 网格底纹背景 ---------- */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.018) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

.grid-glow {
    position: fixed;
    top: -15%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 70%;
    background:
        radial-gradient(ellipse at 30% 20%,
            rgba(59, 130, 246, 0.06) 0%,
            transparent 50%),
        radial-gradient(ellipse at 70% 80%,
            rgba(245, 158, 11, 0.04) 0%,
            transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* ---------- 顶部状态栏 - 玻璃形态 ---------- */
.header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 64px;
    background: rgba(10, 17, 30, 0.6);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* 顶部玻璃光泽反光 */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 30%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.15) 70%, transparent 100%);
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 10px;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
    }
    50% {
        opacity: 0.85;
        filter: drop-shadow(0 0 16px rgba(96, 165, 250, 0.8))
                drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
    }
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #93c5fd 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-label {
    color: var(--text-muted);
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: var(--accent-green);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
    animation: dot-pulse 2s ease-in-out infinite;
}

.status-error {
    background: var(--accent-red);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.6);
}

.status-idle {
    background: var(--text-muted);
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

#workTimeText {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.work-time-active {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.work-time-inactive {
    background: rgba(92, 110, 138, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(92, 110, 138, 0.3);
}

/* ---------- 玻璃按钮 - 通用 ---------- */
.glass-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: var(--accent-blue);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.glass-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.glass-btn:hover::before {
    opacity: 1;
}

.glass-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.glass-btn:active {
    transform: scale(0.96) translateY(0);
}

.glass-btn svg {
    transition: transform 0.5s ease;
}

.glass-btn:active svg {
    transform: rotate(180deg);
}

/* 保持原有类名兼容 */
.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: var(--accent-blue);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.refresh-btn:hover::before {
    opacity: 1;
}

.refresh-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.refresh-btn:active {
    transform: scale(0.96) translateY(0);
}

.refresh-btn svg {
    transition: transform 0.5s ease;
}

.refresh-btn:active svg {
    transform: rotate(180deg);
}

/* ---------- 主内容区 ---------- */
.main {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px 48px;
}

/* ============================================================
   玻璃卡片 - 核心样式
   ============================================================ */

/* 通用玻璃面板 Mixin */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(130%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* 顶部光线反射（通用） */
.glass-reflect {
    position: relative;
    overflow: hidden;
}

.glass-reflect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* ---------- 价格卡片 - 玻璃形态 ---------- */
.price-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.price-card {
    position: relative;
    background: var(--glass-bg-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* 顶部玻璃光泽反光条 */
.price-card::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 30%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 70%,
        transparent 100%);
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.price-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.price-card:hover::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.15) 70%,
        transparent 100%);
}

.card-indicator {
    height: 3px;
    width: 100%;
}

.indicator-blue {
    background: linear-gradient(90deg, var(--accent-blue), rgba(96, 165, 250, 0.2));
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.indicator-gold {
    background: linear-gradient(90deg, var(--accent-gold), rgba(245, 158, 11, 0.2));
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.indicator-green {
    background: linear-gradient(90deg, var(--accent-green), rgba(52, 211, 153, 0.2));
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.indicator-purple {
    background: linear-gradient(90deg, var(--accent-purple), rgba(167, 139, 250, 0.2));
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

.card-body {
    padding: 20px 24px;
    position: relative;
}

.card-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
}

.value-blue {
    color: var(--accent-blue);
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

.value-gold {
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.value-green {
    color: var(--accent-green);
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
}

.value-purple {
    color: var(--accent-purple);
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}

.card-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---------- 图表区域 - 玻璃面板 ---------- */
.chart-section {
    background: var(--glass-bg-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(130%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

/* 图表玻璃面板顶部反光 */
.chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 14px;
}

.chart-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-gold));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

/* ---------- 范围按钮 - 玻璃样式 ---------- */
.range-buttons {
    display: flex;
    gap: 8px;
}

.range-btn {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.range-btn:hover {
    border-color: var(--border-glass-hover);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.range-btn.active {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.2) 0%,
        rgba(245, 158, 11, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
    box-shadow:
        0 0 16px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- 日期选择器 - 玻璃样式 ---------- */
.date-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-picker-wrapper label {
    font-size: 13px;
    color: var(--text-secondary);
}

.date-picker-wrapper input[type="date"] {
    padding: 6px 12px;
    background: var(--glass-bg-input);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    color-scheme: dark;
    transition: all 0.2s ease;
}

.date-picker-wrapper input[type="date"]:hover {
    border-color: var(--border-glass-hover);
}

.date-picker-wrapper input[type="date"]:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

/* 加载按钮 - 玻璃样式 */
.load-btn {
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: var(--accent-blue);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.load-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.load-btn:active {
    transform: scale(0.96) translateY(0);
}

/* ---------- 图表容器 ---------- */
.chart-container {
    position: relative;
    height: 320px;
}

/* ---------- 预警配置区域 - 玻璃面板 ---------- */
.alert-section {
    background: var(--glass-bg-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(130%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

/* 预警面板顶部反光 */
.alert-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.alert-section .chart-title {
    margin-bottom: 20px;
}

.alert-form {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-glass);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 玻璃输入框 */
.form-group select,
.form-group input {
    padding: 8px 12px;
    background: var(--glass-bg-input);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.25s ease;
}

.form-group select:hover,
.form-group input:hover {
    border-color: var(--border-glass-hover);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.form-group select {
    cursor: pointer;
    color-scheme: dark;
}

/* 添加预警按钮 - 玻璃高亮 */
.add-alert-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0.25) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.add-alert-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5) 0%, rgba(37, 99, 235, 0.35) 100%);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.add-alert-btn:active {
    transform: scale(0.96) translateY(0);
}

/* ---------- 预警列表 ---------- */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: 14px;
}

/* 预警项 - 玻璃行 */
.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-glass-hover);
}

.alert-item.alert-disabled {
    opacity: 0.45;
}

.alert-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.alert-direction {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.alert-up {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.alert-down {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.alert-price {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    white-space: nowrap;
}

.alert-webhook {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.alert-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 预警操作按钮 - 玻璃样式 */
.alert-actions button {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.btn-toggle:hover {
    border-color: rgba(96, 165, 250, 0.4);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.btn-test:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.1);
}

.btn-delete:hover {
    border-color: rgba(248, 113, 113, 0.4);
    color: var(--accent-red);
    background: rgba(248, 113, 113, 0.1);
}

/* ---------- 滚动条样式 ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(4, 10, 24, 0.6);
    backdrop-filter: blur(4px);
}

::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.15);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.3);
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 1024px) {
    .price-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .alert-form {
        grid-template-columns: 1fr 1fr;
    }

    .form-group-webhook {
        grid-column: span 2;
    }

    .add-alert-btn {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: auto;
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .main {
        padding: 16px;
    }

    .price-cards {
        grid-template-columns: 1fr;
    }

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

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-form {
        grid-template-columns: 1fr;
    }

    .form-group-webhook {
        grid-column: span 1;
    }

    .add-alert-btn {
        grid-column: span 1;
    }

    .alert-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .alert-info {
        flex-wrap: wrap;
    }

    .alert-webhook {
        max-width: 100%;
    }
}

/* ============================================================
   3D金融视觉升级 - 保留样式
   ============================================================ */

/* ---------- 背景画布 ---------- */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- 涨跌趋势箭头 ---------- */
.price-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    line-height: 1;
}

.price-trend.trend-show {
    animation: trend-fade-in 0.3s ease forwards;
}

.price-trend.trend-hide {
    animation: trend-fade-out 0.5s ease forwards;
}

@keyframes trend-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes trend-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ---------- 价格数字跳动效果 ---------- */
.card-value.pulse {
    animation: card-value-pulse 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes card-value-pulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
    40% {
        transform: scale(1.18);
        text-shadow: 0 0 40px rgba(245, 158, 11, 0.9),
                     0 0 20px rgba(255, 255, 255, 0.6),
                     0 0 10px rgba(245, 158, 11, 0.7);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
}

/* ---------- 实时价格发光脉动 ---------- */
#activePrice {
    animation: active-price-glow 2s ease-in-out infinite;
}

@keyframes active-price-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(96, 165, 250, 0.6),
                     0 0 10px rgba(245, 158, 11, 0.35);
    }
    50% {
        text-shadow: 0 0 35px rgba(96, 165, 250, 0.85),
                     0 0 22px rgba(245, 158, 11, 0.65),
                     0 0 12px rgba(255, 255, 255, 0.35);
    }
}

/* ---------- 底部备案与免责声明 - 玻璃形态 ---------- */
.site-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-glass);
    background: rgba(6, 12, 24, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%);
    pointer-events: none;
}

.site-footer .disclaimer {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(148, 163, 184, 0.45);
    margin: 0 0 8px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer .icp {
    margin: 0 0 8px;
}

.site-footer .icp:last-child {
    margin-bottom: 0;
}

.site-footer .icp a {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .icp a:hover {
    color: rgba(96, 165, 250, 0.75);
    text-decoration: underline;
}

/* 公安备案号 - 国徽图标 + 文字 */
.site-footer .police-beian {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.site-footer .police-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    vertical-align: middle;
}
