/* ==================== 基础样式 ==================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --dark-color: #0f172a;
    --text-color: #334155;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 10px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
}

.logo-text {
    color: var(--white);
    transition: var(--transition);
}

.navbar.scrolled .logo-text {
    color: var(--dark-color);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

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

.navbar.scrolled .nav-links a {
    color: var(--text-color);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--dark-color);
}

/* ==================== 首页横幅 ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.2) 0%, transparent 40%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: var(--white);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-full {
    width: 100%;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-card .card-icon {
    font-size: 1.5rem;
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 30%;
    right: 5%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Robot Illustration */
.robot-illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.robot-body {
    position: relative;
    width: 120px;
    height: 180px;
}

.robot-head {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 20px;
    margin: 0 auto 10px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.robot-eye {
    width: 12px;
    height: 12px;
    background: var(--white);
    border-radius: 50%;
    animation: blink 3s ease-in-out infinite;
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.robot-torso {
    width: 100px;
    height: 80px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-radius: 15px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.robot-arm {
    position: absolute;
    width: 20px;
    height: 60px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border-radius: 10px;
    top: 70px;
}

.robot-arm.left {
    left: -10px;
    transform: rotate(-15deg);
    animation: wave 2s ease-in-out infinite;
}

.robot-arm.right {
    right: -10px;
    transform: rotate(15deg);
    animation: wave 2s ease-in-out infinite reverse;
}

@keyframes wave {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(-25deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 1; top: 8px; }
    50% { opacity: 0.3; top: 20px; }
}

/* ==================== 通用板块样式 ==================== */
section {
    padding: 100px 0;
}

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

.section-tag {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* ==================== 关于我们 ==================== */
.about {
    background: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 8px;
}

.about-image {
    position: relative;
}

.image-frame {
    background: var(--dark-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.code-animation {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-animation pre {
    margin: 0;
    color: #e2e8f0;
}

.code-animation .keyword {
    color: #c084fc;
}

.code-animation .class-name {
    color: #67e8f9;
}

.code-animation .string {
    color: #86efac;
}

.code-animation .function {
    color: #fbbf24;
}

/* ==================== 课程服务 ==================== */
.courses {
    background: var(--white);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border: 1px solid #e2e8f0;
}

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

.course-card.featured {
    background: var(--gradient-primary);
    border: none;
}

.course-card.featured * {
    color: var(--white);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
}

.course-card.featured .course-icon {
    background: rgba(255, 255, 255, 0.2);
}

.course-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.course-card.featured .course-icon svg {
    color: var(--white);
}

.course-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
}

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

.course-card.featured .course-desc {
    color: rgba(255, 255, 255, 0.9);
}

.course-features {
    margin-bottom: 30px;
}

.course-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-color);
    font-size: 0.9375rem;
}

.course-features li::before {
    content: '✓';
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.course-card.featured .course-features li::before {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.course-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9375rem;
}

.course-btn::after {
    content: '→';
    transition: var(--transition);
}

.course-btn:hover::after {
    transform: translateX(5px);
}

.course-card.featured .course-btn {
    color: var(--white);
}

/* ==================== 我们的优势 ==================== */
.features {
    background: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    background: var(--white);
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.feature-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==================== 联系我们 ==================== */
.contact {
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 40px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    gap: 16px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

.info-text h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.info-text p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* Contact Form */
.contact-form {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 40px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

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

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

/* ==================== 页脚 ==================== */
.footer {
    background: var(--dark-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
}

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

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand > p {
    line-height: 1.8;
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 24px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-contact p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        color: var(--text-color);
        padding: 15px 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .course-card {
        padding: 30px 20px;
    }

    .contact-form {
        padding: 30px 20px;
    }
}

/* ==================== 动画效果 ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 统计数字动画 */
@keyframes countUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}
