/**
 * 通用样式 - 匹配index.php橙色风格
 * 前台统一框架
 */

/* ==========================================================================
   CSS Reset & 基础样式
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 温暖橙色渐变（匹配index.php） */
    --primary-gradient: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FDC830 100%);
    --primary-color: #FF6B35;
    --primary-hover: #F7931E;

    /* 背景渐变 - 浅橙粉色 */
    --bg-gradient: linear-gradient(135deg, #FFE5D9 0%, #FFF5E4 100%);

    /* 辅助色 */
    --secondary-color: #F7931E;

    /* 中性色 */
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #eee;
    --bg-light: #FAFAFA;
    --bg-white: #ffffff;
    --bg-dark: #2C2C2C;

    /* 间距系统 */
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 30px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-xxl: 80px;

    /* 字体 */
    --font-body: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* 阴影（匹配index.php） */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 20px rgba(255, 107, 53, 0.3);
    --shadow-hover: 0 12px 40px rgba(255, 107, 53, 0.2);

    /* 圆角（匹配index.php） */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 25px;
    --radius-xxl: 30px;

    /* 过渡 */
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   渐变文字（index.php风格）
   ========================================================================== */

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   通用按钮样式
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-upload {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* ==========================================================================
   卡片样式
   ========================================================================== */

.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.card-light {
    background: var(--bg-gradient);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: transform 0.3s;
}

.card-light:hover {
    transform: translateY(-5px);
}

/* ==========================================================================
   容器 & 布局
   ========================================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xxl) var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Grid 系统 */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ==========================================================================
   表单样式
   ========================================================================== */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   工具类
   ========================================================================== */

/* 文本 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

/* 间距 */
.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.p-lg {
    padding: var(--spacing-lg);
}

/* ==========================================================================
   响应式断点
   ========================================================================== */

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .container,
    .section {
        padding: 0 var(--spacing-sm);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 32px;
    }
}

/* ==========================================================================
   动画
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}