/****************************/
/******* 課程列表 開始 ********/
/****************************/

.course-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.course-card-image {
  position: relative;
  width: 100%;
  padding-top: 37.04%;
  /* 1620:600 比例 */
  overflow: hidden;
}

.course-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f5f5f5;
}

.course-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-info {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.course-card-info i {
  width: 20px;
  color: #ccc;
}

.course-card-instructors {
  font-size: 0.85rem;
  color: #888;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.course-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
}

.course-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-open {
  background: #d4edda;
  color: #155724;
}

.status-not-started {
  background: #fff3cd;
  color: #856404;
}

.status-ended {
  background: #f8d7da;
  color: #721c24;
}

.no-courses {
  text-align: center;
  padding: 4rem 2rem;
}

.no-courses img {
  max-width: 200px;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

/****************************/
/******* 課程列表 結束 ********/
/****************************/

/****************************/
/******* 課程內容 開始 ********/
/****************************/

.course-detail {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.course-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.course-content {
  padding: 2rem;
}

.course-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
}

.course-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.course-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.course-meta-item i {
  font-size: 1.25rem;
  color: #007bff;
  width: 24px;
  text-align: center;
  margin-top: 2px;
}

.course-meta-item .label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.course-meta-item .value {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

.course-description {
  margin-bottom: 2rem;
}

.course-description h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  margin-top: 20px;
  border-bottom: 2px solid #e29d90;
  display: inline-block;
}

.course-description .content {
  line-height: 1.8;
  color: #555;
}

.course-instructors {
  margin-bottom: 2rem;
}

.course-instructors h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1rem;
  margin-top: 20px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e29d90;
  display: inline-block;
}

.instructor-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.instructor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.instructor-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.instructor-avatar-placeholder i {
  font-size: 2rem;
  color: #adb5bd;
}

.instructor-info h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.instructor-info p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

.registration-section {
  padding: 1.5rem;
  background: #e3f2fd;
  border-radius: 8px;
  text-align: center;
}

.registration-period {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.btn-register {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  display: block;
  margin: 0 auto;
  width: 200px;
  background: #e29d90;
  border: none;
  transform: all 0.3s ease;
}

.btn-register:hover {
  background: #e29d90 !important;
}

.back-link {
  margin-top: 2rem;
}

.badge-bg {
  background: #e29d90;
}

/****************************/
/******* 課程內容 結束 ********/
/****************************/

/*******************************/
/******* 我的課程列表 開始 ********/
/*******************************/

.my-courses {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.my-courses-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e29d90;
}

.order-card {
  display: flex;
  gap: 1.25rem;
  border: 2px solid #ffe6e0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.05);
  align-items: center;
}

.order-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #e29d90;
}

.order-card-image {
  flex-shrink: 0;
  width: 280px;
  height: 104px;
  /* 1620:600 比例 (280 * 600/1620) */
  border-radius: 8px;
  overflow: hidden;
}

.order-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.course-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

.payment-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 1rem;
}

.payment-badge.bg-success {
  background: #d4edda !important;
  color: #155724 !important;
}

.payment-badge.bg-warning {
  background: #fff3cd !important;
  color: #856404 !important;
}

.payment-badge.bg-danger {
  background: #f8d7da !important;
  color: #721c24 !important;
}

.payment-badge.bg-secondary {
  background: #e2e3e5 !important;
  color: #383d41 !important;
}

.payment-badge.bg-info {
  background: #d1ecf1 !important;
  color: #0c5460 !important;
}

.order-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.5rem;
}

.order-info-item {
  font-size: 0.9rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.order-info-item i {
  color: #e29d90;
  width: 16px;
  text-align: center;
}

.order-info-item .value {
  color: #333;
}

.order-info-item .value.text-danger {
  font-weight: 600;
}

.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}

.order-no {
  font-size: 0.85rem;
  color: #999;
}

.order-no i {
  margin-right: 0.3rem;
}

.btn-view-detail {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  background: #e29d90;
  border: none;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-view-detail:hover {
  background: #d88a7c;
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state i {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 1.5rem;
}

.empty-state h4 {
  color: #666;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #999;
  margin-bottom: 1.5rem;
}

.btn-browse-courses {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  background: #e29d90;
  border: none;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-browse-courses:hover {
  background: #d88a7c;
  color: #fff;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .order-card {
    flex-direction: column;
  }

  .order-card-image {
    width: 100%;
    height: auto;
    padding-top: 37.04%;
    /* 1620:600 比例 */
    position: relative;
  }

  .order-card-image img {
    position: absolute;
    top: 0;
    left: 0;
  }

  .order-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .payment-badge {
    margin-left: 0;
    align-self: flex-start;
  }

  .order-info {
    flex-direction: column;
    gap: 0.4rem;
  }

  .order-card-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .btn-view-detail {
    justify-content: center;
  }
}

/*******************************/
/******* 我的課程列表 結束 ********/
/*******************************/

.signup-title {
  color: #999;
}

/****************************/
/******* 課程檔案 開始 ********/
/****************************/

.course-files {
  margin-bottom: 2rem;
}

.course-files h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1rem;
  margin-top: 20px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e29d90;
  display: inline-block;
}

.files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.files-list .file-item {
  background: #f8f9fa;
  transition: all 0.3s ease;
  width: auto;
  min-width: 200px;
  max-width: 350px;
  flex-shrink: 0;
}

.files-list a.file-item:hover {
  background: #f8f8f8;
  border-color: #e29d90 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.files-list .file-item .file-name {
  word-break: break-all;
  font-size: 0.9rem;
}

.files-list .file-item .file-type-badge .badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.files-list .file-item .download-icon {
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.files-list a.file-item:hover .download-icon i {
  color: #e29d90;
}

/* 響應式調整 */
@media (max-width: 576px) {
  .files-list .file-item {
    width: 100%;
    max-width: 100%;
  }
}

/****************************/
/******* 課程檔案 結束 ********/
/****************************/