/* =================================================================
// styles.css - Contega (筑界物语)
// 主题: iOS 26 Concept (Cyan-Green / Nature Tech Theme)
// ================================================================= */

:root {
    /* --- 核心色盘 (青绿渐变主题) --- */
    /* 主色调：一种介于青色和绿色之间的 Teal 色 */
    --ios-primary: #0d9488;  /* Teal 600 */
    --ios-primary-light: #2dd4bf; /* Teal 400 */
    
    /* 渐变辅助色 */
    --ios-gradient-start: #06b6d4; /* Cyan */
    --ios-gradient-end: #10b981;   /* Emerald */
    
    /* 强调色 */
    --ios-accent: #34d399; /* Bright Emerald */
    
    /* 文字颜色 */
    --ios-text-primary: #0f172a; /* 深蓝灰，比纯黑更有质感 */
    --ios-text-secondary: #475569;
    
    /* 背景流体色 (浅色模式 - 极光绿) */
    --ios-bg-mesh-1: #ccfbf1; /* Pale Teal */
    --ios-bg-mesh-2: #dcfce7; /* Pale Green */

    /* --- 玻璃材质变量 --- */
    --glass-bg: rgba(255, 255, 255, 0.60);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.05); /* 阴影带一点点绿 */
    --glass-blur: 30px;
    --glass-radius: 28px;
    
    /* --- 组件特定 --- */
    --nav-bg: rgba(255, 255, 255, 0.85);
    --input-bg: rgba(255, 255, 255, 0.5);
    --code-bg: rgba(13, 148, 136, 0.05); /* 极淡的青色背景 */
}

/* --- 深色模式适配 (Dark Mode) --- */
@media (prefers-color-scheme: dark) {
    :root {
        --ios-text-primary: #f1f5f9;
        --ios-text-secondary: #94a3b8;
        
        /* 深色背景流体 (深海幽光) */
        --ios-bg-mesh-1: #0f1c1a; 
        --ios-bg-mesh-2: #042f2e;
        
        --glass-bg: rgba(20, 30, 30, 0.65); /* 偏绿黑的玻璃 */
        --glass-border: rgba(255, 255, 255, 0.08);
        --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
        
        --nav-bg: rgba(20, 35, 35, 0.8);
        --input-bg: rgba(0, 0, 0, 0.3);
        --code-bg: rgba(255, 255, 255, 0.05);
    }
}

/* --- 1. 全局重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--ios-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--ios-bg-mesh-1);
}

/* --- 2. 动态背景 (青绿流体) --- */
.ios-background-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(at 0% 0%, var(--ios-bg-mesh-1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, var(--ios-bg-mesh-2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, #a7f3d0 0px, transparent 50%), /* 增加一点薄荷绿 */
        radial-gradient(at 0% 100%, var(--ios-bg-mesh-2) 0px, transparent 50%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite alternate;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* --- 3. 玻璃组件基础 --- */
.glass-panel, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    border-radius: var(--glass-radius);
    padding: 40px;
    margin-bottom: 24px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15); /* 悬浮时泛起绿光 */
}

/* --- 4. 导航栏 (悬浮岛) --- */
header {
    position: fixed;
    top: 24px;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.navbar {
    width: auto;
    min-width: 320px;
    max-width: 95%;
    height: 56px;
    
    border-radius: 100px;
    background: var(--nav-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 24px;
    pointer-events: auto;
}

.nav-logo a {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ios-text-primary);
}
/* Logo 图标变色 */
.nav-logo i {
    color: var(--ios-primary); 
    background: -webkit-linear-gradient(45deg, var(--ios-gradient-start), var(--ios-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2px;
    list-style: none;
    align-items: center;
    margin-left: 15px;
}

.nav-link {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ios-text-primary);
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(13, 148, 136, 0.08); /* 悬浮淡青色 */
    color: var(--ios-primary);
}

.btn-glass-sm {
    background: linear-gradient(135deg, var(--ios-gradient-start), var(--ios-gradient-end));
    color: white !important;
    padding: 6px 18px;
    margin-left: 5px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    border: none;
}

.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; margin-right: 15px; }
.bar { width: 20px; height: 2px; background: var(--ios-text-primary); border-radius: 2px; transition: 0.3s; }

/* --- 导航栏滚动交互优化 (添加到 styles.css) --- */

/* 为 header 和 navbar 添加平滑过渡动画 */
header, .navbar {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 当页面滚动时，header 的状态 */
header.scrolled {
    top: 0; /* 消除顶部 24px 空隙 */
    padding: 0; /* 移除左右内边距 */
    background: rgba(255, 255, 255, 0.8); /* 可选：给整个条加一点背景 */
    backdrop-filter: blur(10px); /* 确保 header 区域也有模糊 */
    -webkit-backdrop-filter: blur(10px);
}

/* 当页面滚动时，navbar 的状态 */
header.scrolled .navbar {
    width: 100%;       /* 宽度变满 */
    max-width: 100%;   /* 移除最大宽度限制 */
    height: 64px;      /* 稍微加高一点，适应通栏模式 */
    border-radius: 0;  /* 变为直角 */
    border-top: none;  /* 移除顶部边框 */
    border-left: none; /* 移除左右边框 */
    border-right: none;
    background: rgba(255, 255, 255, 0.9); /* 滚动后背景更实一点，防止文字干扰 */
    box-shadow: 0 1px 0 rgba(0,0,0,0.05); /* 改为底部细微分割线 */
}

/* 深色模式下的滚动适配 */
@media (prefers-color-scheme: dark) {
    header.scrolled {
        background: rgba(20, 35, 35, 0.8);
    }
    header.scrolled .navbar {
        background: rgba(20, 35, 35, 0.95);
        box-shadow: 0 1px 0 rgba(255,255,255,0.1);
    }
}
/* --- 5. Hero 区域 --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    color: var(--ios-primary); /* 青色文字 */
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 15px;
    line-height: 1.1;
    /* 标题改为青绿渐变 */
    background: linear-gradient(135deg, #0f766e 0%, #15803d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* 深色模式下标题变亮 */
@media (prefers-color-scheme: dark) {
    .hero-content h1 {
        background: linear-gradient(135deg, #2dd4bf 0%, #4ade80 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.hero-content h1 .en-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 10px;
    margin-top: 10px;
    text-transform: uppercase;
    color: var(--ios-text-secondary);
    -webkit-text-fill-color: initial;
    opacity: 0.7;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--ios-text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
    font-weight: 500;
}

.server-status-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    margin-bottom: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    color: var(--ios-text-primary);
}

.status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px #22c55e; }
.pulsing { animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.ios-btn-primary, .ios-btn-secondary {
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ios-btn-primary {
    /* 按钮使用青绿渐变 */
    background: linear-gradient(135deg, var(--ios-gradient-start), var(--ios-gradient-end));
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.ios-btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    color: var(--ios-text-primary);
    border: 1px solid rgba(0,0,0,0.05);
}

.ios-btn-primary:hover, .ios-btn-secondary:hover { transform: scale(1.03); }

/* --- 6. 通用内容样式 --- */
section { padding: 60px 0; }
.full-width { width: 100%; }

section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--ios-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
section h2 i {
    /* 标题图标变为青色 */
    color: var(--ios-primary);
}

.about-content { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: center; }
.about-text p { color: var(--ios-text-secondary); margin-bottom: 15px; font-size: 1rem; }

.ios-grid-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
    text-align: center;
}
.grid-item { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--ios-text-secondary); }
.grid-item i { 
    font-size: 1.4rem; 
    color: var(--ios-primary); 
    background: rgba(13, 148, 136, 0.1); 
    padding: 12px; 
    border-radius: 50%; 
}

.server-specs {
    background: var(--input-bg);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.05);
}
.server-specs h4 { text-align: center; margin-bottom: 20px; color: var(--ios-text-primary); font-size: 1rem; }
.specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.spec-item { display: flex; flex-direction: column; text-align: center; }
.spec-label { font-size: 0.7rem; color: var(--ios-text-secondary); text-transform: uppercase; margin-bottom: 5px; }
.spec-value { font-weight: 700; color: var(--ios-primary); font-size: 0.9rem; }

.about-image { display: flex; justify-content: center; align-items: center; }
.floating-icon { 
    font-size: 10rem; 
    /* 装饰大图标颜色调整 */
    background: linear-gradient(135deg, var(--ios-gradient-start), var(--ios-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.2; 
    animation: float 6s ease-in-out infinite; 
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* --- 7. Rules --- */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-bottom: 30px; }
.rule-card { text-align: left; }
.rule-icon-bg { 
    width: 44px; height: 44px; 
    /* 图标背景改为青绿渐变 */
    background: linear-gradient(135deg, var(--ios-gradient-start), var(--ios-gradient-end)); 
    border-radius: 14px; 
    display: flex; align-items: center; justify-content: center; 
    color: white; font-size: 1.1rem; margin-bottom: 15px; 
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}
.rule-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--ios-text-primary); }
.rule-card p { font-size: 0.9rem; color: var(--ios-text-secondary); }
.rules-cta { text-align: center; }
.ios-link { color: var(--ios-primary); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; font-size: 0.95rem; }

/* --- 8. Commands --- */
.commands-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.command-category h3 { margin-bottom: 15px; display: flex; align-items: center; gap: 8px; color: var(--ios-primary); font-size: 1.1rem; }
.command-list { display: flex; flex-direction: column; gap: 10px; }
.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--code-bg);
    padding: 10px 14px;
    border-radius: 10px;
}
.command-item code { 
    font-family: 'SF Mono', 'Courier New', monospace; 
    color: var(--ios-primary); /* 代码颜色 */
    font-weight: 600; 
    font-size: 0.9rem; 
}
.command-item span { font-size: 0.8rem; color: var(--ios-text-secondary); }

/* --- 9. Contact & Footer --- */
.contact-wrapper { max-width: 600px; margin: 0 auto; text-align: center; }
.contact-form textarea {
    width: 100%;
    background: var(--input-bg);
    border: none;
    padding: 15px;
    border-radius: 14px;
    color: var(--ios-text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}
.contact-form textarea:focus { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }

.footer { padding: 40px 0; text-align: center; margin-top: 20px; }
.footer p { color: var(--ios-text-secondary); font-size: 0.85rem; margin-bottom: 15px; }
.social-links { display: flex; justify-content: center; gap: 15px; }
.glass-icon {
    width: 36px; height: 36px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--ios-text-primary);
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    font-size: 1.1rem;
}
.glass-icon:hover { 
    background: linear-gradient(135deg, var(--ios-gradient-start), var(--ios-gradient-end)); 
    color: white; 
    transform: rotate(360deg); 
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* --- 10. 移动端适配 --- */
@media (max-width: 768px) {
    header { top: 15px; padding: 0 10px; }
    .navbar { min-width: auto; width: 100%; padding: 0 15px; }
    
    .nav-menu {
        position: fixed;
        top: 80px; left: 15px; right: 15px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        display: none;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        border: 1px solid rgba(255, 255, 255, 0.5);
        margin-left: 0;
    }
    
    .nav-menu.active { display: flex; }
    .nav-item { width: 100%; text-align: center; }
    .nav-link { display: block; padding: 12px; }
    .menu-toggle { display: flex; margin-right: 0; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content h1 .en-title { font-size: 0.9rem; letter-spacing: 5px; }
    .about-content { grid-template-columns: 1fr; }
    .about-image { display: none; }
    .specs-grid { grid-template-columns: repeat(2, 1fr); }
    .ios-grid-list { grid-template-columns: repeat(2, 1fr); }
}

/* --- 用户登录状态 (User Info Pill) 美化 --- */
.user-info-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 148, 136, 0.1); /* 极淡的青色背景 */
    padding: 6px 6px 6px 14px; /* 右侧padding小一点，因为按钮自带间距 */
    border-radius: 30px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    margin-left: 10px;
    transition: all 0.3s ease;
}

.user-info-pill:hover {
    background: rgba(13, 148, 136, 0.15);
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
}

/* 用户名样式 */
.user-name-span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ios-primary); /* 使用主题青色 */
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

/* 退出按钮样式 */
.logout-btn-small {
    background: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ef4444; /* 红色图标 */
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.logout-btn-small:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.1) rotate(90deg); /* 悬浮时旋转并变色 */
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.logout-btn-small i {
    font-size: 0.85rem;
}

/* 适配深色模式 */
@media (prefers-color-scheme: dark) {
    .user-info-pill {
        background: rgba(45, 212, 191, 0.1);
        border-color: rgba(45, 212, 191, 0.2);
    }
    .user-name-span {
        color: #5eead4;
    }
    .logout-btn-small {
        background: rgba(255, 255, 255, 0.1);
    }
}