/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui;
  line-height: 1.6;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
  background: #2c3e50;
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  display: inline-block;
}

.cart-icon {
  float: right;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 20px;
  background: #3498db;
}

/* 课程列表布局 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.course-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.course-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* 购物车侧边栏 */
.cart-sidebar {
  position: fixed;
  right: -300px;
  top: 60px;
  width: 280px;
  background: white;
  padding: 1rem;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: right 0.3s;
}

.cart-sidebar.active {
  right: 20px;
}

/* 订单表单样式 */
.order-form {
  display: none;
  background: white;
  padding: 2rem;
  margin-top: 2rem;
  border-radius: 8px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
}

.checkout-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* 结算页面样式 */
.checkout-container {
  padding: 2rem 0;
}

.order-summary {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.payment-methods {
  background: white;
  padding: 2rem;
  border-radius: 8px;
}

.payment-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.payment-option:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52,152,219,0.2);
}

.payment-option img {
  width: 40px;
  height: 40px;
  margin-right: 1rem;
}

/* 支付弹窗样式 */
.payment-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.modal-content {
  position: relative;
  background: white;
  padding: 2rem;
  width: 300px;
  margin: 10% auto;
  border-radius: 8px;
  text-align: center;
}

.qrcode-placeholder {
  width: 200px;
  height: 200px;
  margin: 1rem auto;
  background: #f0f0f0;
  border-radius: 8px;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 24px;
  cursor: pointer;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    margin-top: 20%;
  }
}