/* ===== 重置和全域樣式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #F5F6FA 0%, #F5F6FA 100%);
    color: #2D3436;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 公告區 (Announcement) ===== */
.announcement {
    background: linear-gradient(135deg, #0077B6 0%, #005A92 100%);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.2);
}

.announcement-content {
    display: flex;
    white-space: nowrap;
    animation: scrollLeft 20s linear infinite;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

.announcement-content span {
    margin: 0 40px;
    display: inline-block;
    min-width: max-content;
}

/* 跑馬燈動畫 - 平順無限循環 */
@keyframes scrollLeft {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 響應式：手機版公告區調整 */
@media (max-width: 768px) {
    .announcement {
        padding: 10px 0;
    }

    .announcement-content {
        animation: scrollLeft 15s linear infinite;
    }

    .announcement-content span {
        margin: 0 30px;
        font-size: 13px;
    }
}

/* ===== 主容器 ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== 標頭 (Header) ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.header-title {
    font-size: 48px;
    font-weight: 700;
    color: #2D3436;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0077B6 0%, #005A92 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 18px;
    color: #636E72;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 淡入向下動畫 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 即時狀態標籤 (Status Badge) ===== */
.status-badge {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.9s ease-out 0.2s both;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95) 0%, rgba(255, 179, 0, 0.95) 100%);
    border: 2px solid #FFC107;
    border-radius: 50px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    max-width: 100%;
}

.status-badge:hover .status-content {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.status-icon {
    font-size: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.status-text {
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* 脈衝動畫 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* ===== 主要連結區 (Link Buttons) ===== */
.main-content {
    margin-bottom: 50px;
}

.links-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 卡片式按鈕 */
.link-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 28px;
    background: white;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    color: #2D3436;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* 按鈕懸停效果 - 上浮動畫 */
.link-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 119, 182, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #F5F6FA 100%);
}

/* 按鈕內層 icon */
.button-icon {
    font-size: 32px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: transform 0.3s ease;
}

.link-button:hover .button-icon {
    transform: scale(1.2) rotate(-10deg);
}

/* 按鈕內容 */
.button-content {
    flex: 1;
    text-align: left;
}

.button-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2D3436;
}

.button-content p {
    font-size: 14px;
    color: #636E72;
    margin: 0;
}

/* 按鈕箭頭 */
.button-arrow {
    font-size: 24px;
    color: #00B894;
    margin-left: 16px;
    transition: all 0.3s ease;
    font-weight: 700;
}

.link-button:hover .button-arrow {
    transform: translateX(8px);
    color: #009373;
}

/* ===== 作者資訊區 (About Section) ===== */
.about-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 40px 32px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.8s ease-out;
    border-left: 4px solid #00B894;
}

/* 淡入向上動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-avatar {
    flex-shrink: 0;
}

.about-avatar span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0077B6 0%, #005A92 100%);
    border-radius: 50%;
    font-size: 48px;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
    transition: transform 0.3s ease;
}

.about-section:hover .about-avatar span {
    transform: scale(1.1) rotate(10deg);
}

.about-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2D3436;
}

.about-content p {
    font-size: 16px;
    color: #636E72;
    line-height: 1.8;
}

/* ===== 頁腳 ===== */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: #95A5A6;
    font-size: 14px;
    border-top: 1px solid #E8EAED;
    background: rgba(255, 255, 255, 0.5);
}

.footer p {
    margin: 0;
}

/* ===== 響應式設計 (RWD) ===== */
/* 平板設備 */
@media (max-width: 768px) {
    .header-title {
        font-size: 36px;
    }

    .header-subtitle {
        font-size: 16px;
    }

    .status-content {
        padding: 12px 18px;
        font-size: 14px;
        gap: 8px;
    }

    .status-icon {
        font-size: 18px;
    }

    .status-text {
        font-size: 13px;
    }

    .link-button {
        padding: 20px 20px;
    }

    .button-icon {
        font-size: 28px;
        margin-right: 16px;
        min-width: 40px;
    }

    .button-content h3 {
        font-size: 16px;
    }

    .button-content p {
        font-size: 13px;
    }

    .button-arrow {
        font-size: 20px;
    }

    .about-section {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
        gap: 20px;
    }

    .about-avatar span {
        width: 70px;
        height: 70px;
        font-size: 40px;
    }

    .about-content h2 {
        font-size: 20px;
    }

    .about-content p {
        font-size: 15px;
    }

    .container {
        padding: 30px 16px;
    }
}

/* 手機設備 */
@media (max-width: 480px) {
    .header-title {
        font-size: 28px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .header {
        margin-bottom: 40px;
    }

    .status-content {
        padding: 10px 16px;
        font-size: 12px;
        gap: 8px;
    }

    .status-icon {
        font-size: 16px;
    }

    .status-text {
        font-size: 12px;
    }

    .link-button {
        padding: 18px 16px;
    }

    .button-icon {
        font-size: 24px;
        margin-right: 12px;
        min-width: 36px;
    }

    .button-content h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .button-content p {
        font-size: 12px;
    }

    .button-arrow {
        font-size: 18px;
        margin-left: 8px;
    }

    .about-section {
        padding: 24px 16px;
    }

    .about-avatar span {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .about-content h2 {
        font-size: 18px;
    }

    .about-content p {
        font-size: 14px;
    }

    .container {
        padding: 20px 12px;
    }

    .links-section {
        gap: 12px;
    }
}

/* ===== 額外細節和過度效果 ===== */

/* 焦點狀態 - 鍵盤導航 */
.link-button:focus {
    outline: 2px solid #0077B6;
    outline-offset: 2px;
}

/* 按下按鈕效果 */
.link-button:active {
    transform: translateY(-4px);
}

/* 無障礙設計 - 禁用動畫的用戶 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 (可選) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #ecf0f1;
    }

    .status-content {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.85) 0%, rgba(255, 179, 0, 0.85) 100%);
        border-color: #FFD54F;
        color: #333;
    }

    .link-button {
        background: #2c2c2c;
        color: #ecf0f1;
    }

    .link-button:hover {
        background: linear-gradient(135deg, #353535 0%, #2c2c2c 100%);
    }

    .button-content h3 {
        color: #ecf0f1;
    }

    .button-content p {
        color: #bdc3c7;
    }

    .header-title {
        color: #0077B6;
        -webkit-text-fill-color: unset;
        background: unset;
        -webkit-background-clip: unset;
        background-clip: unset;
    }

    .about-section {
        background: #2c2c2c;
        color: #ecf0f1;
    }

    .about-content h2 {
        color: #ecf0f1;
    }

    .about-content p {
        color: #bdc3c7;
    }

    .footer {
        color: #95a5a6;
        border-top-color: #444;
        background: rgba(0, 0, 0, 0.3);
    }
}