/* ========================================
   铜期货数据跟踪平台 - 样式文件
   主题：明亮风格
   ======================================== */

/* 基础样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

*::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
}

/* 网格背景 */
.grid-bg {
    background-image: 
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* 玻璃态卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 铜色边框光效 */
.copper-glow {
    position: relative;
}

.copper-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.3), rgba(180, 83, 9, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 主要价格卡片 */
.price-card {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.price-card:hover {
    border-color: rgba(217, 119, 6, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(217, 119, 6, 0.25);
}

/* 涨跌颜色 */
.quote-up { color: #10b981; }
.quote-down { color: #ef4444; }
.quote-neutral { color: #64748b; }

/* 数据更新闪光 */
.flash-update { animation: flash 0.6s ease-out; }

@keyframes flash {
    0% { background-color: rgba(217, 119, 6, 0.2); }
    100% { background-color: transparent; }
}

/* 导航栏 */
.nav-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #d97706, #b45309);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: #475569;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1e293b;
}

/* 表格样式 */
.data-table th {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.data-table tr {
    transition: background-color 0.15s ease;
}

.data-table tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* 选择器样式 */
.custom-select {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #334155;
    transition: all 0.2s ease;
}

.custom-select:hover,
.custom-select:focus {
    border-color: rgba(217, 119, 6, 0.6);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* 模态框 */
.modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 告警徽章 */
.alert-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* 通知提示 */
.toast {
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* 图表容器 */
#chart-container {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

#history-chart-container {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* 主视图切换 */
.view-tab {
    color: #64748b;
    border: 1px solid transparent;
    background: rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.view-tab:hover {
    color: #334155;
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.05);
}

.view-tab-active {
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.35);
    background: linear-gradient(145deg, rgba(217, 119, 6, 0.12), rgba(180, 83, 9, 0.08));
}

/* 历史数据快捷筛选 */
.history-day-btn {
    color: #475569;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    transition: all 0.2s ease;
}

.history-day-btn:hover {
    color: #334155;
    border-color: rgba(217, 119, 6, 0.45);
}

.history-day-active {
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.45);
    background: rgba(217, 119, 6, 0.08);
}

/* 历史统计卡片 */
.history-stat-card {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.history-stat-label {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.history-stat-value {
    font-family: 'JetBrains Mono', monospace;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 600;
}

/* 状态指示器 */
.status-dot {
    box-shadow: 0 0 8px currentColor;
}

/* 输入框 */
.input-dark {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #334155;
    transition: all 0.2s ease;
}

.input-dark:focus {
    border-color: rgba(217, 119, 6, 0.6);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
    outline: none;
}

/* 登录页面特殊样式 */
.bg-gradient-radial {
    background: radial-gradient(ellipse at top, rgba(217, 119, 6, 0.12), transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(180, 83, 9, 0.08), transparent 50%),
                #f8fafc;
}

/* 玻璃态效果 - 登录框 */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 输入框样式 - 登录页 */
.input-field {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.input-field:focus {
    background: #ffffff;
    border-color: rgba(217, 119, 6, 0.6);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* 按钮光效 */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* 浮动装饰 */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 错误提示动画 */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.error-animate {
    animation: slideDown 0.3s ease-out;
}
