/* Global Reset & Brutalist Fonts */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Impact', 'Arial Black', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        /* Smooth Scroll */
        html {
            scroll-behavior: smooth;
        }

        body {
            background-color: #0c0c0c;
            color: #ffffff;
            line-height: 1.5;
            overflow-x: hidden;
        }

        /* Fallback to clean sans-serif for body copy, tags, and navigation */
        p, .time, .sub-title, .tag, .team-no, .team-grp, a, .menu-links a, .stage-tag, li, .scroll-tip, .refresh-notice-bar span {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        /* Top Navigation Bar */
        nav {
            background-color: #0c0c0c;
            border-bottom: 1px solid #1a1a1a;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-box {
            background-color: #ffffff;
            color: #000000;
            padding: 6px 10px;
            font-size: 1.2rem;
            font-weight: bold;
            border-radius: 4px;
        }

        .brand-text h3 {
            font-size: 1rem;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .brand-text p {
            font-size: 0.75rem;
            color: #666666;
            text-transform: uppercase;
        }

        /* Hamburger Menu Button */
        .menu-btn {
            background: none;
            border: 1px solid #333333;
            padding: 10px 12px;
            border-radius: 6px;
            cursor: pointer;
            z-index: 102;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .menu-btn span {
            display: block;
            width: 20px;
            height: 2px;
            background-color: white;
            transition: all 0.3s ease;
        }

        /* Sidebar Navigation */
        .sidebar {
            position: fixed;
            top: 0;
            right: -300px;
            width: 300px;
            height: 100vh;
            background-color: #121212;
            border-left: 1px solid #222222;
            box-shadow: -10px 0 30px rgba(0,0,0,0.5);
            z-index: 101;
            padding: 100px 40px;
            transition: right 0.3s ease-in-out;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .sidebar.active { right: 0; }

        .sidebar a {
            color: #ffffff;
            text-decoration: none;
            font-size: 1.2rem;
            font-weight: 500;
            transition: color 0.2s;
        }

        .sidebar a:hover { color: #999999; }

        /* 選單內的關閉 X 按鈕樣式 */
        .close-btn {
            position: absolute;
            top: 20px;
            right: 30px;
            background: none;
            border: none;
            color: #ffffff;
            font-size: 2rem;
            cursor: pointer;
            line-height: 1;
            font-family: -apple-system, sans-serif;
            transition: color 0.2s;
        }
        
        .close-btn:hover {
            color: #999999;
        }

        .menu-btn.open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
        .menu-btn.open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

        /* Generic Section Layout */
        .container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 60px 20px;
            scroll-margin-top: 80px; 
        }

        .section-tag {
            font-family: -apple-system, sans-serif;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 3px;
            color: #00d2ff;
            margin-bottom: 15px;
            display: block;
        }

        .section-title {
            font-size: 3.5rem;
            text-transform: uppercase;
            line-height: 0.95;
            margin-bottom: 15px;
            letter-spacing: 0.5px;
        }

        .section-desc {
            font-size: 1.1rem;
            color: #999999;
            max-width: 750px;
            margin-bottom: 30px;
        }

        /* --- 1. HERO SECTION (已更新背景圖) --- */
        header.hero-banner {
            background: linear-gradient(rgba(12,12,12,0.6), #0c0c0c), url('https://drive.google.com/thumbnail?id=19bNEcZAq7NuWcM-deMLqYiyL6XVsdMeC&sz=w1600') no-repeat center/cover;
            min-height: 75vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
            padding: 0 40px;
        }

        .hero-header-box {
    display: flex;
    align-items: center;
    gap: 15px; /* 手機版建議將 gap 從 30px 縮小到 15px */
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box; /* 關鍵：讓 padding 包含在 100% 寬度內 */
    padding: 0 15px;      /* 確保內容不會緊貼螢幕邊緣 */
    overflow: hidden;     /* 防止任何內容溢出 */
}

/* 針對標題文字的強制換行處理 */
.hero-header-box h2, .hero-header-box h1 {
    word-break: break-word; /* 讓長單字在手機上自動斷行 */
    overflow-wrap: break-word;
    flex: 1;              /* 讓標題自動縮排，不擠壓 Logo */
    min-width: 0;         /* 關鍵：防止 flex 項目撐開容器 */
}

        .header-logo {
            height: 200px;
            width: auto;
            object-fit: contain;
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        /* --- 手機版 Logo 調整 --- */
        @media (max-width: 768px) {
    .header-logo {
        height: 160px !important; /* 將高度縮小至適合手機的大小 */
        width: auto;
    }
}}

        .hero-tag {
            border: 1px solid #444444;
            padding: 6px 16px;
            border-radius: 99px;
            font-size: 0.75rem;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-bottom: 15px;
            color: #cccccc;
            display: inline-block;
        }

        .hero-title {
            font-size: 3.8rem;
            line-height: 0.95;
            text-transform: uppercase;
            color:#00ffa2;
        }
        .highlight-text {
         color: #009dff;
          text-shadow: 0 0 10px rgba(0, 13, 255, 0.6); /* 橘色霓虹發光 */
            }
        .hero-desc {
            font-size: 1.1rem;
            color: #999999;
            max-width: 650px;
            margin-bottom: 35px;
        }

        .btn-group {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .btn-white, .btn-outline, .btn-register {
            text-decoration: none;
            display: inline-block;
            text-align: center;
            font-weight: bold;
            transition: all 0.2s ease;
        }

        .btn-white { background-color: #ffffff; color: #000000; padding: 14px 28px; border-radius: 6px; }
        .btn-white:hover { background-color: #e6e6e6; }

        .btn-outline { background: none; color: #ffffff; border: 1px solid #444444; padding: 14px 28px; border-radius: 6px; }
        .btn-outline:hover { background-color: rgba(255,255,255,0.05); border-color: #ffffff; }

        .btn-register { background-color: #ffffff; color: #000000; padding: 14px 28px; border-radius: 6px; }
        .btn-register:hover { background-color: #2875e0; }

        /* ⚡ Live Notification Bar */
        /* 定義呼吸動畫 */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 210, 255, 0.1);
        border-color: rgba(0, 210, 255, 0.5);
    }
    50% {
        box-shadow: 0 7px 40px rgba(0, 210, 255, 0.4);
        border-color: rgb(255, 0, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 210, 255, 0.1);
        border-color: rgba(0, 210, 255, 0.5);
    }
}

/* 更新原有的 .refresh-notice-bar 類別 */
.refresh-notice-bar {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid #00d2ff;
    color: #e0f7fc;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    /* 加入這行來啟用動畫 */
    animation: pulse 2s infinite ease-in-out; 
}

        .refresh-notice-bar strong {
            color: #0c0c0c;
            background-color: #00d2ff;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            text-transform: uppercase;
            font-weight: 900;
            letter-spacing: 0.5px;
        }

        /* --- 2. TIMELINE SCHEDULE --- */
        .day-card {
            background-color: #121212;
            border: 1px solid #222222;
            border-radius: 8px;
            padding: 30px;
            margin-bottom: 30px;
        }

        .day-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            border-bottom: 1px solid #222222;
            padding-bottom: 20px;
            margin-bottom: 10px;
        }

        .day-header h3 { font-size: 2.2rem; text-transform: uppercase; }
        .day-header p { color: #666666; font-size: 0.95rem; }

        .group-tag {
            background-color: #1a1a1a;
            border: 1px solid #333333;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: bold;
            letter-spacing: 1px;
        }

        .schedule-row {
            display: flex;
            flex-direction: column;
            padding: 20px 0;
            border-bottom: 1px solid #1a1a1a;
        }
        @media (min-width: 768px) {
            .schedule-row { flex-direction: row; align-items: center; justify-content: space-between; }
        }
        .schedule-row:last-child { border-bottom: none; }

        .row-time { width: 140px; font-size: 1.1rem; font-weight: bold; color: #ffffff; margin-bottom: 5px; }
        @media (min-width: 768px) { .row-time { margin-bottom: 0; } }

        .row-body { flex: 1; }
        .row-body h4 { font-family: -apple-system, sans-serif; font-size: 1.15rem; margin-bottom: 5px; color: #ffffff; }
        .row-body p { color: #888888; font-size: 0.95rem; }

        .stage-tag {
            font-size: 0.75rem;
            padding: 4px 12px;
            background-color: #1a1a1a;
            color: #ffffff;
            border: 1px solid #333333;
            border-radius: 9999px;
            margin-top: 10px;
            align-self: flex-start;
        }
        @media (min-width: 768px) { .stage-tag { margin-top: 0; align-self: center; } }

        /* Scroll Tip */
        .scroll-tip { font-size: 13px; color: #666666; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

        /* 📊 Google Sheets Wrapper & 0.48 Scale Optimization */
        .excel-outer-wrapper {
            width: 100%;
            border-radius: 12px;
            border: 1px solid #222222;
            overflow: hidden;
            box-shadow: 0 4px 25px rgba(0,0,0,0.5);
            margin-bottom: 45px;
            background-color: #ffffff;
        }
        
        .h-small { height: 280px; }  
        .h-large { height: 480px; }  

        .excel-inner-scaler { 
            width: 208.3%;      
            height: 100%;       
            transform: scale(0.48); 
            transform-origin: 0 0; 
            -webkit-overflow-scrolling: touch;
        }
        
        .h-small .excel-inner-scaler { height: 583px; }  
        .h-large .excel-inner-scaler { height: 1000px; } 
        .excel-inner-scaler iframe { width: 100%; height: 100%; border: none; }

        /* --- 3. COMPETING TEAMS --- */
        .teams-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }

        .team-card {
            background-color: #121212;
            border: 1px solid #1a1a1a;
            border-radius: 8px;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .team-left { display: flex; align-items: center; gap: 15px; }
        .flag-placeholder { width: 50px; height: 35px; background-color: #222222; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
        .team-info h4 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .team-info p { font-size: 0.85rem; color: #666666; }
        .team-right { text-align: right; }
        .team-no { font-size: 1.1rem; font-weight: bold; color: #ffffff; }
        .team-grp { font-size: 0.75rem; color: #00d2ff; font-weight: bold; }

        /* --- 4. VENUE --- */
        .venue-img-box {
            width: 100%;
            height: 700px;
            background: url('https://drive.google.com/thumbnail?id=1KDSwPZxiHlckAytN-hhRCuDLdhRzyNPd&sz=w1600') no-repeat center/cover;
            border-radius: 8px;
            border: 1px solid #222222;
        }

    /* --- 5. PARTNERS & SPONSORS --- */
    /* --- 1. 修正上方 CO-ORGANIZER 大圖超出框線的問題 --- */
    .sponsor-title-box {
        background-color: #f7f3f3dd;
        border: 2px solid #36aac7;
        border-radius: 8px;
        height: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px; /* 增加內部留白，防止圖片貼齊邊框 */
        margin-bottom: 20px;
        overflow: hidden; /* 超出部分隱藏 */
        animation: breathingGlow 3s ease-in-out infinite;
    }

    /* 讓大圖嚴格依照外框縮放，不變形也不溢出 */
    .sponsor-title-box img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* --- 2. 修正下方滑動 Sponsor 欄位排版與圖片大小 --- */
    .auto-scroll-gallery {
        width: 100%;
        overflow: hidden;
        position: relative;
        padding: 15px 0;
        white-space: nowrap;
    }

    .scroll-track {
        display: flex;
        gap: 20px;
        width: max-content;
        animation: scrollLeft 25s linear infinite;
    }

    .auto-scroll-gallery:hover .scroll-track {
        animation-play-state: paused;
    }

    .gallery-item {
        flex: 0 0 130px; /* 固定每個卡片的寬度，避免被擠壓 */
        width: 130px;
        height: 120px;
        background: #ffffff;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        box-sizing: border-box;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* 確保 logo 完整呈現，絕不裁切 */
        opacity: 0;
        animation: fadeIn 0.5s ease forwards;
    }

    /* 動畫特效定義 */
    @keyframes fadeIn {
        to { opacity: 1; }
    }

    @keyframes scrollLeft {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-50% - 10px)); }
    }

    @keyframes breathingGlow {
        0% {
            box-shadow: 0 0 5px rgba(54, 170, 199, 0.3), inset 0 0 5px rgba(54, 170, 199, 0.1);
        }
        50% {
            box-shadow: 0 0 25px rgba(54, 170, 199, 0.8), inset 0 0 10px rgba(54, 170, 199, 0.3);
            border-color: #5bc8e3;
        }
        100% {
            box-shadow: 0 0 5px rgba(54, 170, 199, 0.3), inset 0 0 5px rgba(54, 170, 199, 0.1);
            border-color: #36aac7;
        }
    }

        .partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        .partner-box { background-color: #121212; border: 1px solid #1a1a1a; border-radius: 8px; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 2rem; letter-spacing: 1px; }

        /* --- 6. REGULATIONS & PDF --- */
        .rules-layout { display: flex; flex-direction: column; gap: 30px; }
        @media (min-width: 768px) {
            .rules-layout { flex-direction: row; }
            .rules-content { flex: 1; }
            .rules-img-box { width: 45%; }
        }

        .rules-content ul { padding-left: 20px; color: #999999; font-size: 1rem; }
        .rules-content li { margin-bottom: 12px; }
        .rules-content strong { color: #ffffff; }

        .pdf-container {
            width: 100%;
            height: 600px;
            background-color: #121212;
            border-radius: 12px;
            border: 1px solid #222222;
            overflow: hidden;
            box-shadow: 0 4px 25px rgba(0,0,0,0.5);
            margin-top: 30px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .pdf-container iframe { width: 100%; height: 100%; border: none; }
        
        /* Loading 提示樣式 */
        .pdf-placeholder-text {
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
            color: #555555;
            font-size: 14px;
        }

        .download-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: #ffffff;
            color: #000000;
            text-decoration: none;
            padding: 14px 28px;
            border-radius: 6px;
            font-weight: bold;
            font-size: 15px;
            transition: all 0.2s;
        }
        .download-btn:hover { background-color: #e6e6e6; }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            header.hero-banner { padding: 40px 20px; min-height: auto; }
            .hero-header-box { flex-direction: column; align-items: flex-start; gap: 15px; }
            .header-logo { height: 110px; }
            .hero-title { font-size: 2.3rem; }
            .section-title { font-size: 2.5rem; }
            .partner-grid { grid-template-columns: 1fr; }
        }

        /* Venue Info Layout */
        .venue-info-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            margin-top: 30px;
        }
        @media (min-width: 768px) {
            .venue-info-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .venue-full-width {
                grid-column: span 2;
            }
        }

        .venue-info-card {
            background-color: #121212;
            border: 1px solid #1a1a1a;
            border-radius: 8px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .venue-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .venue-icon {
            font-size: 1.2rem;
            color: #ffffff;
        }

        .venue-info-card h4 {
            font-size: 1.2rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #ffffff;
        }

        .venue-info-card p {
            font-size: 0.95rem;
            color: #888888;
            line-height: 1.4;
        }
        /* 將這段放在你原本 <style> 的最下方 */
@media (max-width: 768px) {
    .header-logo {
        height: 200px !important;  /* 數字調大到 150px 看看有沒有反應 */
        width: auto !important;
        display: block !important;
        margin: 0 auto !important; /* 如果要置中 */
    }
}.info-container {
    background-color: rgba(255, 255, 255, 0.266); /* 黑色背景，0.6 透明度，數值越小越透明 */
    padding: 15px;              /* 文字與邊框的內距 */
    border-radius: 8px;        /* 圓角邊框，讓視覺更柔和 */
    backdrop-filter: blur(5px); /* 可選：加入模糊效果，更有科技質感 */
    display: inline-block;     /* 讓背景框寬度只包住文字 */
    margin-bottom: 20px;
    border: 1px solid rgb(32, 163, 175); /* 加入極細的白色邊框，增加層次 */
}

.info-container p {
    margin: 5px 0;             /* 調整每一行文字的上下距離 */
    color: #ffffff;            /* 文字白色，保證在深色背景上清晰 */
    font-size: 0.95rem;
}
    .info-container {
        /* 設定邊框的厚度 */
        border: 4px solid transparent;
        /* 使用漸層創造流水線效果 */
        background-image: linear-gradient(#121212, #121212), linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet, red);
        background-origin: border-box;
        background-clip: padding-box, border-box;
        /* 設定跑馬燈的速度 */
        animation: flow-border 3s linear infinite;
        border-radius: 10px;
        padding: 20px;
    }

    @keyframes flow-border {
        0% { background-position: 0 0, 0 0; }
        100% { background-position: 0 0, 400px 0; }
    }
.team-card {
    display: flex;
    align-items: center;
    gap: 15px; /* 👈 新增這行！讓國旗與文字之間有固定間距 */
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    cursor: pointer; /* 順便確保滑鼠移上去會變手指 */
}

    /* 關鍵：強制限制國旗大小，防止圖片爆開 */
.team-flag {
    width: 60px;
    height: 40px;             /* 調整為標準 3:2 國旗比例 */
    object-fit: contain;      /* 👈 改成 contain！完整顯示整張國旗，絕不裁切 */
    background: rgba(255, 255, 255, 0.05); /* 給比較窄的旗幟加上極淡底色，保持視覺平衡 */
    border-radius: 4px;
    flex-shrink: 0;
}

    .team-info {
        flex-grow: 1;
    }

    /* 這是針對你的時間表卡片的主體設定 */
    .day-card {
        background: #121212; /* 卡片底色 */
        border-radius: 15px;
        padding: 30px;
        
        /* --- 關鍵的發光邊框設定 --- */
        /* 1. 先定義一個細細的深色邊框作為基底 */
        border: 1px solid #333;
        
        /* 2. 製作發光效果 (box-shadow) */
        /* 語法: X位移 Y位移 擴散半徑 顏色 */
        box-shadow: 
            /* 外層光暈：這裡使用稍微偏藍或偏紅的深色，強度較弱 */
            0 0 10px rgba(0, 123, 255, 0.3), 
            
            /* 內層光暈：製造邊框向內發光的效果，讓邊緣看起來銳利 */
            inset 0 0 5px rgba(0, 123, 255, 0.5);

        /* 加上過場效果，如果滑鼠移過去有變化會更平滑 */
        transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    }

    /* (選配) 滑鼠移上去時加強發光效果，更有互動感 */
    .day-card:hover {
        border-color: rgba(0, 255, 119, 0.8);
        box-shadow: 
            0 0 20px rgba(0, 123, 255, 0.6), 
            inset 0 0 10px rgba(0, 123, 255, 0.7);
    }

    /* 讓裡面的文字顏色亮一點，對比發光邊框 */
    .day-card h3, .day-card h4, .day-card p {
        color: #eee;
    }

    /* 手機專用的常態發光邊框 */
    .day-card {
        background: #121212;
        border-radius: 15px;
        padding: 25px;
        margin-bottom: 20px;
        
        /* 設定藍色霓虹發光效果（手機上直接顯示，不需要 hover） */
        border: 1px solid rgba(0, 123, 255, 0.6);
        box-shadow: 
            0 0 12px rgba(0, 123, 255, 0.35), 
            inset 0 0 6px rgba(0, 123, 255, 0.3);
            
        /* 強制啟用硬體加速，確保手機滑動時完全不卡頓 */
        will-change: transform;
    }

    /* 讓整個導航列左右分散對齊 */
    .site-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        background-color: #0b0b0b;
        border-bottom: 1px solid #222;
    }

    /* 導航列右側容器設定 */
    .nav-right {
        display: flex;
        align-items: center; /* 確保所有元素垂直置中 */
        gap: 15px; /* 增加間距 */
    }

    /* 通用 Logo 基礎設定 */
    .nav-mini-logo {
        object-fit: contain;
        vertical-align: middle;
        display: block;
    }

    /* —— 重點修改區域 —— */
    /* 第一張圖 (FAI)：設定較高的高度 */
    .fai-logo {
        height: 55px; /* 設定為較大的數值 (例如 55px) */
        width: auto;
    }

    /* 第二張圖 (AFA)：設定較小的高度 (原圖尺寸) */
    .afa-logo {
        height: 85px; /* 設定為較小的數值 (例如 35px，尊重原圖設計) */
        width: auto;
    }
    /* —— 結束修改 —— */

    /* 漢堡按鈕設定 (高度取中間值) */
    .menu-btn {
        height: 45px; /* 高度設定為 45px，平衡兩個 Logo */
        width: 45px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background: white;
        margin: 4px 0;
    }

    /* 針對手機版導航列的完美平衡設定 */
    @media screen and (max-width: 768px) {
        .site-nav {
            padding: 6px 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* 左側品牌區塊 */
        .site-nav .nav-brand {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* 允許中間文字在手機上自動換行，不需要死守一行，這樣旁邊就能放大 Logo */
        .site-nav .brand-text h3 {
            font-size: 10px !important;
            margin: 0;
            line-height: 1.1;
            white-space: normal; /* 允許換行 */
        }

        .site-nav .brand-text p {
            font-size: 8px !important;
            margin: 0;
            line-height: 1.1;
            white-space: normal; /* 允許換行 */
        }

        .site-nav .logo-box {
            font-size: 11px;
            padding: 3px 6px;
        }

        /* —— 放大右側 Logo 與按鈕 —— */
        .nav-right {
            gap: 8px;
            align-items: center;
        }
        
        /* 恢復 FAI Logo 的清晰大小 */
        .fai-logo {
            height: 42px !important;
            width: auto;
        }

        /* 恢復 AFA Logo 的清晰大小（不再過小） */
        .afa-logo {
            height: 70px !important;
            width: auto;
        }

        /* 漢堡按鈕大小 */
        .menu-btn {
            height: 38px !important;
            width: 38px !important;
        }
    }

    /* 外框容器：隱藏超出範圍的內容，並可加上左右漸層遮罩更美觀 */
    .auto-scroll-gallery {
        width: 100%;
        overflow: hidden;
        position: relative;
        padding: 15px 0;
        white-space: nowrap;
    }

    /* 滾動軌道：採用 CSS Animation 自動向左移動 */
    .scroll-track {
        display: flex;
        gap: 20px; /* 圖片之間的間距 */
        width: max-content;
        animation: scrollLeft 25s linear infinite; /* 25s 代表滾動完一輪的時間，數字越小速度越快 */
    }

    /* 當滑鼠移到圖片欄位上時，暫停自動滾動，方便使用者觀看 */
    .auto-scroll-gallery:hover .scroll-track {
        animation-play-state: paused;
    }

    /* 單個圖片卡片外框 */
    .gallery-item {
        flex: 0 0 auto;
        width: 180px;  /* 卡片寬度 */
        height: 140px; /* 卡片高度 */
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    /* 圖片樣式 */
    .gallery-item img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* 定義向左循環滾動的動畫核心 */
    @keyframes scrollLeft {
        0% {
            transform: translateX(0);
        }
        100% {
            /* 剛好滾動完「前半段原始圖片」的總長度與間距，達成完美無縫循環 */
            transform: translateX(calc(-50% - 10px));
        }
    }

    /* 讓隊伍卡片滑過去時變成手指，提示可點擊 */
    .team-card {
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .team-card:hover {
        transform: translateY(-4px);
    }

    /* 彈跳視窗遮罩背景 */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    /* 彈跳視窗本體 */
    .modal-content {
        background: #1a1a1a;
        border: 1px solid #36aac7;
        border-radius: 12px;
        padding: 30px;
        width: 90%;
        max-width: 400px;
        color: #fff;
        text-align: center;
        position: relative;
        box-shadow: 0 10px 25px rgba(54, 170, 199, 0.3);
    }

    /* 關閉按鈕 */
    .close-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 24px;
        cursor: pointer;
        color: #aaa;
    }
    .close-btn:hover {
        color: #fff;
    }

    /* 彈窗內的國旗 */
    .modal-flag {
        width: 80px;
        height: auto;
        margin-bottom: 15px;
        border-radius: 4px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }

    /* 成員名單樣式 */
    .team-members-list {
        margin-top: 20px;
        text-align: left;
    }
    .team-members-list h4 {
        color: #36aac7;
        font-size: 14px;
        margin-bottom: 5px;
        border-bottom: 1px solid #333;
        padding-bottom: 3px;
    }
    .team-members-list p, .team-members-list ul {
        font-size: 14px;
        color: #ddd;
        margin-bottom: 15px;
    }
    .team-members-list ul {
        padding-left: 20px;
    }

/* ==========================================
   🏆 Group Stage (分組表) 完整科技感 CSS
   嚴格隔離作用域，防止影響其他區域
   ========================================== */

/* 橫向並排外層 Wrapper (限制寬度以呈現 2x2 排列) */
#group-stage-section .tech-groups-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* 單組卡片 (一列 2 個 Group) */
#group-stage-section .tech-group-card {
  flex: 0 0 calc(50% - 13px);
  box-sizing: border-box;
  background: rgba(18, 22, 36, 0.85);
  border-radius: 16px;
  padding: 20px 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 卡片 Hover 懸停效果 */
#group-stage-section .tech-group-card:hover {
  transform: translateY(-5px);
}

/* 分組標題通用樣式 */
#group-stage-section .group-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 各組專屬配色標題 (A: 霓虹綠 / B: 霓虹藍 / C: 霓虹紫 / D: 霓虹粉) */
#group-stage-section .title-a { color: #00ff88; text-shadow: 0 0 10px rgba(0, 255, 136, 0.5); }
#group-stage-section .title-b { color: #00f0ff; text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
#group-stage-section .title-c { color: #b14eff; text-shadow: 0 0 10px rgba(177, 78, 255, 0.5); }
#group-stage-section .title-d { color: #ff007f; text-shadow: 0 0 10px rgba(255, 0, 127, 0.5); }

/* 卡片外框霓虹邊框 */
#group-stage-section .group-a-card { border: 1px solid rgba(0, 255, 136, 0.3); }
#group-stage-section .group-b-card { border: 1px solid rgba(0, 240, 255, 0.3); }
#group-stage-section .group-c-card { border: 1px solid rgba(177, 78, 255, 0.3); }
#group-stage-section .group-d-card { border: 1px solid rgba(255, 0, 127, 0.3); }

/* 隊伍項目列表 */
#group-stage-section .group-team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 隊伍列單元 */
#group-stage-section .group-team-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.2s;
}

#group-stage-section .group-team-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 國旗圖示 */
#group-stage-section .team-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  margin: 0 12px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

/* 隊伍名稱文字 */
#group-stage-section .tech-team-name {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 標籤 Badge 通用樣式 */
#group-stage-section .tech-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 4px;
}

/* 各組專屬 Badge 樣式 */
#group-stage-section .badge-a { background: rgba(0, 255, 136, 0.15); color: #00ff88; border: 1px solid #00ff88; box-shadow: 0 0 6px rgba(0, 255, 136, 0.3); }
#group-stage-section .badge-b { background: rgba(0, 240, 255, 0.2); color: #00f0ff; border: 1px solid #00f0ff; }
#group-stage-section .badge-c { background: rgba(177, 78, 255, 0.2); color: #b14eff; border: 1px solid #b14eff; }
#group-stage-section .badge-d { background: rgba(255, 0, 127, 0.2); color: #ff007f; border: 1px solid #ff007f; }

/* 手機版響應式 (螢幕小於 640px 時自動變單列，防止擠壓) */
@media (max-width: 640px) {
  #group-stage-section .tech-group-card {
    flex: 0 0 100%;
  }
}

/* 🏆 Leaderboard Section Styles */
.leaderboard-section {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  box-sizing: border-box;
}

.leaderboard-section .section-title {
  font-size: 22px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .leaderboard-grid { grid-template-columns: 1fr; }
}

.table-card {
  background: rgba(12, 16, 28, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.card-header {
  font-size: 15px;
  font-weight: 800;
  color: #ffea00;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  border-left: 4px solid #ffea00;
  padding-left: 10px;
}

.table-responsive { overflow-x: auto; }

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cyber-table th {
  background: rgba(0, 240, 255, 0.08);
  color: #00f0ff;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 700;
}

.cyber-table td {
  padding: 9px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #dddddd;
  white-space: nowrap;
  font-size: 13px;
}

.cyber-table tr.group-divider td {
  border-bottom: 2px solid rgba(0, 240, 255, 0.3);
  padding: 4px;
}

.highlight-pts {
  color: #ffea00 !important;
  font-weight: bold;
}

.rank-group-header td {
  background: rgba(0, 240, 255, 0.08);
  color: #00f0ff;
  font-weight: 800;
  font-size: 12px;
  text-align: left;
  padding: 6px 12px !important;
  letter-spacing: 1px;
  border-top: 1px solid rgba(0, 240, 255, 0.2);
}

.rank-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-1st {
  background: rgba(255, 234, 0, 0.15);
  color: #ffea00;
  border: 1px solid rgba(255, 234, 0, 0.5);
}

.badge-2nd {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.5);
}

.badge-normal {
  background: rgba(255, 255, 255, 0.05);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.loading-text { color: #00f0ff; padding: 20px !important; }
.error-text { color: #ff0055; font-style: italic; padding: 20px !important; }

/* =========================================================
   MULTI-PAGE NAVIGATION & DIRECTORY HUB STYLES
   ========================================================= */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.12);
}

.sidebar a.active {
    color: #00d2ff !important;
    border-left: 3px solid #00d2ff;
    padding-left: 12px;
}

@media (max-width: 960px) {
    .desktop-nav {
        display: none;
    }
}

/* Directory Hub Cards on Home Page */
.directory-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.dir-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 26px 24px;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.dir-card:hover {
    transform: translateY(-4px);
    border-color: #00d2ff;
    box-shadow: 0 10px 28px rgba(0, 210, 255, 0.12);
}

.dir-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dir-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.12);
    padding: 4px 10px;
    border-radius: 4px;
}

.dir-num {
    font-size: 0.85rem;
    color: #555555;
    font-weight: 700;
}

.dir-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.dir-card p {
    font-size: 0.92rem;
    color: #aaaaaa;
    line-height: 1.55;
    margin-bottom: 18px;
}

.dir-cta {
    font-size: 0.88rem;
    font-weight: 700;
    color: #00d2ff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Subpage Header Spacing & Badge Spacing Refinement */
.subpage-spacer {
    padding-top: 40px !important;
}

.tech-badge {
    margin-right: 10px;
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-info p {
    margin-top: 4px;
}

/* Additional Macao Championship Sections */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 40px;
}

.info-box-card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.25s ease;
}

.info-box-card:hover {
    border-color: #00d2ff;
}

.info-box-card h4 {
    color: #00d2ff;
    font-size: 1.05rem;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.info-box-card p, .info-box-card li {
    color: #cccccc;
    font-size: 0.92rem;
    line-height: 1.6;
}

.info-box-card ul {
    padding-left: 18px;
    margin-top: 8px;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: #141414;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prize-table th, .prize-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #222222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
}

.prize-table th {
    background: #1c1c1c;
    color: #00d2ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.82rem;
}

.prize-table td {
    color: #eeeeee;
}

.officials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
    margin-bottom: 36px;
}

.official-card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
}

.official-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #36aac7;
    margin-bottom: 6px;
    font-weight: 700;
}

.official-name {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.official-org {
    font-size: 0.85rem;
    color: #999999;
}

.doc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    margin-top: 24px;
    margin-bottom: 40px;
}

.doc-card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.doc-card h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.doc-card p {
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-bottom: 16px;
    line-height: 1.5;
}

.badge-slot {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    color: #cccccc;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
}


/* =========================================================
   BILINGUAL EN / 繁中 SWITCHER & RESPONSIVE TOP NAV
   ========================================================= */
.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.45);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.lang-toggle-btn:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

.lang-toggle-btn .lang-opt {
    color: #888888;
    padding: 2px 5px;
    border-radius: 999px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lang-toggle-btn .lang-opt.active {
    color: #0b0b0b;
    background-color: #00d2ff;
}

.lang-toggle-btn .lang-sep {
    color: #444444;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Keep navigation links accessible across all screen widths since hamburger button is removed */
@media (max-width: 960px) {
    .site-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .desktop-nav {
        display: flex !important;
        order: 3;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-top: 8px;
        border-top: 1px solid #1e1e1e;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .desktop-nav::-webkit-scrollbar {
        display: none;
    }

    .desktop-nav a {
        font-size: 0.82rem;
        padding: 6px 10px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .lang-toggle-btn {
        padding: 5px 9px;
        font-size: 0.75rem;
    }
}
/* =========================================================
   ORGANISING & SUPPORTING PARTNER LOGOS + ROSTER MODAL
   ========================================================= */
.partner-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
}

.partner-logo-grid.single-logo {
    grid-template-columns: minmax(150px, 210px);
}

.partner-logo-grid.co-org-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 14px;
}

.partner-logo-card {
    background: #ffffff;
    border-radius: 8px;
    height: 84px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-logo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 210, 255, 0.25);
}

.partner-logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Expanded Country Roster Modal */
.modal-content.roster-modal-content {
    max-width: 820px;
    width: 92%;
    max-height: 86vh;
    overflow-y: auto;
    text-align: left;
    padding: 28px;
}

.roster-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 28px;
    margin-bottom: 16px;
}

.roster-modal-header .modal-flag {
    width: 68px;
    height: 46px;
    object-fit: contain;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.roster-modal-header h2 {
    font-size: 1.45rem;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.roster-modal-endorser {
    font-size: 0.9rem;
    color: #9fb3c8;
    margin: 0 !important;
}

.roster-modal-endorser strong {
    color: #00d2ff;
}

@media (max-width: 600px) {
    .partner-logo-grid.co-org-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .roster-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .modal-content.roster-modal-content {
        padding: 20px 16px;
    }
}