/* ==================== 🔥 全局样式 - 清新粉色系 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

/* 🔥 移除动态背景，使用纯色背景更舒适 */
body::before {
    display: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -40px) rotate(120deg); }
    66% { transform: translate(-25px, 25px) rotate(240deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==================== 🔥 顶部导航栏 - 毛玻璃效果 ==================== */
.top-header {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 25px 40px;
    box-shadow: 
        0 4px 30px rgba(255, 182, 193, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #2c5282;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==================== 🔥 按钮样式 - 更大更清晰 ==================== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(66, 153, 225, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(72, 187, 120, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    color: #4a5568;
    border: 2px solid rgba(74, 85, 104, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 101, 101, 0.5);
}

/* ==================== 🔥 主容器 ==================== */
.stats-dashboard,
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
}

/* ==================== 🔥 顶部统计卡片 - 超清晰大字体 ==================== */
.stats-cards-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .stats-cards-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-cards-top {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 35px 30px;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(255, 182, 193, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4299e1, #3182ce, #4299e1);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(255, 105, 180, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 105, 180, 0.6);
}

.stat-card h3 {
    font-size: 16px;
    color: #2c5282;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.stat-card .stat-value {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #2d3748;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

.stat-card .stat-change {
    font-size: 15px;
    color: #666;
    font-weight: 600;
}

/* 🔥 各卡片的独特渐变背景 - 乳白色系 */
.stat-card-1 {
    background: linear-gradient(135deg, rgba(224, 231, 238, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.stat-card-1::before {
    background: linear-gradient(90deg, #63b3ed, #4299e1, #63b3ed);
    background-size: 200% 100%;
}

.stat-card-2 {
    background: linear-gradient(135deg, rgba(236, 240, 244, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.stat-card-2::before {
    background: linear-gradient(90deg, #48bb78, #38a169, #48bb78);
    background-size: 200% 100%;
}

.stat-card-3 {
    background: linear-gradient(135deg, rgba(228, 234, 240, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.stat-card-3::before {
    background: linear-gradient(90deg, #ed8936, #dd6b20, #ed8936);
    background-size: 200% 100%;
}

.stat-card-4 {
    background: linear-gradient(135deg, rgba(232, 237, 242, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.stat-card-4::before {
    background: linear-gradient(90deg, #805ad5, #6b46c1, #805ad5);
    background-size: 200% 100%;
}

/* ==================== 🔥 新建通道横幅 - 毛玻璃高亮效果 ==================== */
.new-channel-banner {
    width: 100%;
    margin-bottom: 40px;
}

.new-channel-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(255, 105, 180, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.new-channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4299e1, #3182ce, #4299e1);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

.new-channel-card h3 {
    font-size: 24px;
    color: #2c5282;
    margin-bottom: 25px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.new-channel-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 220px;
}

.form-group label {
    display: block;
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.form-group input,
.form-group select,
.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(203, 213, 224, 0.5);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-input:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.2);
}

/* ==================== 🔥 通道卡片网格 - 毛玻璃卡片 ==================== */
.channels-grid-container {
    width: 100%;
}

.channels-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.channel-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(255, 182, 193, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #4299e1, #3182ce);
}

.channel-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(66, 153, 225, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    border-color: rgba(66, 153, 225, 0.5);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.channel-header h3 {
    font-size: 24px;
    color: #2c5282;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.channel-stats {
    display: flex;
    gap: 20px;
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 600;
}

.channel-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-link {
    background: rgba(66, 153, 225, 0.08);
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #2c5282;
    margin-bottom: 15px;
    border: 1px solid rgba(66, 153, 225, 0.2);
    font-weight: 600;
}

.channel-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 14px;
}

/* ==================== 🔥 趋势图容器 - 毛玻璃卡片 ==================== */
.trend-chart-container {
    width: 100%;
    margin-top: 40px;
}

.trend-chart-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(255, 182, 193, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.trend-chart-card h3 {
    font-size: 20px;
    color: #2c5282;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* 🔥 隐藏趋势图以提升性能 */
.trend-chart-container {
    display: none !important;
}

/* ==================== 配置面板 ==================== */
.config-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -4px 0 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    padding: 30px;
}

.config-panel.active {
    right: 0;
}

.config-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 105, 180, 0.3);
}

.config-panel-header h3 {
    font-size: 22px;
    color: #d91e6f;
    font-weight: 800;
}

.close-panel {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #d91e6f;
    transition: transform 0.2s;
}

.close-panel:hover {
    transform: rotate(90deg);
}

/* ==================== 推广链接样式增强 ==================== */
.promo-link {
    background: rgba(255, 255, 255, 0.9);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 2px solid #d1d5db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.link-url-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.link-url-row i {
    color: #4299e1;
    font-size: 20px;
    flex-shrink: 0;
}

.link-text {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

.link-actions-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    padding-left: 32px;
}

.btn-copy-blue {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.btn-copy-blue:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.5);
}

.btn-delete-red {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.btn-delete-red:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 101, 101, 0.5);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .channels-section {
        grid-template-columns: 1fr;
    }

    .config-panel {
        width: 100%;
        right: -100%;
    }
    
    .link-actions-inline {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .btn-copy-blue,
    .btn-delete-red {
        width: 100%;
        justify-content: center;
    }
}
