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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 🔹 頁面容器 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    animation: fadeInUp 0.6s ease-out;
}

/* 頁面標題 */
.container h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #667eea;
    animation: slideIn 0.8s ease-out;
}

/* 🔹 按鈕區塊（返回按鈕 + 分享按鈕並排） */
.btn-share-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    animation: fadeInUp 0.7s ease-out;
}

/* 🔹 返回按鈕 */
.btn-back {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-back:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

/* 🔹 社群分享按鈕 */
.social-share {
    display: flex;
    gap: 12px;
}

/* 🔹 分享按鈕基本樣式 */
.share-btn {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 🔹 Facebook 按鈕 */
.fb-btn {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
}

.fb-btn:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1256a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(24, 119, 242, 0.3);
}

/* 🔹 LINE 按鈕 */
.line-btn {
    background: linear-gradient(135deg, #06c755 0%, #05b350 100%);
}

.line-btn:hover {
    background: linear-gradient(135deg, #05b350 0%, #048f39 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(6, 199, 85, 0.3);
}

/* 🔹 Instagram 按鈕 */
.ig-btn {
    background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

.ig-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(238, 42, 123, 0.3);
}


/* 🔹 影片容器 */
.video-container {
    margin: 32px 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}



/* 🔹 課程內容區塊 */
.course-section {
    margin: 32px 0;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-left: 6px solid #667eea;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.9s ease-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.course-section h2 {
    margin-bottom: 16px;
    color: #667eea;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.course-section p {
    line-height: 1.6;
    color: #4a5568;
    font-size: 15px;
}

/* 🔹 圖片區塊 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.image-gallery a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.image-gallery a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.image-gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-gallery a:hover img {
    transform: scale(1.05);
}

/* 🔹 按鈕容器 */
.signup-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    animation: fadeInUp 1.2s ease-out;
}

/* 🔹 前去報名按鈕 */
.btn-signup {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.btn-signup::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-signup:hover::before {
    left: 100%;
}

.btn-signup:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(72, 187, 120, 0.4);
}

.btn-waitlist {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(221, 107, 32, 0.3);
    min-width: 160px;
}

.btn-waitlist:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(221, 107, 32, 0.4);
}

/* 🔹 關閉視窗按鈕（僅在桌面版顯示） */
.btn-close-window {
    background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
    color: white;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.3);
    min-width: 160px;
}

/* 🔹 滑鼠懸停時變色 */
.btn-close-window:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(229, 62, 62, 0.4);
}

/* 🔹 僅限電腦版顯示關閉視窗按鈕 */
@media (max-width: 768px) {
    .btn-close-window {
        display: none;
    }
}



/* 🔹 課程大綱區塊 */
.outline-container {
    padding: 24px;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

/* 🔹 課程大綱列表 */
.outline-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 🔹 課程大綱卡片 */
.outline-card {
    display: flex;
    align-items: flex-start;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.outline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.outline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* 🔹 週數樣式 */
.outline-week {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-right: 20px;
    min-width: 80px;
    text-align: center;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 8px;
    padding: 8px;
    border: 2px solid #e2e8f0;
}

/* 🔹 內容區塊 */
.outline-content {
    flex-grow: 1;
}

.outline-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
}

.outline-content p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* 🔹 錯誤訊息 */
.error-message {
    color: red;
    font-weight: bold;
    text-align: center;
}

/* 🔹 課程資訊區塊 */
.course-info {
    padding: 24px;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
}

/* 🔹 使用 grid 排版 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    font-size: 15px;
    color: #4a5568;
}

/* 🔹 個別資訊項目 */
.info-item {
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-item:hover::before {
    opacity: 1;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* 🔹 標題顏色 */
.info-item strong {
    color: #667eea;
    margin-right: 8px;
    font-weight: 600;
    min-width: 80px;
}

/* 🔹 上課地點導航按鈕 */
.info-item a {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.info-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.info-item a:hover::after {
    width: 100%;
}

.info-item a:hover {
    color: #764ba2;
}

/* 🔹 讓 Card 內的 <a> 連結不影響原始樣式 */
.course-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
    text-decoration: none;
}

/* 🔥 熱門度區塊 */
.course-popularity {
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 12px;
    color: #856404;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1c40f;
    animation: fadeInUp 1.1s ease-out;
}

/* 費用列表美化 */
.list-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.list-group-item {
    background: #fff;
    border: none;
    border-bottom: 1px solid #f7fafc;
    padding: 16px 20px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item strong {
    color: #667eea;
    font-weight: 600;
}

/* 表單美化 */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 卡片樣式 */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

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

.card-body {
    padding: 20px;
}

.card-title {
    color: #2d3748;
    font-weight: 600;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    .btn-share-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .social-share {
        justify-content: center;
    }
    
    .signup-container {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-close-window {
        display: none;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .outline-card {
        flex-direction: column;
        text-align: center;
    }
    
    .outline-week {
        margin-right: 0;
        margin-bottom: 12px;
        min-width: auto;
    }
}