/* 现代化设计系统 - 苹果极简风格 */

/* 颜色系统 */
:root {
    --primary-blue: #007AFF;
    --secondary-blue: #0051D5;
    --background: #F5F7FA;
    --surface: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --border: #E5E5EA;
    --success: #34C759;
    --warning: #FF9500;
    --error: #FF3B30;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
}

html {
    scroll-behavior: smooth;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    background: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    min-height: 100vh;
}

/* 布局容器 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

/* 左侧边栏导航 - 苹果极简风格 */
.sidebar-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sidebar-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.sidebar-content {
    padding: 0 16px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-category {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    padding: 0 8px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link .nav-tag {
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: #F7F8FA;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-link .nav-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

/* 标签配色（遵循现代极简，无渐变） */
.nav-tag.tag-shield { color: #0B8A42; border-color: #CFE9D6; background: #EAF7EF; }
.nav-tag.tag-attack { color: #AA3A3A; border-color: #F2CCCC; background: #FCE9E9; }
.nav-tag.tag-cloud  { color: #0A66D7; border-color: #CFE0FF; background: #EAF2FF; }
.nav-tag.tag-good   { color: #2F6D3A; border-color: #D0E6D6; background: #EEF7F0; }
.nav-tag.tag-udp    { color: #B26B00; border-color: #F5D69E; background: #FFF3E0; }
.nav-tag.tag-super  { color: #D52A1A; border-color: #F6C9C4; background: #FDEDEC; }
}

.nav-link:hover {
    background: rgba(0, 122, 255, 0.06);
    color: var(--primary-blue);
}

.nav-link.active {
    background: var(--primary-blue);
    color: white;
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    margin-left: 240px;
    width: calc(100vw - 240px);
    min-height: 100vh;
    background: var(--background);
    overflow: visible;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar-nav {
        width: 240px;
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        width: 100vw;
    }
    .menu-toggle { display: inline-flex; }
    .sidebar-open .sidebar-nav { transform: translateX(0); }
    .sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
}

@media (max-width: 768px) {
    .sidebar-nav {
        width: 240px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .table-container {
        padding: 0 16px;
    }
    
    .region-header {
        padding: 0 16px;
    }
    .nav-link { padding: 12px 16px; }
}

/* 英雄区域 - 极简设计 */
.hero-section {
    background: var(--surface);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-top: 0;
}

.menu-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    left: calc(env(safe-area-inset-left) + 12px);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.menu-toggle .menu-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    border-radius: 2px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1005;
}

.hero-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.08333;
    letter-spacing: -0.003em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.42105;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.terms-section {
    max-width: 880px;
    margin: 20px auto 0;
    text-align: left;
}

.terms-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.terms-intro {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.terms-list {
    list-style: disc;
    padding-left: 20px;
    margin: 6px 0 10px;
    color: var(--text-secondary);
}

.terms-list li {
    margin: 4px 0;
}

.terms-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}

@media (max-width: 768px) {
    .terms-grid { grid-template-columns: 1fr; }
}

.terms-emphasis li { color: var(--text-primary); }

/* 主内容区域 */
main {
    padding: 20px 0;
}

/* 地区区块 - 无边框设计 */
.region-section {
    background: var(--surface);
    border-radius: 0;
    padding: 32px 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.region-section:last-child {
    border-bottom: none;
}

.region-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 32px;
}

.region-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.125;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.region-description {
    font-size: 17px;
    line-height: 1.47059;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* 产品表格 - 极简无边框设计 */
.table-container {
    margin-top: 24px;
    padding: 0 32px;
}

.server-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: none;
    box-shadow: none;
}

img, video { max-width: 100%; height: auto; display: block; }

.server-table th {
    background: none;
    color: var(--text-secondary);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.28577;
    letter-spacing: -0.016em;
    border-bottom: 1px solid var(--border);
    text-transform: none;
}

.server-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.28577;
    letter-spacing: -0.016em;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-table tbody tr:last-child td {
    border-bottom: none;
}

.server-table tbody tr:hover {
    background: rgba(0, 122, 255, 0.02);
}

/* 价格样式 - 纯文字 */
.price-user {
    color: var(--success);  /* 普通用户价格 - 绿色 */
    font-weight: 600;
    font-size: 14px;
}

.price-agent {
    color: var(--error);   /* 代理价格 - 红色 */
    font-weight: 600;
    font-size: 14px;
}

/* 页脚 - 极简设计 */
.footer {
    background: var(--surface);
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.footer p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.42859;
    font-weight: 400;
    letter-spacing: -0.016em;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .floating-nav {
        left: 16px;
        max-width: 220px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 17px;
    }
    
    .region-title {
        font-size: 28px;
    }
    
    .region-description {
        font-size: 16px;
    }
    
    .floating-nav {
        position: relative;
        top: 0;
        left: 0;
        margin: 16px;
        max-width: none;
        max-height: none;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .region-section {
        padding: 32px 0;
    }
    
    .table-container {
        padding: 0 16px;
    }
    
    .server-table th,
    .server-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .region-title {
        font-size: 24px;
    }
    
    .region-description {
        font-size: 15px;
    }
    
    .server-table {
        font-size: 13px;
    }
    
    .server-table th,
    .server-table td {
        padding: 8px 10px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 微妙的动画效果 */
.region-section {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.server-table tbody tr {
    animation: fadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: opacity;
}

.server-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.server-table tbody tr:nth-child(2) { animation-delay: 0.09s; }
.server-table tbody tr:nth-child(3) { animation-delay: 0.13s; }
.server-table tbody tr:nth-child(4) { animation-delay: 0.17s; }
.server-table tbody tr:nth-child(5) { animation-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001s !important;
        transition: none !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
