/* =====================
   推播視窗樣式總覽
   ===================== */

:root {
    --primary-color: #6b7a99; /* 由紅色 #e32321 改為柔和淺藍灰色 */
    --secondary-color: #2e2a7a; /* 深藍色 - 實力文教 */
    --accent-color: #ffae00; /* 強調色 - 黃金色 */
    --light-color: #ffffff;
    --dark-color: #333333;
    --gray-color: #f5f5f5;
    --header-bg-color: #f8f9fa; /* 新的淺色背景 */
    --header-text-color: #2e2a7a; /* 標題文字顏色 */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --border-color: #d0d4e4; /* 柔和的淺藍灰色邊框 */
}

/* 推播視窗容器 - 對應原有的 #overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明背景 */
    z-index: 999999; /* 增加z-index值，確保覆蓋所有頁面元素 */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 推播視窗 - 對應原有的 #notificationContainer */
#notificationContainer {
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
    width: 45%;
    max-width: 598px;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    z-index: 999999; /* 增加z-index值 */
    transform: translateY(50px);
    opacity: 0;
    animation: slideIn 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* 推播視窗標題區 */
.notification-header {
    padding: 3px 20px 2px 20px; /* 縮小上下內邊距 */
    background: #ffffff;
    color: var(--header-text-color);
    display: flex;
    align-items: center;
    justify-content: center; 
    position: relative;
    overflow: visible;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    min-height: 40px; /* 進一步縮小高度 */
}

.notification-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
    animation: pulse 6s infinite;
}

/* LOGO和標題容器樣式 */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%; /* 填滿整個header高度 */
    padding: 0;
    overflow: visible;
    position: relative;
    text-align: center;
}

.logo {
    width: auto; 
    height: 120px; /* 保持與之前相同的高度 */
    max-width: 300px; /* 限制LOGO寬度 */
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    position: absolute; /* 絕對定位 */
    top: 25%; /* 進一步上移LOGO位置 */
    left: 50%;
    transform: translate(-50%, -50%); /* 水平垂直居中 */
    margin: 0;
    z-index: 1000000; /* 增加z-index值，確保LOGO顯示在最上層 */
    opacity: 1 !important; /* 強制顯示 */
    visibility: visible !important; /* 強制可見 */
}

.title-container {
    display: none; /* 隱藏標題容器，因為標題已包含在PNG圖片中 */
}

.title {
    display: none; /* 隱藏標題文字，因為標題已包含在PNG圖片中 */
}

/* 確保LOGO-標題容器正常顯示 */
.logo-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-wrap: nowrap; /* 防止換行 */
}

/* 推播內容區 - 對應原有的 #notificationContent */
#notificationContent {
    padding: 30px 30px 45px 30px; /* 增加底部padding */
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
    max-height: 350px;
    overflow-y: auto;
    font-size: 1.73rem;
    line-height: 1.8;
    border-top: 2px solid var(--border-color);
    border-bottom: 3px solid var(--border-color);
    position: relative;
    margin-top: -10px; /* 從-20px調整為-10px，減少與LOGO的距離 */
    margin-bottom: 2px; /* 增加底部邊距 */
}

/* 邊框效果 */
#notificationContent::before,
#notificationContent::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.5) 0%, 
        rgba(208,212,228,0.7) 25%, /* 柔和的淺藍灰色 */
        rgba(46,42,122,0.3) 50%, /* 深藍色但透明度低 */
        rgba(208,212,228,0.7) 75%, 
        rgba(255,255,255,0.5) 100%);
    z-index: 1;
}

#notificationContent::before {
    top: 0;
}

#notificationContent::after {
    bottom: 0;
}

/* 自定義滾動條樣式 */
#notificationContent::-webkit-scrollbar {
    width: 13px;
}

#notificationContent::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#notificationContent::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

#notificationContent::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 標題樣式 */
#notificationContent h1,
#notificationContent .notification-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 26px;
    text-align: center;
}

#notificationContent h1::after,
#notificationContent .notification-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 107px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 4px;
}

#notificationContent h5, #notificationContent .notification-subtitle {    
  font-size: 2.1rem; /* 副標題文字大小 */   
  font-weight: 600;    
  color: var(--secondary-color);    
  margin-bottom: 39px;    
  position: relative;    
  padding-left: 32px;    
  letter-spacing: 0.5px;    
  line-height: 1.2;
}

#notificationContent h5::before,
#notificationContent .notification-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 60px; /* 裝飾條高度 */
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 4px;
}

/* 確保副標題樣式最高優先級 */
#notificationContent .notification-subtitle {    
  font-size: 2.53125rem !important; /* 副標題文字大小 */
  font-weight: 600 !important;    
  color: var(--secondary-color) !important;    
  margin-bottom: 39px !important;    
  position: relative !important;    
  padding-left: 32px !important;    
  letter-spacing: 0.5px !important;    
  line-height: 1.2 !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
}

/* 內容段落樣式 */
#notificationContent p {
    font-size: 2.25rem;
    line-height: 1.7;
    margin-bottom: 31px;
}

.push-content, .push-description {
    font-size: 2.25rem;
    line-height: 1.8;
    margin-bottom: 31px;
    border: none;
}

/* 確保不會有任何內建的水平線 */
.push-content hr, .push-description hr {
    display: none;
}

/* 移除活動說明下方的水平分隔線 */
.push-content [class*="活動說明"] + hr,
.push-description [class*="活動說明"] + hr,
#notificationContent [class*="活動說明"] + hr,
#notificationContent .notification-subtitle + hr,
#notificationContent h5 + hr {
    display: none !important;
}

/* 移除活動說明後所有元素的上邊框 */
.push-content [class*="活動說明"] ~ *,
.push-description [class*="活動說明"] ~ *,
#notificationContent [class*="活動說明"] ~ *,
#notificationContent .notification-subtitle ~ *,
#notificationContent h5 ~ * {
    border-top: none !important;
    border-bottom: none !important;
}

/* 圖片樣式 */
#notificationContent img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    transition: transform 0.3s ease;
}

#notificationContent img:hover {
    transform: scale(1.02);
}

/* 連結樣式 */
#notificationContent a {
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    color: var(--secondary-color);
    padding: 12px 25px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--light-color) 0%, #f5f5f5 100%);
    box-shadow: 0 5px 15px rgba(46, 42, 122, 0.2);
    transition: all var(--transition-speed);
    text-decoration: none;
    margin: 15px 0;
    border: 2px solid var(--secondary-color);
}

#notificationContent a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 42, 122, 0.3);
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3f51b5 100%);
    color: var(--light-color);
}

/* 按鈕區域 */
#notificationButtons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* 增加間距 */
    padding: 20px 20px 20px 20px; /* 增加上下內間距 */
    background: linear-gradient(180deg, #f9f9f9 0%, #f0f0f0 100%);
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 33px;
    width: 100%;
    margin-top: 2px; /* 增加上邊距 */
}

.close-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* 增加間距 */
    width: 100%;
    margin-top: 2px; /* 增加頂部間距 */
}

/* 加強checkbox和標籤樣式 */
#noShowOneWeek {
    width: 22px; /* 增加大小 */
    height: 22px; /* 增加大小 */
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--secondary-color);
    transform: scale(1.2); /* 放大效果 */
    opacity: 1; /* 確保顯示 */
    visibility: visible; /* 確保可見 */
    position: relative; /* 相對定位 */
    z-index: 2000000; /* 確保高z-index */
}

.close-btn-container label {
    display: flex;
    align-items: center;
    font-size: 1.3em; /* 增加字體大小 */
    font-weight: 600; /* 加粗 */
    cursor: pointer;
    color: var(--dark-color);
    background-color: #f5f5f5; /* 背景色 */
    padding: 8px 15px; /* 內部間距 */
    border-radius: 20px; /* 圓角 */
    border: 1px solid #ddd; /* 邊框 */
    user-select: none; /* 防止文字被選取 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 陰影效果 */
    transition: all 0.3s ease; /* 過渡效果 */
    z-index: 2000000; /* 確保高z-index */
    position: relative; /* 相對定位 */
}

.close-btn-container label:hover {
    background-color: #eaeaea; /* 懸停效果 */
    transform: translateY(-2px); /* 微微上浮 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* 增強陰影 */
}

/* 確保在所有裝置上都能清晰顯示 */
@media (max-width: 768px) {
    .close-btn-container {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 10px;
        display: flex !important;
        align-items: center !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .close-btn-container label {
        font-size: 1.1em !important;
        margin-bottom: 8px;
        width: 100%;
        max-width: 250px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 8px 15px !important;
        border-radius: 16px !important;
    }
    
    #noShowOneWeek {
        width: 20px;
        height: 20px;
        margin-right: 8px;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1000000 !important;
    }
}

/* 按鈕樣式 - 上一條、下一條 */
#prevNotification, #nextNotification {
    padding: 12.7px 30.9px; /* 按鈕內部間距 */
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3f51b5 100%);
    color: var(--light-color);
    border: none;
    border-radius: 24.5px; /* 圓角設定 */
    font-size: 1.61rem; /* 文字大小 */
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 5px 15px rgba(46, 42, 122, 0.35);
    position: relative;
    overflow: hidden;
    min-width: 140px; /* 最小寬度 */
}

#prevNotification:hover, #nextNotification:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 27px rgba(46, 42, 122, 0.5);
}

#prevNotification::before, #nextNotification::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    transform: scale(0);
    transition: transform 0.6s ease-out;
}

#prevNotification:hover::before, #nextNotification:hover::before {
    transform: scale(1);
    animation: shine 1.5s infinite;
}

/* 關閉按鈕樣式 */
#closeNotification {
    padding: 12.7px 30.9px; /* 按鈕內部間距 */
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: var(--light-color);
    border: none;
    border-radius: 24.5px; /* 圓角設定 */
    font-size: 1.61rem; /* 文字大小 */
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.35);
    position: relative;
    overflow: hidden;
    min-width: 140px; /* 最小寬度 */
}

#closeNotification:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 27px rgba(108, 117, 125, 0.5);
}

#closeNotification::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    transform: scale(0);
    transition: transform 0.6s ease-out;
}

#closeNotification:hover::before {
    transform: scale(1);
    animation: shine 1.5s infinite;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
}

@keyframes shine {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    80% {
        transform: scale(4) rotate(45deg);
        opacity: 0.5;
    }
    100% {
        transform: scale(50) rotate(45deg);
        opacity: 0;
    }
}

/* 響應式設計 - 大型螢幕 */
@media (max-width: 1200px) {
    #notificationContainer {
        width: 85%;
        max-width: 800px;
    }
    
    .logo {
        width: auto;
        height: auto;
        max-width: 180px;
        min-width: auto;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .title {
        display: none;
    }
    
    #notificationContent {
        padding: 35px;
        font-size: 2rem;
        max-height: 500px;
    }
    
    #notificationContent h1, 
    #notificationContent .notification-title {
        font-size: 2.8rem;
    }
    
    #notificationContent h5, 
    #notificationContent .notification-subtitle {
        font-size: 2.2rem;
    }
    
    .push-content, .push-description {
        font-size: 2rem;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        font-size: 1.5rem;
        padding: 12px 28px;
        min-width: 130px;
    }
    
    .notification-link {
        font-size: 2rem;
    }
    
    /* 加強checkbox顯示 */
    #noShowOneWeek {
        width: 20px;
        height: 20px;
        transform: scale(1.1);
        z-index: 1000000;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .close-btn-container label {
        display: flex !important;
        align-items: center !important;
        font-size: 1.2em !important;
        background-color: #f5f5f5 !important;
        padding: 8px 15px !important;
        border-radius: 20px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* 響應式設計 - 平板 */
@media (max-width: 768px) {
    #notificationContainer {
        width: 90%;
        max-width: 90%;
        border-radius: 15px;
        transform: none; /* 移除縮放，恢復原始大小 */
        margin: 0 auto;
    }
    
    .notification-header {
        padding: 15px;
        min-height: 160px;
    }
    
    .logo-container {
        min-height: 140px;
        padding: 10px 0;
    }
    
    .logo {
        width: auto;
        height: auto;
        max-width: 160px;
        min-width: auto;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    #notificationContent {
        padding: 25px 20px;
        font-size: 1.8rem;
        max-height: 60vh;
        margin-top: -5px; /* 調整分隔線位置，適應平板尺寸 */
    }
    
    #notificationContent h1, 
    #notificationContent .notification-title {
        font-size: 2.4rem;
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
    
    #notificationContent h1::after, 
    #notificationContent .notification-title::after {
        width: 80px;
        height: 3px;
    }
    
    #notificationContent h5, 
    #notificationContent .notification-subtitle {
        font-size: 2rem !important;
        padding-left: 25px !important;
        margin-bottom: 25px !important;
    }
    
    #notificationContent h5::before, 
    #notificationContent .notification-subtitle::before {
        width: 7px;
        height: 50px;
    }
    
    .push-content, .push-description {
        font-size: 1.8rem;
        line-height: 1.6;
    }
    
    #notificationButtons {
        flex-direction: column;
        gap: 20px;
        padding: 25px 20px;
    }
    
    .nav-buttons {
        flex-direction: row;
        gap: 15px;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        width: auto;
        min-width: 0;
        padding: 12px 25px;
        font-size: 1.6rem;
        border-radius: 25px;
    }
    
    .notification-link {
        font-size: 1.8rem;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }
    
    .link-container {
        width: 100%;
    }
}

/* 響應式設計 - 手機 */
@media (max-width: 480px) {
    #overlay {
        padding: 0;
    }
    
    #notificationContainer {
        width: 95%;
        max-width: 95%;
        min-width: 300px;
        border-radius: 12px;
        transform: none; /* 移除縮放，恢復原始大小 */
        margin: 0 auto;
    }
    
    .notification-header {
        padding: 10px;
        min-height: 120px;
    }
    
    .logo-container {
        min-height: 100px;
        padding: 5px 0;
    }
    
    .logo {
        width: auto;
        height: auto;
        max-width: 140px;
        min-width: auto;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    #notificationContent {
        padding: 20px 15px;
        font-size: 1.6rem;
        max-height: 55vh;
        margin-top: 0px; /* 手機上不需要負值，避免與LOGO重疊 */
    }
    
    #notificationContent h1, 
    #notificationContent .notification-title {
        font-size: 2.1rem;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    #notificationContent h5, 
    #notificationContent .notification-subtitle {
        font-size: 1.8rem !important;
        padding-left: 20px !important;
        margin-bottom: 20px !important;
    }
    
    #notificationContent h5::before, 
    #notificationContent .notification-subtitle::before {
        width: 5px;
        height: 40px;
    }
    
    .push-content, .push-description {
        font-size: 1.6rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    #notificationButtons {
        padding: 20px 15px;
        gap: 15px;
    }
    
    .nav-buttons {
        gap: 10px;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        padding: 10px 20px;
        font-size: 1.4rem;
        border-radius: 20px;
    }
    
    .notification-link {
        font-size: 1.6rem;
        padding: 10px 15px;
    }
    
    .notification-thumbnail {
        margin-top: 15px;
        border-radius: 10px;
    }
    
    .close-btn-container {
        gap: 8px;
        margin-top: 8px;
        margin-bottom: 8px;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .close-btn-container label {
        font-size: 1em !important;
        padding: 8px 10px !important;
        width: 100%;
        max-width: 220px;
        margin-bottom: 8px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #noShowOneWeek {
        width: 18px;
        height: 18px;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* 響應式設計 - 橫向模式 */
@media (orientation: landscape) {
    .notification-header {
        padding: 15px 20px;
        min-height: 70px; /* 確保橫向模式下的最小高度 */
    }
    
    /* 確保標題區在橫向模式下仍然可見 */
    .logo-title-container {
        position: relative; /* 改為相對定位 */
        width: auto; /* 自適應寬度 */
        left: auto; /* 移除絕對定位 */
        transform: none; /* 移除變換 */
        z-index: 5; /* 確保在按鈕下層 */
    }
    
    .logo {
        width: auto;
        height: auto;
        max-width: 120px;
        min-width: auto;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .title {
        display: none;
    }
}

/* 響應式設計 - 小型橫向模式 */
@media (orientation: landscape) and (max-height: 500px) {
    .notification-header {
        padding: 10px 15px;
        min-height: 60px;
    }
    
    .logo {
        max-width: 100px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }
    
    .title {
        display: none;
    }
    
    /* 重新定位按鈕,避免遮擋標題 */
    #notificationButtons {
        top: 10px;
        right: 10px;
    }
}

/* 響應式設計 - 平板橫向模式 */
@media (orientation: landscape) and (min-width: 901px) and (max-width: 1366px) {
    .notification-header {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }
    
    .logo {
        width: auto;
        height: auto;
        max-width: 160px;
        min-width: auto;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .title {
        display: none;
    }
    
    #notificationButtons {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
    
    .nav-buttons {
        gap: 15px;
    }
    
    .close-btn-container {
        margin-left: 15px;
    }
}

/* 響應式設計 - 手機橫向模式 */
@media (orientation: landscape) and (max-width: 900px) {
    #overlay {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    #notificationContainer {
        max-height: 90vh;
        overflow-y: auto;
        flex-direction: column;
    }
    
    /* 重新定位按鈕 */
    #notificationButtons {
        flex-direction: row;
        justify-content: center; /* 水平居中 */
        align-items: center;
        position: absolute; /* 絕對定位 */
        top: 15px; /* 從頂部移動 */
        right: 15px; /* 從右側移動 */
        width: auto; /* 自適應寬度 */
        background: none; /* 移除背景 */
        padding: 0; /* 移除內邊距 */
        gap: 10px; /* 按鈕之間的間距 */
        z-index: 10; /* 確保在其他元素之上 */
    }
    
    /* 縮小按鈕尺寸 */
    #prevNotification, #nextNotification, #closeNotification {
        padding: 5px 10px;
        min-width: 0;
        font-size: 1rem;
        border-radius: 15px;
        margin: 0;
    }
    
    /* 調整橫向模式內容區以補償按鈕移動 */
    #notificationContent {
        max-height: calc(90vh - 90px);
        padding: 20px;
        margin-top: 0px; /* 手機橫向時分隔線位置，避免與縮小後的LOGO重疊 */
    }
    
    /* 調整導航按鈕區域 */
    .nav-buttons {
        display: flex;
        gap: 6px;
        margin: 0;
    }
    
    /* 調整關閉按鈕容器 */
    .close-btn-container {
        margin: 0;
        padding: 0;
    }
    
    .logo {
        width: 150px;
        height: 150px;
        min-width: 100px;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin-right: 0;
        margin-bottom: 0;
    }
}

/* 響應式設計 - 小型手機 */
@media (max-width: 320px) {
    #notificationContainer {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
        transform: scale(0.95);
    }
    
    .notification-header {
        padding: 15px 10px;
        min-height: 60px;
    }
    
    .logo {
        width: 180px;
        height: 180px;
        min-width: 100px;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    #notificationContent {
        padding: 15px 12px;
        font-size: 1.4rem;
        max-height: 45vh;
    }
    
    #notificationContent h1, 
    #notificationContent .notification-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    #notificationContent h5, 
    #notificationContent .notification-subtitle {
        font-size: 1.5rem !important;
        padding-left: 15px !important;
        margin-bottom: 15px !important;
    }
    
    #notificationContent h5::before, 
    #notificationContent .notification-subtitle::before {
        width: 4px;
        height: 30px;
    }
    
    .push-content, .push-description {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    #notificationButtons {
        padding: 15px 12px;
        gap: 10px;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        padding: 8px 15px;
        font-size: 1.2rem;
        border-radius: 18px;
    }
}

/* 響應式設計 - 超小型手機 */
@media (max-width: 240px) {
    #overlay {
        padding: 0 5px;
    }
    
    #notificationContainer {
        transform: scale(0.9);
    }
    
    .notification-header {
        padding: 10px 5px;
        min-height: 40px;
    }
    
    .logo {
        width: 120px;
        height: 120px;
        min-width: 80px;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    #notificationContent {
        padding: 10px 8px;
        font-size: 1.2rem;
        max-height: 40vh;
    }
    
    #notificationButtons {
        padding: 10px 8px;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        padding: 5px 10px;
        font-size: 1rem;
        border-radius: 15px;
    }
}

/* 響應式設計 - 橫向模式增強 */
@media (orientation: landscape) and (max-width: 900px) {
    /* 重新定位標題和LOGO */
    .notification-header {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 10px 50px; /* 左右留白 */
    }
    
    /* 重新定位按鈕容器 */
    #notificationButtons {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 0;
        background: transparent;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-end;
        width: auto;
    }
    
    /* 調整按鈕樣式 */
    #prevNotification, #nextNotification {
        display: none; /* 橫向模式下隱藏上一頁/下一頁按鈕 */
    }
    
    #closeNotification {
        position: absolute;
        right: 10px;
        top: 10px;
        width: 40px;
        height: 40px;
        min-width: 0;
        padding: 0;
        font-size: 1.2rem;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    #closeNotification::before {
        position: static;
        margin: 0;
    }
    
    /* 內容區域調整 */
    #notificationContent {
        max-height: calc(80vh - 120px);
        padding: 20px;
        margin-top: 0px; /* 手機橫向時分隔線位置，避免與縮小後的LOGO重疊 */
    }
    
    /* LOGO和標題調整 */
    .logo-title-container {
        flex-direction: row;
        justify-content: center;
        width: auto;
    }
    
    .logo {
        margin-right: 15px;
        margin-bottom: 0;
    }
}

/* 響應式設計 - 大型寬螢幕 */
@media (orientation: landscape) and (min-width: 1367px) {
    #notificationContainer {
        width: 70%;
        max-width: 1200px;
    }
    
    .notification-header {
        min-height: 100px;
    }
    
    .logo {
        width: 300px;
        height: 300px;
        min-width: 200px;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    #notificationContent {
        padding: 50px;
        max-height: 60vh;
    }
}

/* 強化編輯器格式優化 */
#notificationContent div[style*="border"],
#notificationContent span[style*="border"],
#notificationContent p[style*="border"],
#notificationContent [style*="border-top"],
#notificationContent [style*="border-bottom"] {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* 活動說明相關樣式增強 */
#notificationContent [class*="活動說明"],
#notificationContent [id*="活動說明"],
#notificationContent .notification-subtitle,
#notificationContent h5 {
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
}

/* 強制處理活動說明後的元素 */
#notificationContent [class*="活動說明"] + *,
#notificationContent [id*="活動說明"] + *,
#notificationContent .notification-subtitle + *,
#notificationContent h5 + * {
    border-top: none !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
}

/* 更徹底地處理水平線 */
#notificationContent hr,
#notificationContent [style*="border-bottom: 1px"],
#notificationContent [style*="border-top: 1px"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    border: none !important;
}

/* 確保在任何情況下都不顯示邊框 */
body #notificationContent *:not(button):not(.notification-link):not(.logo) {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* 防止段落間出現額外空間 */
#notificationContent p + p {
    margin-top: 0 !important;
}

/* 確保通知連結和按鈕正常顯示 */
#notificationContent .notification-link,
#notificationContent button {
    border: 1px solid var(--primary-color) !important;
}

/* 加強圖片樣式 */
#notificationContent img {
    max-width: 100% !important;
    height: auto !important;
    margin: 15px auto !important;
    display: block !important;
}

/* 官方Line帳號按鈕樣式 - 與前往連結網站按鈕相同 - 僅在推播視窗內有效 */
#notificationContent a[href*="lin.ee"], 
#notificationContent a[href*="line.me"],
#notificationContent a[title*="官方Line帳號"],
#notificationContent a[title*="LINE"],
#notificationContent .official-line-btn {
    display: inline-block;
    font-size: 2.2rem; /* 保持文字大小不變 */
    font-weight: bold;
    color: var(--secondary-color);
    padding: 10.9px 22.7px; /* 按鈕內部間距 */
    border-radius: 22.7px; /* 圓角設定 */
    background: linear-gradient(135deg, var(--light-color) 0%, #f5f5f5 100%);
    box-shadow: 0 5px 15px rgba(46, 42, 122, 0.2);
    transition: all var(--transition-speed);
    text-decoration: none;
    border: 2px solid var(--secondary-color);
    text-align: center;
}

#notificationContent a[href*="lin.ee"]:hover, 
#notificationContent a[href*="line.me"]:hover,
#notificationContent a[title*="官方Line帳號"]:hover,
#notificationContent a[title*="LINE"]:hover,
#notificationContent .official-line-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 42, 122, 0.3);
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3f51b5 100%);
    color: var(--light-color);
    text-decoration: none;
}

/* 推播訊息文字編輯器內的通用連結按鈕樣式 */
#notificationContent a.external-link,
#notificationContent a.btn-custom,
#notificationContent a.btn-link,
#notificationContent a:not([class]):not([id]),
#notificationContent a[href^="http"]:not(.notification-link):not([class^="notification"]) {
    display: inline-block;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--secondary-color);
    padding: 10.9px 22.7px;
    border-radius: 22.7px;
    background: linear-gradient(135deg, var(--light-color) 0%, #f5f5f5 100%);
    box-shadow: 0 8px 20px rgba(46, 42, 122, 0.4); /* 增強陰影效果 */
    transition: all var(--transition-speed);
    text-decoration: none;
    border: 4px solid var(--secondary-color); /* 更加粗的邊框 */
    text-align: center;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

#notificationContent a.external-link:hover,
#notificationContent a.btn-custom:hover,
#notificationContent a.btn-link:hover,
#notificationContent a:not([class]):not([id]):hover,
#notificationContent a[href^="http"]:not(.notification-link):not([class^="notification"]):hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(46, 42, 122, 0.5); /* 增強懸浮時的陰影 */
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3f51b5 100%);
    color: var(--light-color);
    text-decoration: none;
}

/* 加入深色邊框線效果 */
#notificationContent a.external-link::after,
#notificationContent a.btn-custom::after,
#notificationContent a.btn-link::after,
#notificationContent a:not([class]):not([id])::after,
#notificationContent a[href^="http"]:not(.notification-link):not([class^="notification"])::after,
#notificationContent a[style*="background"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 22.7px;
    box-shadow: inset 0 0 0 3px rgba(46, 42, 122, 0.7); /* 增強內部陰影輪廓 */
    pointer-events: none;
}

/* 推播訊息內的第三個列表項連結 */
#notificationContent ol li:nth-child(3) a,
#notificationContent ol li:nth-of-type(3) a,
#notificationContent ul li:nth-child(3) a,
#notificationContent ul li:nth-of-type(3) a {
    font-size: 2.2rem !important;
    font-weight: bold !important;
    color: var(--secondary-color) !important;
    padding: 10.9px 22.7px !important;
    border-radius: 22.7px !important;
    background: linear-gradient(135deg, var(--light-color) 0%, #f5f5f5 100%) !important;
    box-shadow: 0 8px 20px rgba(46, 42, 122, 0.3) !important; /* 加強陰影 */
    transition: all var(--transition-speed) !important;
    text-decoration: none !important;
    border: 3px solid var(--secondary-color) !important; /* 加粗邊框 */
    text-align: center !important;
    display: inline-block !important;
    position: relative !important;
    overflow: hidden !important;
}

/* 推播訊息內的特定背景色連結 */
#notificationContent a[style*="background-color: rgb("],
#notificationContent a[style*="background-color:rgb("],
#notificationContent a[style*="background: rgb("],
#notificationContent a[style*="background:rgb("],
#notificationContent a[style*="background-color: #"],
#notificationContent a[style*="background-color:#"],
#notificationContent a[style*="background: #"],
#notificationContent a[style*="background:#"] {
    /* 應用連結網站按鈕樣式 */
    font-size: 2.2rem !important;
    font-weight: bold !important;
    color: var(--secondary-color) !important;
    padding: 10.9px 22.7px !important; /* 按鈕內部間距 */
    border-radius: 22.7px !important; /* 圓角設定 */
    background: linear-gradient(135deg, var(--light-color) 0%, #f5f5f5 100%) !important;
    box-shadow: 0 12px 25px rgba(46, 42, 122, 0.5) !important; /* 陰影效果 */
    transition: all var(--transition-speed) !important;
    text-decoration: none !important;
    border: 4px solid var(--secondary-color) !important; /* 邊框樣式 */
    text-align: center !important;
    margin: 15px 0 !important;
    display: inline-block !important;
    position: relative !important;
    overflow: hidden !important;
}

/* 全局確保LOGO始終可見 */
.notification-header .logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 100 !important;
}

/* 重置任何可能隱藏LOGO的樣式 */
.notification-header .logo-container {
    overflow: visible !important;
}

/* 確保LOGO始終居中 */
@media (max-width: 320px) {
    .logo {
        max-width: 120px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }
    
    .title {
        display: none;
    }
}

@media (max-width: 240px) {
    .logo {
        max-width: 90px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }
    
    .title {
        display: none;
    }
}

/* 連結容器 */
.link-container {
    display: flex;
    justify-content: center;
    margin-top: 26px;
    margin-bottom: 13px;
    width: 100%;
}

/* 連結按鈕 */
.notification-link {
    display: inline-block;
    font-size: 2.2rem; /* 文字大小 */
    font-weight: bold;
    color: var(--secondary-color);
    padding: 10.9px 22.7px; /* 按鈕內部間距 */
    border-radius: 22.7px; /* 圓角設定 */
    background: linear-gradient(135deg, var(--light-color) 0%, #f5f5f5 100%);
    box-shadow: 0 5px 15px rgba(46, 42, 122, 0.2);
    transition: all var(--transition-speed);
    text-decoration: none;
    border: 2px solid var(--secondary-color);
}

.notification-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 42, 122, 0.3);
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3f51b5 100%);
    color: var(--light-color);
    text-decoration: none;
}

/* 特殊描述區域 */
.special-description {
    margin-top: 26px;
    padding-top: 26px;
}

/* 縮圖樣式 */
.notification-thumbnail {
    max-width: 100%;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

/* 移除內容元素邊框 */
#notificationContent div,
#notificationContent p,
#notificationContent span,
#notificationContent h1,
#notificationContent h2,
#notificationContent h3,
#notificationContent h4,
#notificationContent h5,
#notificationContent h6,
#notificationContent ul,
#notificationContent ol,
#notificationContent li,
#notificationContent table,
#notificationContent tr,
#notificationContent td,
#notificationContent th,
#notificationContent section,
#notificationContent article,
#notificationContent header,
#notificationContent footer {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* 隱藏水平線 */
#notificationContent hr {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 活動說明元素處理 */
.push-content [class*="活動說明"],
.push-content [id*="活動說明"],
#notificationContent [class*="活動說明"],
#notificationContent [id*="活動說明"] {
    border-top: none !important;
    margin-top: 10px !important;
}

/* 標題後元素處理 */
.notification-title ~ * {
    border-top: none !important;
}

/* 移除邊框線 */
body #notificationContent::after {
    display: none !important;
}

body #notificationContent::before {
    display: none !important;
}

/* 針對平板直向偏窄的優化 */
@media (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
    #notificationContainer {
        width: 90%;
        max-width: 600px;
        min-width: 450px;
        margin: 0 auto;
    }
    
    .notification-header {
        min-height: 45px; /* 減少最小高度 */
        padding: 4px 15px 3px 15px;
    }
    
    .logo {
        top: 25%; /* 上移LOGO位置 */
        max-width: 180px; /* 縮小LOGO寬度 */
        height: 180px; /* 縮小LOGO高度 */
    }
    
    #notificationContent {
        padding: 25px 25px 35px 25px;
        font-size: 1.6rem;
        margin-top: -70px; /* 平板直向時微調分隔線位置 */
    }
    
    #notificationButtons {
        padding: 15px 15px 20px 15px;
        gap: 15px;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        padding: 8px 20px;
        font-size: 1.4rem;
        min-width: 110px; /* 從100px稍微增加到110px */
    }
}

/* 手機橫向模式優化 */
@media (orientation: landscape) and (max-width: 900px) {
    #overlay {
        padding: 0;
    }
    
    #notificationContainer {
        width: 85%;
        max-width: 85%;
        min-width: 400px;
        max-height: 90vh;
        margin: 10px auto 0 auto;
        overflow-y: auto;
    }
    
    .notification-header {
        min-height: 40px; /* 減少最小高度 */
        padding: 3px 15px;
    }
    
    .logo {
        max-width: 80px; /* 縮小LOGO尺寸 */
        height: auto;
        margin: 0;
        top: 45%; /* 調整垂直位置 */
    }
    
    #notificationContent {
        padding: 20px 20px 25px 20px;
        max-height: calc(85vh - 120px);
        margin-top: 0px; /* 手機橫向時分隔線位置，避免與縮小後的LOGO重疊 */
        font-size: 1.5rem;
    }
    
    .push-content, .push-description {
        font-size: 1.5rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    #notificationButtons {
        padding: 15px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }
    
    #prevNotification, #nextNotification, #closeNotification {
        padding: 8px 15px;
        font-size: 1.3rem;
        min-width: 0;
    }
    
    .close-btn-container {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    #noShowOneWeek {
        margin-right: 5px;
    }
}

/* 平板橫向偏窄優化 */
@media (orientation: landscape) and (min-width: 901px) and (max-width: 1199px) {
    #notificationContainer {
        width: 75%;
        max-width: 850px;
        min-width: 600px;
        margin: 0 auto;
    }
    
    .notification-header {
        min-height: 45px; /* 減少最小高度 */
        padding: 4px 20px 3px 20px;
    }
    
    .logo {
        max-width: 85px; /* 縮小LOGO尺寸 */
        height: auto;
        top: 45%; /* 調整垂直位置 */
    }
    
    #notificationContent {
        padding: 30px 30px 35px 30px;
        max-height: 60vh;
        margin-top: -5px; /* 平板橫向時調整分隔線位置 */
    }
    
    #notificationButtons {
        padding: 20px;
        flex-direction: row;
        justify-content: center;
        gap: 25px;
    }
    
    #prevNotification, #nextNotification {
        min-width: 120px;
    }
    
    #closeNotification {
        min-width: 120px;
    }
    
    .close-btn-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .close-btn-container label {
        margin-left: 5px;
    }
}

/* 手機直向尺寸 - 額外優化 */
@media (max-width: 480px) {
    .notification-header {
        min-height: 40px; /* 減少最小高度 */
        padding: 3px 10px;
    }
    
    .logo-container {
        min-height: 40px; /* 減少最小高度 */
        padding: 3px 0;
    }
    
    .logo {
        max-width: 80px; /* 縮小LOGO尺寸 */
        height: auto;
        top: 45%; /* 調整垂直位置 */
    }
} 