/* 隱藏所有滾動條 */
html, body {
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

/* Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

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

/* 標題區域 */
.header-section {
    background-color: #dc3545;
    color: white;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.main-title {
    margin: 0;
    font-size: 30px;
    font-weight: bold;
    width: 100%;
    text-align: center;
}

.title-container {
    width: 100%;
    text-align: center;
}

.title-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
}

.title-link:hover {
    opacity: 0.8;
}

.main-title .sidebar-btn {
    padding: 0;
    width: 100%;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
    text-align: center;
    color: inherit;
    display: inline-block;
    transform: none;
}

.main-title .sidebar-btn:hover {
    opacity: 0.8;
}

.nav-section {
    padding: 15px 0;
    border-bottom: 6px solid #333;
    margin-bottom: 20px;
    background-color: #fff;
    text-align: center;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.nav-btn {
    padding: 8px 16px;
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.nav-btn.active {
    background-color: white;
    color: #dc3545;
    box-shadow: 0 0 0 2px #dc3545;
}

.iframe-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

#contentFrame {
    width: 100%;
    height: calc(100vh - 50px - 40px - 40px);
    border: none;
    background-color: #fff;
    display: block;
    margin-top: 55px;
    padding: 0;
}

.iframe-container.container {
    max-width: none;
    padding: 0;
}

.league-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #666666;
    margin-bottom: 20px;
}

.league-table th,
.league-table td {
    padding: 15px 10px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #666666;
}

.table-header {
    background-color: #4a4a4a;
    color: white;
    font-weight: normal;
}

.team-row:nth-child(even) {
    background-color: #f5f5f5;
}

.team-row:nth-child(odd) {
    background-color: #ebebeb;
}

.rank {
    font-weight: bold;
}

.team-name {
    text-align: left;
}

/* 下拉選單容器 */
.dropdown-container {
    position: relative;
    display: inline-block;
}

/* 下拉選單 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #dc3545;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    z-index: 3;
    min-width: 120px;
}

/* 下拉選單項目 */
.dropdown-item {
    padding: 8px 16px;
    color: #dc3545;
    cursor: pointer;
    white-space: nowrap;
}

/* 顯示下拉選單 */
.dropdown-menu.show {
    display: block;
    animation: dropDown 0.2s ease-out forwards;
}

/* 向下展開動畫 */
@keyframes dropDown {
    0% {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%) scaleY(0.7);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(-50%) scaleY(1);
    }
}

/* 賽程按鈕特殊樣式 */
#scheduleBtn {
    position: relative;
}

#scheduleBtn::after {
    content: none;
}

/* 當下拉選單顯示時的按鈕樣式 */
#scheduleBtn.active::after {
    transform: rotate(180deg);
}

/* 下拉選單項目動畫效果 - 適用於所有下拉選單 */
.dropdown-item {
    /* 保留原有樣式 */
    transition: all 0.2s ease-out; /* 平滑過渡效果 */
    position: relative; /* 為動畫做準備 */
    top: 0; /* 初始位置 */
}

/* 內容區域需要添加上方間距，避免被固定標題擋住 */
.content-container {
    max-width: 1000px;
    margin: 55px auto 5px auto;
    padding: 10px;
}

/* 內容區域 */
#contentArea {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    margin-top: 5px;
}

#contentArea::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* 漢堡按鈕樣式 */
.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 15px;
    width: 25px;
    height: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* 漢堡按鈕動畫效果 */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 側邊欄樣式 */
.sidebar {
    position: fixed;
    top: 0;
    left: -160px;
    width: 160px;
    height: 100%;
    background-color: #e84855;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 999;
    padding-top: 60px;
}

.sidebar.active {
    left: 0;
}

/* 側邊欄導航按鈕 */
.sidebar-nav {
    padding: 0;
}

/* 側邊欄按鈕樣式 */
.sidebar-btn {
    padding: 12px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    text-align: left;
    width: 160px;
    box-sizing: border-box;
}

/* 子選單樣式 */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-submenu.active {
    max-height: 300px;
    padding: 8px 0;
}

.sidebar-submenu .submenu-item {
    padding: 8px 15px;
    font-size: 14px;
    width: 160px;
    box-sizing: border-box;
    color: white;
    text-decoration: none;
    display: block;
    line-height: 1.6;
}

.sidebar-submenu .submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 管理後台連結樣式 - 與其他根目錄項目一致 */
.admin-link {
    /* 使用與其他 sidebar-btn 相同的樣式 */
}

/* 當父選單被點擊時顯示子選單 */
.sidebar-btn.active + .sidebar-submenu {
    display: block;
}

/* 遮罩層樣式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 確保所有可滾動元素都隱藏滾動條 */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Footer 樣式 */
.footer {
    text-align: center;
    padding: 15px 0;
    background-color: #f8f9fa;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.footer > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer .sidebar-btn {
    display: inline-block;
    padding: 0;
    color: #6c757d;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
    width: auto;
}

.footer .sidebar-btn:hover {
    color: #dc3545;
}

/* 版權資訊 */
.copyright {
    color: #6c757d;
    font-size: 14px;
    margin: 10px 0 0 0;
    text-align: center;
} 