/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局：取消非输入区域的插入光标与点击高亮 */
html, body {
    -webkit-tap-highlight-color: transparent;
}

*:not(input):not(textarea) {
    caret-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.nav-logo {
    flex-shrink: 0;
}

.nav-container > .hamburger {
    flex-shrink: 0;
}

.nav-logo h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-logo span {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-style: italic;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* 用户菜单项样式 */
.nav-item.user-nav-item {
    position: relative;
    margin-left: 0.5rem;
}

.nav-item.user-nav-item .nav-link {
    padding: 0.5rem 1rem;
    gap: 0.75rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}

.nav-item.user-nav-item .nav-link:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.3);
}

.nav-item.user-nav-item .nav-link i.fa-user {
    font-size: 1rem;
    opacity: 0.9;
}

.nav-item.user-nav-item .nav-link i.fa-chevron-down {
    font-size: 0.75rem;
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
}

.nav-item.user-nav-item .nav-link:hover i.fa-chevron-down {
    opacity: 1;
}

.nav-item.user-nav-item.dropdown-open .nav-link i.fa-chevron-down {
    transform: rotate(180deg);
    opacity: 1;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    z-index: -1;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.user-dropdown a:hover {
    background: linear-gradient(90deg, #f6ffed 0%, #ffffff 100%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    border-left: 3px solid;
    border-image: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%) 1;
    padding-left: 1.5rem;
}

.user-dropdown a i {
    margin-right: 0.75rem;
    width: 18px;
    text-align: center;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.user-dropdown a:hover i {
    transform: scale(1.1);
}

.user-dropdown a:last-child {
    border-top: 1px solid #f0f0f0;
    margin-top: 0.25rem;
    padding-top: 0.875rem;
}

.user-dropdown a:last-child:hover {
    background: linear-gradient(90deg, #fff1f0 0%, #ffffff 100%);
    color: #ff4d4f;
    border-left-color: #ff4d4f;
}

.user-dropdown a:last-child i {
    color: #ff4d4f;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 轮播图样式 */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 25%, #95d475 50%, #a8d574 75%, #b7eb8f 100%);
}

.carousel-slide.active {
    opacity: 1;
}

.slide-content {
    flex: 0 0 50%;
    width: 50%;
    padding: 0;
    color: white;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    min-height: 100%;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 0 10%;
    box-sizing: border-box;
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-align: center;
    max-width: 700px;
    width: 100%;
    padding: 0 10%;
    box-sizing: border-box;
    line-height: 1.8;
}

.cta-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    margin: 0 auto;
}

.cta-button:hover {
    background: white;
    color: #52c41a;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.slide-image {
    flex: 0 0 50%;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
    z-index: 2;
    position: relative;
}

.slide-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2%;
    z-index: 3;
}

.carousel-btn {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    caret-color: transparent;
    display: inline-block;
    line-height: 0;
}

.indicator:focus { outline: none; }

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 课程介绍样式 */
.courses {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    border-radius: 2px;
}

.courses-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
}

.course-intro {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.intro-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.intro-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(82, 196, 26, 0.3);
}

.intro-icon i {
    font-size: 1.8rem;
    color: white;
}

.intro-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.intro-text {
    color: #555;
}

.intro-text .lead {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.intro-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 2rem;
}

.intro-features {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f6ffed;
    border-radius: 12px;
    border: 1px solid #b7eb8f;
}

.feature-point {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: #2a6f18;
}

.feature-point i {
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.1rem;
}

.feature-point span {
    font-size: 0.95rem;
    font-weight: 500;
}

.intro-cta {
    margin-top: 2.5rem;
}

.intro-cta .btn-primary {
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(82, 196, 26, 0.3);
}

.intro-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(82, 196, 26, 0.4);
}

.course-video {
    position: sticky;
    top: 100px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border: 3px solid #f0f0f0;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

.video-wrapper video {
    background: #000;
    border-radius: 20px;
}

.video-wrapper video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.7);
}

.video-hint {
    margin-top: 1rem;
    padding: 1rem;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    color: #d48806;
    font-size: 0.9rem;
}

.video-hint i {
    margin-right: 0.5rem;
}

.video-hint code {
    background: rgba(212, 136, 6, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

@media (max-width: 968px) {
    .courses-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-video {
        position: relative;
        top: 0;
    }

    .course-intro {
        padding: 2rem;
    }

    .intro-header h3 {
        font-size: 1.5rem;
    }
}

/* 关于我们样式 */
.about {
    padding: 100px 0;
    background: #f8f9fa;
}

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

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.achievements {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.achievement i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.achievement span {
    font-weight: 600;
    color: #333;
}

.about-image {
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* 特色功能样式 */
.features {
    padding: 100px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 3rem;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 中等屏幕优化 */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-menu {
        gap: 0.75rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .nav-item.user-nav-item .nav-link {
        padding: 0.5rem 0.875rem;
    }
    
    .user-dropdown {
        min-width: 160px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, #7cb305 0%, #52c41a 50%, #73d13d 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        gap: 0;
        align-items: stretch;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
        margin: 0;
    }
    
    .nav-item.user-nav-item {
        margin-left: 0;
        margin-top: 1rem;
        border-top: 1px solid rgba(255,255,255,0.2);
        padding-top: 1rem;
    }
    
    .nav-link {
        justify-content: center;
        padding: 1rem;
        border-radius: 0;
        width: 100%;
    }
    
    .nav-item.user-nav-item .nav-link {
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        margin: 0 1rem;
        border-radius: 8px;
    }
    
    .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
        box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
        background: rgba(255,255,255,0.95);
        border-radius: 8px;
        transform: none;
        min-width: auto;
    }
    
    .user-dropdown::before {
        display: none;
    }
    
    .user-dropdown.show {
        transform: none;
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .user-dropdown a {
        color: #333;
        border-left: none;
        padding-left: 1.25rem;
    }
    
    .user-dropdown a:hover {
        background: rgba(82, 196, 26, 0.1);
        padding-left: 1.5rem;
        border-left: 3px solid #52c41a;
    }
    
    .carousel-slide {
        flex-direction: column;
    }
    
    .carousel-slide::before {
        width: 100%;
        height: 50%;
        top: 0;
    }
    
    .slide-content {
        flex: 0 0 50%;
        width: 100%;
        padding: 2rem 5%;
        min-height: 50vh;
    }
    
    .slide-image {
        flex: 0 0 50%;
        width: 100%;
        padding: 2rem 5%;
        min-height: 50vh;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .carousel-controls {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .course-card {
        padding: 2rem;
    }
}
