/**
 * 巧笔AI - 主样式文件
 * 设计风格：淡蓝色+白色，学术风格，动态云朵背景
 */

/* ========== CSS变量定义 ========== */
:root {
    /* 颜色方案 - 淡蓝色系 */
    --primary-color: #5B9BD5;  /* 主色调-淡蓝色 */
    --primary-light: #A8D5F7;  /* 浅蓝色 */
    --primary-dark: #2E75B6;   /* 深蓝色 */
    --secondary-color: #FFB366;  /* 淡橙色 */
    --accent-color: #8EC6E5;   /* 强调色 */
    
    /* 背景色 */
    --bg-primary: #FFFFFF;     /* 纯白 */
    --bg-secondary: #F0F8FF;   /* 爱丽丝蓝 */
    --bg-light: #E6F3FF;       /* 极淡蓝 */
    
    /* 文字颜色 */
    --text-primary: #2C3E50;   /* 主文字 */
    --text-secondary: #5D6D7E; /* 次要文字 */
    --text-light: #95A5A6;     /* 浅色文字 */
    
    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, #5B9BD5 0%, #A8D5F7 100%);
    --gradient-secondary: linear-gradient(135deg, #FFB366 0%, #FFC999 100%);
    --gradient-button: linear-gradient(135deg, #5B9BD5 0%, #7FB6E6 50%, #A8D5F7 100%);
    
    /* 字体 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --font-english: 'Inter', 'Segoe UI', sans-serif;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(91, 155, 213, 0.1);
    --shadow-md: 0 4px 16px rgba(91, 155, 213, 0.15);
    --shadow-lg: 0 8px 32px rgba(91, 155, 213, 0.2);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* 过渡 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* ========== 动态云朵背景 ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #E6F3FF 0%, #FFFFFF 50%, #F0F8FF 100%);
    z-index: -2;
}

/* 云朵动画容器 */
.clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 100px;
    opacity: 0.7;
    animation: float-cloud linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 100px;
}

.cloud::before {
    width: 50%;
    height: 80%;
    top: -40%;
    left: 10%;
}

.cloud::after {
    width: 60%;
    height: 70%;
    top: -30%;
    right: 10%;
}

/* 云朵尺寸变化 */
.cloud:nth-child(1) { width: 200px; height: 60px; top: 10%; animation-duration: 60s; animation-delay: 0s; }
.cloud:nth-child(2) { width: 150px; height: 50px; top: 25%; animation-duration: 80s; animation-delay: 5s; }
.cloud:nth-child(3) { width: 180px; height: 55px; top: 40%; animation-duration: 70s; animation-delay: 10s; }
.cloud:nth-child(4) { width: 220px; height: 65px; top: 60%; animation-duration: 90s; animation-delay: 15s; }
.cloud:nth-child(5) { width: 160px; height: 48px; top: 75%; animation-duration: 75s; animation-delay: 20s; }

@keyframes float-cloud {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(calc(100vw + 100%));
    }
}

/* ========== 导航栏 ========== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.logo {
    height: 40px;
    margin-right: 12px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.navbar-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.navbar-link:hover::after {
    width: 100%;
}

.navbar-link:hover {
    color: var(--primary-color);
}

/* ========== 按钮样式（渐变色） ========== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn-primary {
    background: var(--gradient-button);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ========== 卡片样式 ========== */
.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-body {
    color: var(--text-secondary);
}

/* ========== 表格样式（淡橙色表头） ========== */
.table-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gradient-secondary);
    color: white;
}

thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-family: var(--font-english);
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid var(--bg-light);
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-light);
}

tbody td {
    padding: 1rem;
    color: var(--text-primary);
}

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

/* ========== 标题样式 ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .navbar-menu {
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .cloud {
        display: none; /* 移动端隐藏云朵以提升性能 */
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
