@charset "utf-8";
/* style.css - 恢复您原有的清新风格 + 手机端深度优化 */

@font-face {
    font-family: 'RadioLand';
    src: url('LCD.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 16px;
    color: #334155;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* =============== 头部 =============== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    display: inline-block;
    letter-spacing: -0.5px;
}

.header p {
    color: #64748b;
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.25s;
    padding: 8px 16px;
    border-radius: 24px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

.nav-links a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.admin-badge {
    background: #f0f7ff;
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #bfdbfe;
}

.logout-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logout-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* =============== 统计卡片 =============== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 28px;
    padding: 26px 18px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.12);
    position: relative;
    overflow: hidden;
	border-left: 4px solid #FFC107;
    border-right: 4px solid #FFC107;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102,126,234,0.08) 0%, transparent 70%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.25);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 2.8rem;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    color: #9C27B0;
    line-height: 1.2;
    font-family: 'RadioLand', fantasy;
	letter-spacing: 5px;
}

.stat-label {
    color: #64748b;
    font-size: 0.88rem;
    margin-top: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* =============== 区域容器 =============== */
.trend-section, .details-section, .day-details-section, .admin-section {
    background: white;
    border-radius: 28px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
    border: 1px solid #f1f5f9;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0.3;
    z-index: -1;
}

/* =============== K线图 =============== */
.kline-container {
    overflow-x: auto;
    padding: 16px 0;
    margin: 0 -10px;
}

.kline-chart {
    display: flex;
    gap: 16px;
    min-width: 700px;
    padding: 0 10px;
}

.kline-item {
    flex: 1;
    min-width: 75px;
    text-align: center;
    padding: 12px 6px;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.25s;
    position: relative;
    background: #f8fafc;
}

.kline-item:hover {
    transform: translateY(-3px);
    background: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.kline-item.active {
    background: #eef7ff;
    box-shadow: 0 0 10px 0px #FFC107;
    transform: translateY(-4px);
}

.kline-candle-wrapper {
    position: relative;
    height: 130px;
    margin: 12px 0;
    background: rgba(248, 250, 252, 0.6);
    border-radius: 10px;
    overflow: hidden;
}

.kline-shadow {
    position: absolute;
    width: 3px;
    background: rgba(100, 100, 100, 0.45);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.kline-candle {
    position: absolute;
    width: 36px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    min-height: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.candle-rise {
    background: linear-gradient(to top, #4CAF50, #8BC34A);
    border: 1px solid #4CAF50;
}

.candle-fall {
    background: linear-gradient(to top, #E91E63, #F44336);
    border: 1px solid #E91E63;
}

.kline-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.kline-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    margin-top: 8px;
}

.kline-volume {
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 14px;
    color: #475569;
    font-weight: 500;
}

.kline-change {
    padding: 3px 10px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.85rem;
}

.change-rise {
    color: #0d9488;
    background: rgba(38, 166, 154, 0.12);
}

.change-fall {
    color: #b91c1c;
    background: rgba(239, 83, 80, 0.12);
}
/* =============== 折线图样式 =============== */
.trend-section {
    margin: 20px 0;
}

.chart-container {
    position: relative;
    height: auto;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 10px;
}

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

.chart-stats {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-change {
    font-size: 0.95rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #0d9488;
}

.stat-change.negative {
    color: #dc2626;
}

.chart-controls {
    margin-bottom: 15px;
}

.time-filter {
    display: flex;
    background: #f1f8ff;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-size: 0.95rem;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.chart-area {
    position: relative;
    width: 100%;
    height: auto;
    margin: 15px 0 10px;
    aspect-ratio: 900 / 250;  /* 添加这一行，匹配 viewBox 比例 */
}

.line-chart {
    width: 100%;
    height: 100%;
    display: block;
}

.empty-chart {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 1.2rem;
    font-weight: 500;
}

.x-axis-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 0 20px;
}

.x-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    flex: 1;
    min-width: 60px;
}

.y-axis-labels {
    position: absolute;
    left: 10px;
    top: 30px;
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 10px;
    z-index: 3;
}

.y-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
    text-align: right;
    min-width: 40px;
}

.data-point {
    cursor: pointer;
    transition: all 0.3s ease;
}

.data-point:hover {
    r: 8;
    stroke: white;
    stroke-width: 2;
}

.tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 100;
    transform: translateX(-50%) translateY(-120%);
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    min-width: 260px;
    border-left: 4px solid #3b82f6;
}

.tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-150%);
}

.tooltip-date {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e40af;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tooltip-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.85rem;
    color: #64748b;
}

.metric-value {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 2px;
}

.legend {
    display: flex;
    gap: 25px;
    margin-top: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.legend-color {
    width: 24px;
    height: 4px;
    border-radius: 2px;
}

.legend-primary {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
/* ECharts 容器优化 */
#echarts-chart {
    border-radius: 16px;
    transition: all 0.3s ease;
}

/* 图表加载动画 */
.echarts-loading {
    border-radius: 16px;
}

/* 工具栏图标样式 */
.echarts-toolbox-icon {
    border-radius: 8px !important;
}

.echarts-toolbox-icon:hover {
    background: rgba(59, 130, 246, 0.1) !important;
}

/* 添加加载动画样式 */
.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chart-container {
        padding: 15px;
    }
    
    .chart-stats {
        gap: 15px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .chart-area {
        height: 300px;
    }
    
    .time-filter {
        width: 100%;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .x-axis-labels {
        flex-wrap: wrap;
    }
    
    .x-label {
        min-width: 45px;
        font-size: 0.8rem;
        padding: 0 3px;
    }
    
    .tooltip {
        min-width: 240px;
    }
	 .data-point {
        r: 16 !important;  /* 触摸区域变大 */
        stroke: #3b82f6;
        stroke-width: 2;
        fill: white;
    }
    
    .data-point:hover {
        r: 16 !important;
        stroke-width: 3;
    }
}

@media (max-width: 480px) {
    .chart-area {
        height: 260px;
    }
    
    .stat-item {
        min-width: 100px;
    }
    
    .x-label {
        font-size: 0.75rem;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

/* 统计代码卡片样式 */
.stat-code-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    padding: 10px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-code-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.stat-code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-code-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-code-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.stat-code-desc {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.stat-code-desc code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #d946ef;
}

.stat-code-box {
    background: #673AB7;
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    border: 1px solid #334155;
}

.stat-code-content {
    font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    color: #a5f3c3;
    background: transparent;
    padding: 0;
    margin: 0;
    word-break: break-all;
    line-height: 1.5;
    flex: 1;
}

.stat-code-copy {
    background: #3b82f6;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.stat-code-copy:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.stat-code-copy:active {
    transform: translateY(0);
}

.stat-code-note {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .stat-code-card {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
    }
    
    .stat-code-header h4 {
        color: #f1f5f9;
    }
    
    .stat-code-desc {
        color: #94a3b8;
    }
    
    .stat-code-box {
        background: #020617;
    }
    
    .stat-code-note {
        color: #94a3b8;
        border-top-color: #334155;
    }
}

/* 手机端适配 */
@media (max-width: 640px) {
    .stat-code-card {
        padding: 18px;
    }
    
    .stat-code-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-code-content {
        font-size: 0.75rem;
        word-break: break-all;
    }
    
    .stat-code-copy {
        width: 100%;
        justify-content: center;
    }
}

/* =============== 表格 =============== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
    margin: 0 -10px;
    padding: 0 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 750px;
}

th {
    background: #f8fafc;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
}

td {
    padding: 13px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.97rem;
}

tr:hover {
    background: #fefce8;
}

.ip-badge {
    font-family: 'SF Mono', 'Menlo', monospace;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4338ca;
    display: inline-block;
    border: 1px solid #c7d2fe;
}

.referer-text {
    max-width: 350px;
    white-space: nowrap;
    font-size: 0.8rem;
    color: #2563eb;
    cursor: pointer;
    scrollbar-width: thin;
    scrollbar-color: #667eea #e2e8f0;
}

.referer-link {
    text-decoration: none;
    display: inline-block;
    max-width: 320px;
}

.referer-link:hover .referer-text {
    text-decoration: underline;
    color: #1d4ed8;
}

.empty-row td {
    text-align: center;
    color: #94a3b8;
    padding: 35px;
    font-style: italic;
    font-size: 1.1rem;
}

/* =============== 按钮与表单 =============== */
.sort-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sort-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-btn:hover:not(.active) {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.sort-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

/* =============== 后台管理专用样式 =============== */
.admin-section {
    display: none;
    margin-top: 20px;
    border-top: 3px solid #764ba2;
}

.admin-title {
    color: #764ba2;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.admin-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.admin-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.admin-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 1.02rem;
    transition: border-color 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.02rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.btn:hover::after {
    opacity: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #e53935);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.92rem;
    border-radius: 24px;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
    border: 1px solid #e2e8f0;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input:checked + .slider {
    background-color: #667eea;
    border-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: white;
}

.alert {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 22px;
    font-size: 0.95rem;
    align-items: flex-start;
    border-left: 4px solid transparent;
}

.alert::before {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    content: "";
}

.alert-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #0d47a1;
}

.alert-info::before { background: #2196f3; }

.alert-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #1b5e20;
}

.alert-success::before { background: #4caf50; }

.alert-warning {
    background: #fffde7;
    border-color: #ffc107;
    color: #5d4037;
}

.alert-warning::before { background: #ffc107; }

.alert-danger {
    background: #ffebee;
    border-color: #f44336;
    color: #b71c1c;
}

.alert-danger::before { background: #f44336; }

/* =============== 登录页 =============== */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    border-radius: 32px;
    padding: 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.login-header p {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.5;
}

.alert-login {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.alert-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #0d47a1;
    border-left: 4px solid #2196f3;
}

.btn-login {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.55);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

/* =============== 页脚 =============== */
footer {
    text-align: center;
    padding: 22px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    margin-top: 10px;
    line-height: 1.5;
}

/* =============== 响应式（深度优化手机端） =============== */
@media (max-width: 768px) {
    body { padding: 12px; }
    
    .header { padding: 20px 16px; border-radius: 24px; }
    .header h1 { font-size: 1.45rem; }
    .header p { font-size: 0.9rem; margin-top: 8px; }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 14px; 
    }
    .stat-card { 
        padding: 20px 14px; 
        border-radius: 24px;
    }
    .stat-number { font-size: 2.3rem; }
    
    .kline-chart { 
        min-width: 100%; 
        gap: 10px; 
        padding: 0 5px;
    }
    .kline-item { 
        min-width: 65px; 
        padding: 10px 4px; 
        border-radius: 14px;
    }
    .kline-candle-wrapper { height: 110px; }
    .kline-date { font-size: 0.78rem; }
    
    .section-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 14px; 
    }
    .sort-buttons { width: 100%; justify-content: center; }
    
    th, td { 
        font-size: 0.85rem; 
        padding: 10px 8px; 
    }
    .ip-badge { font-size: 0.8rem; padding: 3px 10px; }
    .referer-text { max-width: 200px; font-size: 0.82rem; }
    
    .admin-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 12px; }
    .form-row .form-group { min-width: 100%; }
    
    .login-box { 
        padding: 28px 24px; 
        margin: 10px; 
        border-radius: 28px;
    }
    .login-header h1 { font-size: 1.8rem; }
    .btn-login { font-size: 1.05rem; padding: 12px; }
    
    .pagination button { 
        padding: 6px 12px; 
        font-size: 0.85rem; 
        min-width: 36px;
    }
    
    .close-day-details { 
        padding: 6px 14px; 
        font-size: 1.1rem; 
    }
    
    .day-summary-stats { 
        margin-left: 0; 
        margin-top: 12px; 
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* =============== 动画 =============== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card, .trend-section, .details-section, .day-details-section, .admin-card {
    animation: fadeIn 0.45s ease-out forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }
.trend-section { animation-delay: 0.3s; }
.details-section { animation-delay: 0.35s; }

.hidden {
    display: none !important;
}

/* =============== 辅助类 =============== */
.loading {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-style: italic;
    font-size: 1.1rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.pagination button {
    background: #f1f5f9;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s;
    min-width: 40px;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.pagination button.active-page, .pagination button:disabled {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/*  高亮分页的关键样式 */
.page-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #e2e8f0;
    color: #1e293b;
}

.page-btn.active {
    background: #4f46e5 !important; /* 深紫色 */
    color: white !important;
    font-weight: 600;
    border-color: #4338ca;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.day-summary-stats {
    display: inline-flex;
    gap: 18px;
    margin-left: 20px;
    font-size: 0.9rem;
    font-weight: normal;
    color: #64748b;
    flex-wrap: wrap;
}

.day-summary-stats span {
    background: #f1f5f9;
    padding: 5px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.day-summary-stats strong {
    color: #667eea;
    font-weight: 600;
}

.close-day-details {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
}

.close-day-details:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: scale(1.05);
}
