/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

html, body, #__next {
    background-color: #ffffff !important;
}

body {
    color: #333;
    line-height: 1.6;
}

/* 通用容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

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

.app-shell, .app-content, .page-wrapper, main, section, .container, .courses, .products {
    background-color: #ffffff !important;
}

a {
    text-decoration: none;
    color: #333;
}

nav ul li.active > a {
    
    color: #e74c3c !important;
    font-weight: bold !important;
    border-bottom: 2px solid #e74c3c !important;
}

ul {
    list-style: none;
}

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

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    gap: 12px;
    flex-wrap: nowrap;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 20px;
    color: #e74c3c;
    font-weight: bold;
}



nav ul {
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    font-size: 16px;
    padding: 5px 0;
    position: relative;
}

nav ul li a:hover, nav ul li a.active {
    color: #e74c3c;
}

nav ul li a.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
}

.login a {
    color: #666;
    font-size: 14px;
}

.login {
    margin-left: auto;
}

.login a:hover {
    color: #e74c3c;
}

/* 轮播图样式 */
.slider {
    margin-bottom: 30px;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 300px;
    background-color: #3498db;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.slide.active {
    opacity: 1;
}

.slide img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 30px;
    max-width: 60%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-left: 50px;
}

.slide-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #fff;
}

.slide-content p {
    font-size: 16px;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
    color: #333;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 3;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Footer 样式 */

/* 登录弹窗 LoginModal 样式 */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.login-modal.active {
    display: flex;
}
.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 2001;
    padding: 10px;
    margin: -10px;
}
.login-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 1;
}
.login-tab {
    flex: 0 1 auto;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    position: relative;
    margin: 0 20px;
}
.login-tab:hover:not(.active) {
    color: #00c1b6;
}
.login-tab.active {
    color: #e74c3c;
    font-weight: bold;
}
.login-tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
}
.login-form {
    padding: 20px 30px;
    display: none;
}
.login-form.active {
    display: block;
}
.form-group {
    margin-bottom: 20px;
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background-color: #f9f9f9;
}
.form-group input:focus {
    border-color: #e74c3c;
    background-color: #fff;
}
.verify-code {
    display: flex;
    gap: 10px;
}
.verify-code input {
    flex: 1;
}
.verify-code button {
    padding: 0 15px;
    background: none;
    border: none;
    color: #00c1b6;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}
.submit-btn {
    width: 100%;
    padding: 12px 0;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.submit-btn:hover {
    background-color: #c0392b;
}
.form-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.form-footer a {
    color: #00c1b6;
    cursor: pointer;
}
.agreement {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-top: 15px;
}
.agreement input {
    margin-right: 5px;
}
.agreement a {
    color: #00c1b6;
}


.footer-wrapper {
  width: 100%;
}
.footer-main {
  background: #004b99;
  color: #fff;
  padding: 32px 0 16px 0;
}

.footer-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-logo {
  height: 60px;
  margin-bottom: 0;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}
.footer-info {
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
}

.footer-brand {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

.footer-brand-subtitle {
  font-size: 14px;
  opacity: 0.9;
  letter-spacing: 0.6px;
}

.footer-divider {
  max-width: 1200px;
  margin: 18px auto 0 auto;
  border-top: 2px solid rgba(255, 255, 255, 0.25);
}

.footer-columns {
  max-width: 1200px;
  margin: 18px auto 0 auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.footer-col-title {
  font-size: 18px;
  font-weight: 700;
}

.footer-col-line {
  margin-top: 10px;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.footer-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  color: #fff;
  font-size: 14px;
  opacity: 0.95;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-social {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  color: #fff;
}

.footer-social-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 768px) {
  .footer-logo {
    height: 72px;
  }
}

@media (max-width: 768px) {
  .footer-main {
    padding: 24px 0 12px 0;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-brand-title {
    font-size: 24px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 12px;
  }

  .footer-col-title {
    font-size: 16px;
  }

  .footer-col-line {
    margin-top: 6px;
  }

  .footer-info {
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .footer-main {
    padding: 20px 0 8px 0;
  }

  .footer-brand-title {
    font-size: 20px;
  }

  .footer-brand-subtitle {
    font-size: 12px;
  }

  .footer-columns {
    gap: 16px;
  }

  .footer-link {
    font-size: 13px;
  }
}
.footer-bottom {
  background: #003366;
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 8px 0;
}

/* 课程部分样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
    padding-left: 15px;
}

.section-header h2 {
    font-size: 22px;
    color: #333;
}

.more {
    display: flex;
    align-items: center;
}

.more a {
    color: #3498db;
    margin-right: 5px;
}

.more span {
    color: #999;
    font-size: 14px;
}

.courses {
    margin-top: 50px;
}

.course-list {
    margin-top: 20px;
    margin-bottom: 20px;
}
  

.course-list, .product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.course-item, .product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.course-item:hover, .product-item:hover {
    transform: translateY(-5px);
}

.course-image, .product-image {
    height: 160px;
    overflow: hidden;
}

.course-image img, .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.course-item:hover .course-image img, .product-item:hover .product-image img {
    transform: scale(1.05);
}

.course-info, .product-info {
    padding: 15px;
}

.course-info h3, .product-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.certificate {
    color: #999;
    font-size: 14px;
}

/* 内购商品部分 */
.products {
    margin: 30px 0;
}


/* 响应式设计 */
@media (max-width: 992px) {
    .course-list, .product-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        flex-direction: row;
        align-items: center;
    }

    .logo {
        flex: 0 0 auto;
    }

    .login {
        order: 2;
        margin-left: auto;
        margin-top: 0;
    }

    nav {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }
    
    nav ul {
        margin: 0;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .course-list, .product-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slide-content {
        max-width: 80%;
        margin-left: 20px;
    }
}

@media (max-width: 576px) {
    .course-list, .product-list {
        grid-template-columns: 1fr;
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
}

.purchase-count {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}