/* ============================================
   全局样式 - IP价格展示网站
   ============================================ */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

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

/* ============================================
   顶部导航
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 32px;
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 16px;
    border-radius: var(--radius);
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-admin {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: var(--radius) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   顶部横幅
   ============================================ */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 40px;
    border-radius: 0 0 24px 24px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translate(0, 0); }
    to { transform: translate(30px, 30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.hero .subtitle {
    font-size: 16px;
    opacity: 0.85;
}

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

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ede9fe 100%);
    font-size: 28px;
    margin-bottom: 12px;
}

.stat-card:nth-child(1) .icon { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.stat-card:nth-child(2) .icon { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.stat-card:nth-child(3) .icon { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.stat-card:nth-child(4) .icon { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); }

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .label {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 4px;
}

/* ============================================
   平台卡片
   ============================================ */
.platform-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.platform-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent, var(--primary));
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
    flex-wrap: wrap;
}

/* 可点击的头部链接（点击跳转官网） */
.platform-head-link {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius);
    transition: opacity 0.2s;
}

.platform-head-link:hover .platform-logo {
    transform: scale(1.06);
}

.platform-head-link .platform-info {
    flex: 1;
    min-width: 0;
}

.platform-head-link h2 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 4px;
    transition: color 0.2s;
}

.platform-head-link:hover h2 {
    color: var(--accent, var(--primary));
}

/* 标题旁的外链提示箭头（点击整行标题访问官网） */
.ext-link-icon {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-400);
    margin-left: 6px;
    vertical-align: middle;
    transition: color 0.2s;
}

.platform-head-link:hover .ext-link-icon {
    color: var(--accent, var(--primary));
}

.platform-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ede9fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: transform 0.2s;
}

.platform-info h2 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.platform-info .description {
    color: var(--gray-500);
    font-size: 14px;
}

.platform-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.feature-tag {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ============================================
   价格表
   ============================================ */
.price-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

.price-table th {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.price-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.price-table tr:hover {
    background: var(--gray-50);
}

.price-table .traffic-cell {
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
}

.price-table .price-cell {
    color: var(--gray-500);
    text-decoration: line-through;
    font-size: 13px;
}

.price-table .discount-cell {
    font-weight: 700;
    color: var(--danger);
    font-size: 16px;
}

.price-table .savings {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 6px;
    font-weight: 600;
}

/* 优惠价 RMB 列：浅绿标签 */
.price-table .rmb-cell {
    font-weight: 700;
    color: #047857;
    font-size: 15px;
    white-space: nowrap;
}

/* 每G价/RMB 列：核心比价指标，高亮徽章 */
.price-table .pergb-cell {
    text-align: center;
    white-space: nowrap;
}

.pergb-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.32);
}

.pergb-badge.empty {
    background: var(--gray-100);
    color: var(--gray-400);
    box-shadow: none;
    font-weight: 600;
}

.pergb-unit {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-state .icon {
    font-size: 80px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ============================================
   按钮
   ============================================ */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ============================================
   浮动操作按钮
   ============================================ */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    font-size: 28px;
    transition: transform 0.2s;
    z-index: 50;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
}

/* ============================================
   筛选/搜索
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 14px;
    }
    .platform-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }
}