:root {
    --primary-color: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-title {
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.btn-glow {
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
    transform: translateY(-2px);
}

.feature-card {
    border: none;
    border-radius: 15px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.course-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

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

.course-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-badge {
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.badge-top-left {
    position: absolute !important;
    top: 1rem !important;
    left: 1rem !important;
    z-index: 10;
}

.badge-top-right {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 10;
}

.badge-bottom-right {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.instructor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.stats-card {
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.section-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-subtitle {
    color: #64748b;
    margin-bottom: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

footer {
    background: #1e1b4b;
    color: #e2e8f0;
}

footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

.nav-link {
    color: #334155;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.active-nav {
    color: var(--primary-color) !important;
}

/* 導覽列 nav-link 文字顏色 */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.navbar .nav-link:hover {
    color: #ffffff;
}

.navbar .nav-link.active {
    color: #ffffff;
}

/* 導覽列使用者選單按鈕 */
.navbar .nav-item .btn-outline-light:hover {
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar .nav-item .dropdown-toggle::after {
    border-top-color: rgba(255, 255, 255, 0.9);
}

.video-preview {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--secondary-color);
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 載入動畫 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 響應式調整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        min-height: auto;
        padding: 100px 0;
    }

    .feature-card {
        margin-bottom: 1rem;
    }

    .course-card {
        margin-bottom: 1.5rem;
    }
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 表單樣式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* 圖片懸停效果 */
img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}

/* 工具類 */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 卡片陰影效果 */
.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

/* 圓形浮動按鈕 */
.icon-bar2 {
  position: fixed;
  top: 55px;
  -webkit-transform: translateY(-80%);
  -ms-transform: translateY(-80%);
  transform: translateY(-80%);
  right: 0px;
}

/* Question timeline container */
#questionMarkers{
  position:relative;
  width:100%;
  height:40px;
  margin-top:10px;
}

.timeline-track{
  position:relative;
  width:100%;
  height:6px;
  background:#dee2e6;
  border-radius:4px;
}

.marker{
  position:absolute;
  top:-10px;
  width:18px;
  height:24px;
  background:#0d6efd;
  border-radius:4px;
  cursor:pointer;
  color:#fff;
  font-size:11px;
  text-align:center;
  line-height:24px;
}

/* hover label */
.marker .label {
  display: none;
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

/* delete button */
.marker .del {
  display: none;
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  background: #dc3545;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}

/* hover effects */
.marker:hover .label,
.marker:hover .del {
  display: block;
}