@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #1e40af;
    --secondary-color: #f97316;
    --accent-color: #3b82f6;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    min-height: 100vh;
    position: relative;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.gold-gradient {
    background: linear-gradient(135deg, #c9a227 0%, #e6c950 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blue-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    font-size: 24px;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.course-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-color);
}

.course-card .course-image {
    height: 280px;
    overflow: hidden;
}

.course-card .course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #e2e8f0;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: white;
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.timeline-right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.timeline-right::after {
    left: -13px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
    
    .timeline-left::after, .timeline-right::after {
        left: 18px;
    }
    
    .timeline-right {
        left: 0%;
    }
}

.ai-chat-container {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f7fafc;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
}

.user-message {
    background-color: #3182ce;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.ai-message {
    background-color: white;
    color: var(--dark-text);
    margin-right: auto;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-input {
    display: flex;
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #e2e8f0;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-right: 0.5rem;
}

.chat-input button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-input button:hover {
    background-color: var(--primary-color);
}

.progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 1rem;
    margin: 1rem 0;
}

.progress-bar {
    height: 10px;
    border-radius: 1rem;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    width: 0;
    transition: width 0.5s ease;
}

.certificate-preview {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    perspective: 1000px;
}

.certificate-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.certificate-preview:hover .certificate-inner {
    transform: rotateY(180deg);
}

.certificate-front, .certificate-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.certificate-back {
    transform: rotateY(180deg);
    background-color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.community-post {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.community-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: white;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0.75rem;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.post-info p {
    font-size: 0.875rem;
    color: #718096;
}

.post-content {
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #f1f5f9;
}

.post-actions {
    display: flex;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.post-action {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    color: #718096;
    transition: color 0.3s ease;
    cursor: pointer;
}

.post-action:hover {
    color: var(--accent-color);
}

.post-action i {
    margin-right: 0.5rem;
}

#three-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.2;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 30;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* 动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.count-animation {
    display: inline-block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-content {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* 轮播样式 */
.carousel-container {
    position: relative;
    z-index: 5;
}

.carousel-slide {
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 20;
    transition: background 0.3s;
    font-size: 20px;
    backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
    background: rgba(255,255,255,0.4);
}

.carousel-arrow.left {
    left: 20px;
}

.carousel-arrow.right {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* 移动端下拉菜单箭头旋转 */
.mobileDropdown-toggle .fa-chevron-down.rotate-180 {
    transform: rotate(180deg);
}

/* 移动端菜单链接的激活状态（辅助 Tailwind） */
#mobileMenu a.text-blue-600 {
    --tw-text-opacity: 1;
    color: rgb(37 99 235 / var(--tw-text-opacity));
}

/* 子菜单过渡动画 */
.submenu {
    transition: all 0.2s ease;
}

.submenu:not(.hidden) {
    display: block;
}