/* TechNest Hub 2026 - 技能孵化学习平台 全局样式 */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 0;
    position: relative;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 100px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.95;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 课程卡片网格 */
.courses-section {
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1280px;
    margin: 0 auto;
}

.course-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

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

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    cursor: pointer;
}

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

.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.course-content {
    padding: 24px;
}

.course-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.course-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.course-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.course-title a:hover {
    color: var(--primary-color);
}

.course-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.7;
}

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

.course-price {
    font-size: 24px;
    font-weight: 800;
    color: #ef4444;
}

.course-price span {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

.course-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}

/* 特色区域 */
.features-section {
    background: linear-gradient(180deg, #f8fafc 0%, #e0e7ff 100%);
    padding: 80px 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
}

/* 好评区域 */
.reviews-section {
    padding: 80px 20px;
    background: var(--bg-card);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.review-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.review-stars {
    color: #fbbf24;
    font-size: 18px;
    margin-bottom: 15px;
}

.review-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-style: italic;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-info h4 {
    font-size: 16px;
    color: var(--text-dark);
}

.review-info p {
    font-size: 13px;
    color: var(--text-light);
}

/* 详情页样式 */
.detail-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 60px 20px;
    color: #fff;
}

.detail-breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
}

.detail-breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.detail-breadcrumb a:hover {
    color: #fff;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-main h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.detail-desc {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.95;
}

.detail-sidebar {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 30px;
    color: var(--text-dark);
    height: fit-content;
}

.detail-price-box {
    text-align: center;
    margin-bottom: 25px;
}

.detail-price {
    font-size: 42px;
    font-weight: 800;
    color: #ef4444;
}

.detail-original-price {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 10px;
}

.detail-discount {
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.btn-enroll {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-enroll:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.detail-includes {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.detail-includes h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.detail-includes li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-includes li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

/* 课程内容区域 */
.course-content-section {
    padding: 60px 20px;
}

.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.content-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.3s;
}

.content-tab.active,
.content-tab:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.curriculum-list {
    list-style: none;
}

.curriculum-item {
    background: var(--bg-light);
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.curriculum-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
}

.curriculum-header:hover {
    background: rgba(99, 102, 241, 0.1);
}

.curriculum-header h4 {
    font-size: 16px;
    color: var(--text-dark);
}

.curriculum-header span {
    font-size: 14px;
    color: var(--text-light);
}

/* 订单页面 */
.order-page {
    padding: 50px 20px;
    min-height: calc(100vh - 200px);
}

.order-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.order-form-section {
    background: #fff;
    padding: 35px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.order-form-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-summary {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.order-summary h3 {
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.order-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.order-item-info h4 {
    font-size: 15px;
    margin-bottom: 5px;
}

.order-item-info p {
    font-size: 13px;
    color: var(--text-light);
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    margin-top: 20px;
}

.order-total span:last-child {
    color: #ef4444;
    font-size: 28px;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* 页脚 */
.footer {
    background: #1e293b;
    color: #fff;
    padding: 60px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand p {
    margin-top: 15px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* AI客服按钮 */
.ai-chat-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.ai-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(16, 185, 129, 0.7); }
}

.ai-chat-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: var(--text-dark);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.ai-chat-btn:hover .ai-chat-tooltip {
    opacity: 1;
    visibility: visible;
}

.ai-chat-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: #fff;
}

/* 聊天窗口 */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.show {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    font-size: 16px;
}

.chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    max-width: 85%;
}

.chat-message.bot {
    margin-right: auto;
}

.chat-message.user {
    margin-left: auto;
}

.chat-message p {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
}

.chat-message.bot p {
    background: var(--bg-light);
    color: var(--text-dark);
}

.chat-message.user p {
    background: var(--primary-color);
    color: #fff;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

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

.chat-input button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.chat-input button:hover {
    background: var(--primary-dark);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .detail-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .order-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .course-card {
        margin: 0 10px;
    }
}
