/* =========================================================
 * 长沙汀楚科技 - iOS 26 液态玻璃风格设计系统
 * ========================================================= */

:root {
    /* 主色板 - iOS 26 液态色调 */
    --primary: #007AFF;
    --primary-soft: rgba(0, 122, 255, 0.15);
    --accent: #5856D6;
    --accent-2: #FF2D55;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;

    /* 中性色 */
    --bg-primary: #f0f4fa;
    --bg-secondary: #e8eef7;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.85);
    --surface-dark: rgba(28, 28, 30, 0.6);

    --text-primary: #1c1c1e;
    --text-secondary: #6e6e73;
    --text-tertiary: #8e8e93;
    --text-on-glass: #1c1c1e;

    --border: rgba(0, 0, 0, 0.06);
    --border-strong: rgba(0, 0, 0, 0.12);

    /* 圆角 */
    --r-xs: 8px;
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-full: 9999px;

    /* 阴影 - 液态玻璃特征 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.10);
    --shadow-glow: 0 0 40px rgba(0, 122, 255, 0.15);

    /* 字体 */
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* 过渡 */
    --t-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* 液态背景 - 全站统一渐变 */
body {
    background:
        radial-gradient(circle at 15% 20%, rgba(88, 86, 214, 0.18), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(0, 122, 255, 0.18), transparent 45%),
        radial-gradient(circle at 50% 60%, rgba(255, 45, 85, 0.10), transparent 50%),
        var(--bg-primary);
    background-attachment: fixed;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* =========================================================
 * 容器
 * ========================================================= */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
 * 顶部导航 - 液态玻璃
 * ========================================================= */
.nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1240px;
    background: var(--surface);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 12px 28px;
    z-index: 100;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-primary);
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-menu a {
    padding: 8px 16px;
    border-radius: var(--r-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--t-fast);
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white !important;
    padding: 9px 18px !important;
    border-radius: var(--r-full);
    font-weight: 600 !important;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.nav-cta:hover {
    color: white !important;
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--r-full);
    background: var(--primary-soft);
    color: var(--primary);
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

@media (max-width: 900px) {
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .nav-menu.open {
        display: flex;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--surface-strong);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 16px;
        border-radius: var(--r-md);
        gap: 8px;
        box-shadow: var(--shadow-lg);
    }
    .nav-cta { width: auto; }
}

/* =========================================================
 * Hero 区
 * ========================================================= */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--r-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1c1c1e 30%, var(--primary) 70%, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--r-full);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--t-fast);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.4);
}

.btn-glass {
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

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

/* =========================================================
 * 通用区块
 * ========================================================= */
.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 56px;
}

.section-title small {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    padding: 4px 12px;
    background: var(--primary-soft);
    border-radius: var(--r-full);
}

.section-title h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.section-title p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================================
 * 玻璃卡片
 * ========================================================= */
.glass-card {
    background: var(--surface-strong);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: all var(--t-base);
    box-shadow: var(--shadow-sm);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

/* =========================================================
 * 课程卡片
 * ========================================================= */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--surface-strong);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all var(--t-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.course-card-img {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--primary-soft), rgba(88, 86, 214, 0.1));
}

.course-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.course-card:hover .course-card-img img {
    transform: scale(1.06);
}

.course-card-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    padding: 5px 12px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.course-card-body {
    padding: 22px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
}

.course-card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.course-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.course-card-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-2);
}

.course-card-price small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: line-through;
    margin-left: 6px;
}

.course-card-meta-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* =========================================================
 * 评价
 * ========================================================= */
.review-item {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--surface);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 16px;
}

.review-content {
    flex: 1;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.review-name {
    font-weight: 600;
    font-size: 14px;
}

.review-stars {
    color: var(--warning);
    font-size: 13px;
    letter-spacing: 1px;
}

.review-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-tertiary);
}

.review-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* =========================================================
 * 表单
 * ========================================================= */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--t-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* =========================================================
 * 页脚
 * ========================================================= */
.footer {
    background: linear-gradient(180deg, transparent, rgba(28, 28, 30, 0.04));
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 18px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
}

.footer h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: color var(--t-fast);
}
.footer ul a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-bottom a {
    color: var(--text-secondary);
    transition: color var(--t-fast);
}

.footer-bottom a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-brand { grid-column: 1 / -1; }
}

/* =========================================================
 * 返回顶部
 * ========================================================= */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 48px;
    height: 48px;
    background: var(--surface-strong);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--t-base);
    box-shadow: var(--shadow-md);
    z-index: 99;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* =========================================================
 * AI 客服浮动
 * ========================================================= */
.ai-chat-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.35);
    transition: transform var(--t-base);
    z-index: 99;
    animation: pulse 2.4s infinite;
}

.ai-chat-btn:hover {
    transform: scale(1.08) rotate(-4deg);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(0, 122, 255, 0.35); }
    50% { box-shadow: 0 10px 30px rgba(0, 122, 255, 0.6), 0 0 0 12px rgba(0, 122, 255, 0); }
}

.ai-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 360px;
    max-width: calc(100vw - 48px);
    height: 480px;
    background: var(--surface-strong);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all var(--t-base);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ai-chat-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-header-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-chat-header-info { flex: 1; }
.ai-chat-header-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.ai-chat-header-info p { font-size: 12px; opacity: 0.85; }

.ai-chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-size: 14px;
    line-height: 1.5;
}

.ai-chat-msg.bot {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ai-chat-msg.user {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-chat-input {
    padding: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 14px;
    outline: none;
}

.ai-chat-input input:focus { border-color: var(--primary); }

.ai-chat-input button {
    background: var(--primary);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: var(--r-full);
    font-size: 16px;
}

/* =========================================================
 * 响应式
 * ========================================================= */
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .hero { padding: 110px 0 60px; }
    .section { padding: 50px 0; }
    .nav { padding: 10px 18px; top: 10px; width: calc(100% - 20px); }
    .ai-chat-panel { right: 12px; bottom: 88px; width: calc(100% - 24px); height: 60vh; }
    .ai-chat-btn { right: 16px; bottom: 16px; }
    .back-to-top { right: 16px; bottom: 86px; }
}
