* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS 變數 - 淺色主題 */
:root {
    --bg-warm: #fdf6e3;
    --bg-warm-hover: #f5edda;
    --bg-warm-active: #eae3c9;
    --border-color: #e8e0cb;
    --accent-color: #ec3750;
    --text-color: #5a5a5a;
    --text-dark: #333;
    --divider-color: #d0c7ab;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --wood-bg: #f3e9d4;
    --wood-dark: #dccfad;
    --card-bg: #fff;
    --highlight-bg: #fffdf8;
    --main-bg: #f8f8f8;
    --content-bg: #ffffff;
    --nav-hover-shadow: rgba(0, 0, 0, 0.15);
    --global-link-bg: rgba(255, 255, 255, 0.6);
    --global-link-hover-bg: rgba(255, 255, 255, 0.8);
    --content-shadow: rgba(0, 0, 0, 0.05);
}

/* CSS 變數 - 深色主題 */
[data-theme="dark"] {
    --bg-warm: #2d2d2d;
    --bg-warm-hover: #404040;
    --bg-warm-active: #4a4a4a;
    --border-color: #555;
    --accent-color: #ff6b85;
    --text-color: #b8b8b8;
    --text-dark: #e8e8e8;
    --divider-color: #666;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --wood-bg: #363636;
    --wood-dark: #2a2a2a;
    --card-bg: #3a3a3a;
    --highlight-bg: #424242;
    --main-bg: #1e1e1e;
    --content-bg: #2a2a2a;
    --nav-hover-shadow: rgba(255, 255, 255, 0.1);
    --global-link-bg: rgba(255, 255, 255, 0.1);
    --global-link-hover-bg: rgba(255, 255, 255, 0.2);
    --content-shadow: rgba(0, 0, 0, 0.3);
}

/* 主題切換按鈕樣式 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--main-bg);
    background-image: linear-gradient(to bottom, var(--content-bg), var(--main-bg));
    transition: all 0.3s ease;
    scroll-behavior: smooth;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--wood-bg);
    background-image: linear-gradient(to bottom, var(--bg-warm), var(--wood-bg));
    padding: 20px;
    position: fixed;
    height: 100%;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 15px var(--shadow-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow-y: auto;
}

/* 漢堡選單按鈕 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px; /* 增加上邊距 */
    left: 20px; /* 增加左邊距 */
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 46px; /* 稍微增加大小讓點擊更容易 */
    height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px var(--shadow-color); /* 增加陰影 */
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.logo {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 6px var(--shadow-color));
    transition: transform 0.3s ease;
    border-radius: 8px;
}

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

nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

nav ul {
    list-style: none;
}

nav li {
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

nav li:hover {
    transform: translateX(5px);
}

nav li.divider {
    border-bottom: 1px dashed var(--divider-color);
    margin: 25px 0;
    height: 1px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 14px 18px;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.05rem;
    box-shadow: 0 2px 5px var(--shadow-color);
    background-color: var(--bg-warm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] nav a::before {
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
}

nav a:hover::before {
    opacity: 1;
}

nav a:hover {
    background-color: var(--bg-warm-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--nav-hover-shadow);
}

nav a.active {
    background-color: var(--bg-warm-active);
    font-weight: bold;
    border-color: var(--divider-color);
    box-shadow: 0 2px 8px var(--nav-hover-shadow);
}

nav a.main-link {
    font-weight: bold;
    background-color: var(--bg-warm-active);
    border-color: var(--wood-dark);
    color: var(--text-dark);
}

/* Discord 社群連結樣式 */
.discord-link-container {
    margin-top: auto;
    padding-top: 15px;
    margin-bottom: 15px;
}

.discord-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: rgba(114, 137, 218, 0.1);
    border: 1px solid rgba(114, 137, 218, 0.3);
    margin-bottom: 10px;
}

.discord-link:hover {
    background-color: rgba(114, 137, 218, 0.2);
    transform: translateY(-1px);
    border-color: rgba(114, 137, 218, 0.5);
}

.discord-link .icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

.discord-link .text {
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.3;
}

.discord-link:hover::after {
    width: 0;
}

/* 深色主題下的 Discord 連結 */
[data-theme="dark"] .discord-link {
    background-color: rgba(114, 137, 218, 0.15);
    border-color: rgba(114, 137, 218, 0.4);
}

[data-theme="dark"] .discord-link:hover {
    background-color: rgba(114, 137, 218, 0.25);
    border-color: rgba(114, 137, 218, 0.6);
}

/* 社群選擇彈出視窗 */
.community-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-modal.show {
    opacity: 1;
    visibility: visible;
}

.community-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.community-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-modal.show .community-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.community-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-warm);
}

.community-modal-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.community-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.community-modal-close:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.community-options {
    padding: 8px;
}

.community-option {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 16px;
    margin: 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.community-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-warm-hover), var(--bg-warm-active));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.community-option:hover::before {
    opacity: 1;
}

.community-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.community-icon {
    font-size: 2.2rem;
    margin-right: 18px;
    z-index: 1;
    position: relative;
}

.community-info {
    flex: 1;
    z-index: 1;
    position: relative;
}

.community-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.community-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.community-arrow {
    font-size: 1.2rem;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    position: relative;
}

.community-option:hover .community-arrow {
    transform: translateX(4px);
    color: var(--accent-color);
}

.community-option:hover:after {
    width: 0;
}

/* 深色主題下的彈出視窗 */
[data-theme="dark"] .community-modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .community-option::before {
    background: linear-gradient(135deg, var(--bg-warm-hover), var(--bg-warm-active));
}

.global-link-container {
    padding-top: 10px;
}

.global-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 10px;
    background-color: var(--global-link-bg);
    border: 1px dashed var(--divider-color);
}

.global-link:hover {
    background-color: var(--global-link-hover-bg);
    transform: translateY(-2px);
}

.global-link .icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.global-link .text {
    font-weight: 500;
}

.global-link:hover::after {
    width: 0;
}

.content {
    flex: 1;
    padding: 50px;
    margin-left: 280px;
    max-width: 900px;
    background-color: var(--content-bg);
    box-shadow: 0 0 30px var(--content-shadow);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.header-section {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

p.lead {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-color);
    transition: color 0.3s ease;
}

h1 {
    color: var(--text-dark);
    margin: 35px 0 25px;
    font-size: 1.9rem;
    position: relative;
    padding-bottom: 12px;
}

h1:first-child {
    margin-top: 0;
}

h1:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

h2 {
    font-size: 1.6rem;
    margin: 30px 0 20px;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

p {
    margin-bottom: 20px;
    font-size: 1.02rem;
    line-height: 1.8;
}

ul, ol {
    margin-left: 25px;
    margin-bottom: 25px;
}

li {
    margin-bottom: 12px;
    line-height: 1.7;
    position: relative;
}

ul li::marker {
    color: var(--accent-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    font-weight: 500;
}

a:hover {
    text-decoration: none;
    color: #d62b42;
}

a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

a:hover:after {
    width: 100%;
}

strong {
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

em {
    color: var(--text-color);
    font-style: italic;
    transition: color 0.3s ease;
}

/* 步驟容器樣式 */
.steps-container {
    margin: 40px 0;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 25px;
    width: 2px;
    background-color: var(--accent-color);
    opacity: 0.4;
}

.step-item {
    display: flex;
    margin-bottom: 35px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(236, 55, 80, 0.3);
    margin-right: 25px;
    flex-shrink: 0;
    z-index: 2;
}

.step-content {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.step-item:hover .step-content {
    transform: translateX(5px);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.step-content h3 {
    margin-top: 0;
    color: var(--text-dark);
    border-bottom: 2px solid rgba(236, 55, 80, 0.2);
    padding-bottom: 10px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.step-content p {
    margin-bottom: 0;
}

/* 卡片樣式 */
.card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 5px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.card h1 {
    margin-top: 0;
}

.highlight-card {
    background-color: var(--highlight-bg);
    border-left: 4px solid var(--accent-color);
    padding-left: 35px; /* 增加左內邊距，讓文字和邊框有更多間距 */
    position: relative;
}

.highlight-card::before {
    content: '';
    position: absolute;
    left: 4px; /* 緊貼左邊框 */
    top: 0;
    bottom: 0;
    width: 8px; /* 添加一個淺色漸變條 */
    background: linear-gradient(to right, 
        rgba(236, 55, 80, 0.1), 
        transparent);
    border-radius: 0 4px 4px 0;
}

.highlight-card h2 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.highlight-card p {
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* 事件網格 */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.event-card {
    background-color: var(--bg-warm);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.event-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: #000;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
    opacity: 0.8;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    opacity: 0.9;
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.event-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-content h3 {
    margin-top: 0;
    border-bottom: 2px solid rgba(236, 55, 80, 0.3);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.event-content p {
    margin-bottom: 15px;
    flex: 1;
}

.watch-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: auto;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    align-self: flex-start;
}

.watch-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateX(3px);
}

.watch-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.watch-link:hover .watch-icon {
    transform: scale(1.2);
}

.watch-link:hover:after {
    width: 0;
}

/* 影片模態框樣式 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.show {
    opacity: 1;
    visibility: visible;
}

.video-modal.hide {
    opacity: 0;
    visibility: hidden;
}

.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
}

.video-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    border-radius: 18px;
    width: 98vw;
    max-width: 1200px;
    max-height: 96vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1.5px solid var(--border-color);
    z-index: 2100;
    display: flex;
    flex-direction: column;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.video-modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.video-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    flex: 1 1 auto;
}

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

.video-modal-footer {
    padding: 15px 20px;
    background: var(--card-bg);
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline:hover:after {
    width: 0;
}

/* 需求列表樣式 */
.requirements-list {
    list-style: none;
    margin-left: 0;
}

.requirements-list li {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.req-icon {
    font-size: 1.8rem;
    margin-right: 15px;
    background-color: var(--bg-warm-active);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 3px 8px var(--shadow-color);
}

.req-content {
    flex: 1;
}

.req-content strong {
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
    font-size: 1.05rem;
}

/* 呼籲行動部分 */
.cta-section {
    background-color: var(--bg-warm-active);
    padding: 35px;
    border-radius: 15px;
    margin: 40px 0 20px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.cta-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 25px;
}

/* 目錄樣式 */
ul.toc {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px 35px;
    margin-bottom: 35px;
    list-style-type: none;
    box-shadow: 0 3px 12px var(--shadow-color);
    transition: background-color 0.3s ease;
}

ul.toc li {
    margin-bottom: 12px;
}

ul.toc a {
    color: var(--text-dark);
    transition: all 0.3s;
    display: block;
    padding: 5px 0;
    font-weight: 500;
}

ul.toc a:hover {
    color: var(--accent-color);
    text-decoration: none;
    padding-left: 8px;
}

ul.toc a:hover:after {
    width: 0;
}

/* 頁面內錨點的目標偏移，防止被固定頂部導航遮擋 */
h1[id]::before {
    content: '';
    display: block;
    height: 80px;
    margin-top: -80px;
    visibility: hidden;
}

/* 問答樣式 */
p strong {
    color: var(--accent-color);
}

/* 列表樣式 */
ol li {
    padding-left: 5px;
}

ol li::marker {
    color: var(--accent-color);
    font-weight: bold;
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(236, 55, 80, 0.3);
    font-size: 1.05rem;
}

.btn:hover {
    background-color: #d62b42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 55, 80, 0.4);
}

.btn:hover:after {
    width: 0;
}

/* 響應式設計 */
@media (max-width: 1080px) {
    .content {
        margin-left: 280px;
        padding: 40px 30px;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .theme-toggle {
        top: 20px; /* 與漢堡選單對齊 */
        right: 20px; /* 增加右邊距 */
        width: 46px; /* 與漢堡選單大小一致 */
        height: 46px;
        font-size: 1.1rem; /* 稍微增加圖標大小 */
    }
    
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px; /* 增加寬度讓內容更舒適 */
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 3px 0 20px var(--shadow-color);
        padding: 30px; /* 增加內邊距讓更透氣 */
        padding-top: 35px; /* 頂部額外間距 */
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .content {
        margin-left: 0;
        padding: 100px 20px 30px; /* 增加頂部內邊距避免被導航遮擋 */
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        gap: 25px; /* 大幅增加項目間距 */
    }
    
    nav li {
        margin: 0;
        transform: none;
    }
    
    nav li:hover {
        transform: translateX(5px);
    }
    
    nav li.divider {
        margin: 35px 0; /* 大幅增加分隔線間距 */
        height: 1px;
    }
    
    nav a {
        padding: 16px 20px; /* 進一步增加內邊距 */
        font-size: 1.05rem; /* 稍微增加字體大小 */
        line-height: 1.5; /* 增加行高讓文字更透氣 */
        margin-bottom: 5px; /* 添加下邊距 */
    }
    
    .logo {
        margin-bottom: 45px; /* 大幅增加Logo下方間距 */
    }
    
    .logo img {
        max-width: 170px; /* 稍微增加Logo大小 */
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .event-video-container {
        padding-bottom: 50%; /* 調整移動端縮略圖比例 */
    }
    
    .play-button svg {
        width: 56px;
        height: 40px;
    }
    
    .event-content {
        padding: 15px;
    }
    
    .watch-link {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .video-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .video-modal-header {
        padding: 15px;
    }
    
    .video-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .video-modal-footer {
        padding: 12px 15px;
    }
    
    .requirements-list li {
        flex-direction: column;
        text-align: left;
        gap: 15px;
        align-items: flex-start;
    }
    
    .req-icon {
        margin: 0;
        align-self: flex-start;
    }
    
    .steps-container::before {
        display: none;
    }
    
    .step-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
    
    .step-content {
        text-align: left;
    }
    
    .discord-link-container {
        margin-top: 30px; /* 增加上方間距 */
        padding-top: 20px; /* 增加內邊距 */
        margin-bottom: 15px;
    }
    
    .discord-link {
        padding: 14px 18px; /* 增加 Discord 連結的內邊距 */
        font-size: 0.95rem; /* 調整字體大小 */
        margin-bottom: 12px;
    }
    
    .discord-link .text {
        font-size: 0.9rem;
    }
    
    /* 手機版彈出視窗調整 */
    .community-modal-content {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }
    
    .community-modal-header {
        padding: 20px 24px 16px;
    }
    
    .community-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .community-option {
        padding: 18px 20px;
        margin: 6px 0;
    }
    
    .community-icon {
        font-size: 2rem;
        margin-right: 16px;
    }
    
    .community-info h4 {
        font-size: 1rem;
    }
    
    .community-info p {
        font-size: 0.85rem;
    }
    
    .global-link-container {
        padding-top: 10px; /* 減少內邊距，因為上面已有 Discord 連結 */
    }
    
    .global-link {
        padding: 16px 20px; /* 增加全球連結的內邊距 */
        font-size: 1rem; /* 調整字體大小 */
        margin-top: 5px; /* 減少上邊距 */
    }
    
    .header-section h1 {
        font-size: 1.6rem;
    }
    
    .header-section p.lead {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 110px 15px 25px; /* 增加頂部內邊距，確保不被導航遮擋 */
    }
    
    .sidebar {
        width: 300px; /* 在小螢幕上稍微減少寬度 */
        padding: 25px; /* 保持適當內邊距 */
        padding-top: 30px; /* 頂部間距 */
    }
    
    nav ul {
        gap: 22px; /* 小螢幕上稍微減少但仍保持舒適間距 */
    }
    
    nav a {
        padding: 14px 18px; /* 在小螢幕上保持適當內邊距 */
        font-size: 1rem; /* 調整字體大小 */
        line-height: 1.4; /* 調整行高 */
    }
    
    nav li.divider {
        margin: 30px 0; /* 小螢幕上適當的分隔線間距 */
    }
    
    .logo {
        margin-bottom: 40px; /* 小螢幕上Logo下方間距 */
    }
    
    .logo img {
        max-width: 150px; /* 在小螢幕上減少Logo大小 */
    }
    
    .card, .highlight-card, .cta-section {
        padding: 20px;
    }
    
    .step-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
    
    .step-content {
        text-align: left;
    }
    
    .steps-container::before {
        display: none;
    }
    
    .requirements-list li {
        flex-direction: column;
        text-align: left;
        gap: 15px;
        align-items: flex-start;
    }
    
    .req-icon {
        margin: 0;
        align-self: flex-start;
    }
    
    .discord-link-container {
        margin-top: 25px; /* 小螢幕上的間距 */
        padding-top: 15px;
        margin-bottom: 10px;
    }
    
    .discord-link {
        padding: 12px 16px; /* 小螢幕上的內邊距 */
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .discord-link .text {
        font-size: 0.85rem;
    }
}

@media (max-width: 1200px) {
  .video-modal-content {
    max-width: 99vw;
    width: 99vw;
  }
}

@media (max-width: 900px) {
  .video-modal-content {
    max-width: 100vw;
    width: 100vw;
    border-radius: 0;
    left: 0;
    top: 0;
    transform: none;
    height: 100vh;
  }
} 