/* 全域設定 */
:root {
    --primary-color: #1e6fc0;
    --secondary-color: rgb(255, 251, 217);
    --background-color: #FAFAFA;
    --text-color: #333;
    --link-color: #5398dd;
    --link-hover-color: #02386e;
    --comment-box-color: #ffffff;
    --comment-text-color: #000000;
    --comment-border-color: #555;
    --marquee-background: linear-gradient(to right, #FFE4B5, #FFD700);
    --marquee-text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    --font-family: '標楷體', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 共通樣式 */
body {
    font-family: var(--font-family);
    font-size: 16px;
}

/* Header */
.header {
    background-color: var(--primary-color);
    padding: 15px;
    text-align: center;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Marquee */
.marquee-container {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    padding: 10px;
    background: var(--marquee-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

i {
    text-align: center;
    border-bottom: 1px solid #555;
    padding: 5px;
    transition: background-color 0.3s ease;
}

/* 公共樣式 */
.side-container {
    box-sizing: border-box;
    padding: 15px;
    border-radius: 10px;
    background-color: #ffffff;
    float: left;
    font-size: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.side-container a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 24px;
}

/* 鏈接懸停時的動畫效果 */
.side-container:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 添加新動畫 */
.side-container a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--link-hover-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.side-container:hover a::after {
    width: 100%;
    left: 0;
}

/* 左栏样式 */
.left {
    width: 20%;
    box-sizing: border-box;
    padding:  15px 15px 5px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #ffffff;
    float: left;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInLeft 1s ease;
    font-size: 24px;
}

/* 链接悬停时的动画效果 */
.left:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 添加新动画 */
.left a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--link-hover-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.left:hover a::after {
    width: 100%;
    left: 0;
}

.left i {
    font-size: 1.2em;
    margin-right: 5px;
}

/* 左侧链接样式，模仿右侧的样式 */
.left a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 24px;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
}

/* 链接悬停时的动画效果 */
.left a:hover {
    color: var(--link-hover-color);
    transform: scale(1.05);
    background-color: #f5f5f5;
}

/* 添加新动画 */
.left a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--link-hover-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.left a:hover::after {
    width: 100%;
    left: 0;
}

/* 右栏样式 */
.right {
    width: 80%;
    box-sizing: border-box;
    padding: 15px 15px 15px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #ffffff;
    float: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 24px;
}

/* 右栏链接悬停时的动画效果 */
.right:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 右栏链接添加新动画 */
.right a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--link-hover-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.right:hover a::after {
    width: 100%;
    left: 0;
}

.right li {
    border-bottom: 1px solid #ccc;
}

.right li:last-child {
    border-bottom: none;
}

.right li a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 24px;
}

.right li a:hover {
    color: var(--link-hover-color);
    transform: scale(1.05);
}

/* 媒體查詢 */
@media (max-width: 768px) {
    .timer {
        font-size: 1.5rem;
        padding: 8px;
    }

    .left-container,
    .right {
        width: 100%;
        margin-left: 0;
    }

    .right {
        margin-top: 20px;
    }
}

/* 動畫樣式 */
.animated-number {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 5px;
}

.animated-text {
    font-size: 1rem;
    opacity: 0.7;
}

/* 自訂樣式 */
body.dark-mode {
    background-color: #333;
    color: #fff;
}

.dark-mode .header {
    background-color: #111;
}

.dark-mode .marquee-container {
    background-color: #222;
}

.dark-mode .side-container ul {
    background-color: #222;
    border: 1px solid #555;
}

.dark-mode .side-container a {
    color: #5398dd;
}

.dark-mode .side-container a:hover {
    color: #ffffff;
}

.dark-mode .right {
    border: 1px solid #555;
    background-color: #222;
    color: #fff;
}

.dark-mode .right a {
    color: #5398dd;
}

.dark-mode .right a:hover {
    color: #ffffff;
}

.dark-mode .timer {
    background-color: #111;
    color: #fff;
}

.dark-mode .comments {
    border: 1px solid #555;
    background-color: #222;
}

.dark-mode .comment {
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
}

.dark-mode #commentInput {
    background-color: #333;
    color: #fff;
}

.dark-mode #submitBtn {
    background-color: #5398dd;
    color: #fff;
}

.dark-mode #submitBtn:hover {
    background-color: #ffffff;
}

.dark-mode #commentList {
    margin-top: 10px;
    border: 1px solid #555;
    background-color: #333;
}

.dark-mode footer {
    background-color: #111;
}

.dark-mode footer p {
    color: #fff;
}

.dark-mode footer nav a {
    color: #5398dd;
}

.dark-mode footer nav a:hover {
    color: #ffffff;
}

/* 最新消息清單 */
#newsList li {
    font-size: 20px; /* 調整最新消息字體大小 */
    transition: transform 0.3s ease;
}

#newsList li:hover {
    transform: scale(1.01);
}
/* 倒计时样式 */
.timer {
    font-size: 30px; /* 保留原先的設定，你可以根據需要調整 */
    color: #fff;
    background-color: var(--primary-color);
    padding: 10px 0px 10px 0px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    animation: scaleAnimation 0.3s ease;
}

/* 修改以下樣式，統一字體大小 */
.animated-number {
    font-size: 30px; /* 修改此處為希望的字體大小 */
    font-weight: bold;
    margin-right: 5px;
}

.animated-text {
    font-size: 30px; /* 也可以根據需要調整 */
    opacity: 0.7;
}

/* 媒體查詢 */
@media (max-width: 768px) {
    .timer {
        font-size: 1.8rem;
        padding: 12px 16px;
    }
}

@keyframes scaleAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 倒计时容器 */
.timer-container {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* 動畫樣式 */
.animated-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.animated-text {
    font-size: 1rem;
    opacity: 0.7;
}

/* 媒體查詢 */
@media (min-width: 768px) {
    /* 大型裝置的樣式調整 */
    .timer {
        width: 100%; /* 填滿整個寬度 */
    }

    .timer-container {
        flex-direction: row;
    }
}


@keyframes scaleAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.timer.enroll-started {
    color: #333;
    background-color: #f5f5f5;
    box-shadow: none;
}

.timer-container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}

/* 動畫樣式 */
.animated-number {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 5px;
}

.animated-text {
    font-size: 1rem;
    opacity: 0.7;
}

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.timer-container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}

/* 为跑马灯文字添加动画效果 */
.marquee-text {
    animation: marqueeAnimation 10s linear infinite;
}

@keyframes marqueeAnimation {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 调整跑马灯文字样式 */
.marquee-text {
    font-size: 18px;
    color: #FF4500; /* 橙色文字 */
    font-weight: bold;
}

/* 调整跑马灯容器样式 */
.marquee-container {
    background: #FFE4B5; /* 跑马灯容器背景色 */
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
    animation: marqueeAnimation 20s linear infinite;
    font-size: 20px;
    color: #fa2a2a;
    font-weight: bold;
}

@keyframes marqueeAnimation {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.marquee-container {
    background: #FFE4B5;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 倒计时样式 */
.timer {
    font-size: 30px; /* 保留原先的設定，你可以根據需要調整 */
    color: #fff;
    background-color: var(--primary-color);
    padding: 10px 0px 10px 0px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    animation: scaleAnimation 0.3s ease;
}

/* 修改以下樣式，統一字體大小 */
.animated-number {
    font-size: 30px; /* 修改此處為希望的字體大小 */
    font-weight: bold;
    margin-right: 5px;
}

.animated-text {
    font-size: 30px; /* 也可以根據需要調整 */
    opacity: 0.7;
}

/* 媒體查詢 */
@media (max-width: 768px) {
    .timer {
        font-size: 1.8rem;
        padding: 12px 16px;
    }
}

.timer.enroll-started {
    color: #333;
    background-color: #f5f5f5;
    box-shadow: none;
}

@keyframes numberChangeAnimation {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.changing {
    animation: numberChangeAnimation 0.6s ease;
}

@media (max-width: 768px) {
    .timer {
        font-size: 1.8rem;
        padding: 12px 16px;
    }
}

/* 样式优化 */
.comments {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 10px;
    margin-top: 20px;
    background-color: var(--comment-box-color);
    border: 1px solid var(--comment-border-color);
}

.comment {
    margin-top: 10px;
    padding: 15px;
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--comment-text-color);
    border: 1px solid var(--comment-border-color);
}

#commentInput {
    width: 80%;
    padding: 12px;
    margin-bottom: 12px;
    box-sizing: border-box;
    border: 1px solid var(--comment-border-color);
    border-radius: 5px;
}

#submitBtn {
    padding: 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#submitBtn:hover {
    background-color: var(--link-hover-color);
}

#commentList {
    margin-top: 20px;
    border: 1px solid var(--comment-border-color);
    border-radius: 10px;
    background-color: #ffffff;
    padding: 15px;
}

/* 用户体验 */
.comment-success, .comment-error {
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

.comment-success {
    background-color: #8FBC8F;
    color: #fff;
}

.comment-error {
    background-color: #FF6347;
    color: #fff;
}

/* 将输出字体大小调整为更小的值 */
body {
    font-size: 20px;
}

/* 如果需要调整特定区域的字体大小，可以单独指定该区域的样式 */
.comment, #commentInput, #submitBtn, #commentList {
    font-size: 20px;
}

/* 如果需要调整某个特定元素的字体大小，可以通过选择器选中该元素 */
.footer p {
    font-size: 20px;
}

/* 在媒体查询中，可以根据屏幕大小调整字体大小 */
@media (max-width: 768px) {
    body {
        font-size: 20px;
    }
}

#submitBtn {
    padding: 8px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#submitBtn:hover {
    background-color: var(--link-hover-color);
}

#commentList {
    margin-top: 10px;
}

/* 暗黑模式樣式 */
.dark-mode .comments,
.dark-mode .comment {
    border: 1px solid #555;
    background-color: #222;
    color: #fff;
}

.dark-mode #commentInput {
    background-color: #333;
    color: #fff;
}

.dark-mode #submitBtn {
    background-color: #5398dd;
}

.dark-mode #submitBtn:hover {
    background-color: #ffffff;
}

.dark-mode #commentList {
    border: 1px solid #555;
    background-color: #333;
}

/* Footer 樣式 */
footer {
    background-color: #1e6fc0;
    padding: 20px;
    color: #fff;
    text-align: center;
}

/* 分開圖形和文本內容 */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 社交媒體連結樣式 */
.footer-social {
    list-style: none;
    padding: 0;
    display: flex;
}

.footer-social li {
    margin: 0 10px;
}

.footer-info {
    display: flex;
    align-items: center;
}

.footer-info p {
    margin: 5px;
}

/* 適應小螢幕的樣式 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column; /* 在小螢幕上改為垂直排列 */
        align-items: flex-start;
    }

    .footer-social {
        margin-bottom: 10px;
    }

    .footer-info {
        text-align: left;
    }
}

.footer-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-icons img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, border 0.3s ease, filter 0.3s ease;
}

.footer-icons img:hover {
    transform: scale(1.15) rotate(15deg);
    opacity: 0.9;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
    border: 4px solid #5398dd; /* 边框动画 */
    filter: brightness(1.2); /* 亮度增加 */
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    margin-top: 20px; /* 添加顶部外边距，将其与其他元素分隔开 */
}

.footer-links li {
    margin-right: 15px;
}

.footer-links li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.footer-links li a:hover {
    color: var(--link-hover-color);
    border-bottom: 2px solid var(--link-hover-color);
}

/* 在小屏幕上调整布局 */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 0; /* 移除在小屏幕上的顶部外边距 */
    }

    .footer-links li {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

.footer-links li {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 8px 12px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.footer-links li:hover {
    background-color: #fff;
    color: var(--link-hover-color);
    border-color: var(--link-hover-color);
}

.footer-links li:not(:last-child) {
    margin-right: 20px;
}
#fb {
    margin-top: 10px;
    white-space: nowrap;
    display: inline-block;
    background-color: #1877f2; /* Facebook 蓝色 */
    color: #fff;
    padding: 10px; /* 增加水平内边距 */
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold; /* 加粗字体 */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* 正常状态的阴影效果 */
}

#fb:hover {
    transform: scale(1.05); /* 稍微放大 */
    background-color: #0e5a9a;
    color: #fff;
    border: 2px solid #0e5a9a;
}
.footer-info {
    display: flex;
    justify-content: space-between;
}

.footer-info .flex-container {
    display: flex;
    align-items: center; /* 垂直居中 */
}

.footer-info p {
    margin: 5px 10px; /* 調整段落之間的間距 */
}