@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Roboto&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to right, #1a1a2e, #6a4386);
    color: #f8f8f8;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: #ffcbcb;
}

a:not(.btn) {
    text-decoration: none;
    color: #010047;
    transition: color 0.3s ease;
}

a:not(.btn):hover {
    color: #f0a500;
}

nav {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

nav a {
  font-size: 1.125rem;
  font-weight: 600;
  margin-left: 10px;
}


.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
}

form input, form button {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
}

form input {
    background-color: #eeeeee;
    color: #333;
}

form button {
    background-color: #ff6f61;
    color: white;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

form button:hover {
    background-color: #ff4c29;
    transform: scale(1.05);
}


/* static/css/courses.css */

/* 課程列表容器 */
.course-list {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 標題樣式 */
.course-list h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
}

.course-card {
  background: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
  backdrop-filter: blur(10px); /* 毛玻璃效果 */
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2); /* 細邊框增強質感 */
}

/* 懸停時的立體效果 */
.course-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 標題樣式升級 */
.course-card h2 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  position: relative;
  display: inline-block;
}

/* 標題下方裝飾線 */
.course-card h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
}

/* 卡片內容文字 */
.course-card p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
  outline: none;
  
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15)  !important;
  background: linear-gradient(135deg, #5a6fd1 0%, #6a3d9a 100%)  !important;
}


.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
  z-index: -1;
}

.btn:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* 禁用狀態 */
.btn:disabled {
  background: #e2e8f0;
  color: #a0aec0;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}


button.enroll-button {
    background-color: #ffd369;
    color: #a87fff;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button.enroll-button:hover {
    background-color: #f0a500;
    transform: scale(1.05);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-top: 20px;
}

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

/* EasyMDE 工具栏修复 */
.editor-toolbar {
    padding: 8px 10px;
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
    border-radius: 4px 4px 0 0 !important;
    opacity: 1 !important;
}

.editor-toolbar button {
    width: 30px;
    height: 30px;
    margin: 0 3px;
    color: #333 !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
}

.editor-toolbar button:hover,
.editor-toolbar button.active {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
}

.editor-toolbar i.separator {
    border-left: 1px solid #ddd !important;
    margin: 0 6px !important;
}

.editor-toolbar.fullscreen {
    z-index: 1000 !important;
}

/* 图标大小调整 */
.editor-toolbar .fa {
    font-size: 14px !important;
}
.nav-buttons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* 課程詳情頁專屬樣式 */
.course-detail-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.course-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd369;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.course-detail-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.course-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid #667eea;
    border-radius: 0 8px 8px 0;
}

.supplement-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.supplement-title {
    font-size: 1.5rem;
    color: #ffcbcb;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.supplement-title::before {
    content: '📚';
    margin-right: 0.5rem;
}

.prose {
    color: #e2e8f0;
    line-height: 1.7;
}

.prose a {
    color: #ffd369;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.prose a:hover {
    color: #f0a500;
    text-decoration: none;
}

.prose h2 {
    color: #ffcbcb;
    margin-top: 2rem;
}

.prose ul, .prose ol {
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    position: relative;
}

.edit-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 2rem;
    border: none;
    color: white !important;
    text-decoration: none !important;
}

.edit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 首頁專屬樣式 */
.home-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.home-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd369;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.home-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.course-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

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

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

.course-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.course-desc {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.enroll-link {
    display: inline-flex;
    align-items: center;
    color: #667eea !important;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.enroll-link:hover {
    color: #764ba2 !important;
    transform: translateX(5px);
}

.enroll-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.enroll-link:hover::after {
    transform: translateX(3px);
}

/* 登入頁專屬樣式 */
.login-container {
    max-width: 400px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd369;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: #f8f8f8;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-button {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}


/* Markdown 內容樣式 */
.prose {
  color: #f1c900;
  line-height: 1.7;
  font-size: 1rem;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: 'Playfair Display', serif;
  color: #ff8f9e;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose h1 {
  font-size: 2em;
  border-bottom: 1px solid rgba(255, 203, 203, 0.2);
  padding-bottom: 0.3em;
}

.prose h2 {
  font-size: 1.5em;
  border-bottom: 1px solid rgba(255, 203, 203, 0.2);
  padding-bottom: 0.3em;
}

.prose h3 {
  font-size: 1.25em;
}

.prose p {
  margin-bottom: 1em;
}

.prose a {
  color: #b1934d;
  text-decoration: underline;
  transition: all 0.3s ease;
}

.prose a:hover {
  color: #f0a500;
  text-decoration: none;
}

.prose ul, .prose ol {
  padding-left: 2em;
  margin-bottom: 1em;
}

.prose li {
  margin-bottom: 0.5em;
  position: relative;
}

.prose code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: monospace;
}

.prose pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1em;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1em;
}

.prose blockquote {
  border-left: 3px solid #ffd369;
  padding-left: 1em;
  margin-left: 0;
  color: #a0aec0;
  font-style: italic;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}

.prose th, .prose td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5em;
}

.prose th {
  background: rgba(0, 0, 0, 0.2);
}


/* 響應式調整 */
@media (max-width: 480px) {
    .login-container {
        margin: 1.5rem;
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
}


/* 響應式調整 */
@media (max-width: 768px) {
    .home-container {
        padding: 0 1rem;
    }
    
    .home-title {
        font-size: 2rem;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
}


/* 響應式調整 */
@media (max-width: 768px) {
    .course-detail-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .course-detail-title {
        font-size: 2rem;
    }
}


/* 響應式設計 */
@media (max-width: 768px) {
    .course-list {
        padding: 0 0.5rem;
    }
    
    .course-card {
        padding: 1rem;
    }
    
    .course-list h1 {
        font-size: 2rem;
    }
    
    .course-card h2 {
        font-size: 1.25rem;
    }
}






