/**
 * 佈局樣式 - Layout Styles
 * Header、Footer、主要內容區域
 */

/* ========== 禁用初始載入動畫 ========== */
body.no-transition,
body.no-transition *,
body.no-transition *::before,
body.no-transition *::after {
    transition: none !important;
    animation: none !important;
}
/* Loading spinner 不受 no-transition 影響，確保圖示可正常旋轉 */
body.no-transition .loading-overlay *,
body.no-transition .loading-overlay *::before,
body.no-transition .loading-overlay *::after {
    animation: revert !important;
}

/* ========== 桌面版側邊欄佈局調整 ========== */
@media (min-width: 48.0625rem) {
    header,
    .game-carousel,
    .main-content,
    footer {
        transition: margin-left var(--transition-normal), padding-left var(--transition-normal);
    }

    body.sidebar-expanded header,
    body.sidebar-expanded .game-carousel,
    body.sidebar-expanded footer {
        margin-left: var(--sidebar-width-expanded);
    }

    body.sidebar-collapsed header,
    body.sidebar-collapsed .game-carousel,
    body.sidebar-collapsed footer {
        margin-left: var(--sidebar-width-collapsed);
    }

    body.sidebar-expanded .main-content {
        width: min(90%, 78rem);
        max-width: 78rem;
        margin-left: max(
            calc(var(--sidebar-width-expanded) + 2rem),
            calc((100vw - 78rem + var(--sidebar-width-expanded)) / 2)
        );
        margin-right: auto;
        margin-top: 1.875rem;
        margin-bottom: 0.625rem;
    }

    body.sidebar-collapsed .main-content {
        width: min(90%, 78rem);
        max-width: 78rem;
        margin-left: max(
            calc(var(--sidebar-width-collapsed) + 2rem),
            calc((100vw - 78rem + var(--sidebar-width-collapsed)) / 2)
        );
        margin-right: auto;
        margin-top: 1.875rem;
        margin-bottom: 0.625rem;
    }

    /* 調整桌面版 header 內邊距 */
    body.sidebar-expanded header,
    body.sidebar-collapsed header {
        padding-left: 2rem;
    }
}

/* ========== Header ========== */
header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem 1rem 3rem;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(10, 10, 10, 0.95) 100%);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid rgba(212, 165, 32, 0.2);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(212, 165, 32, 0.1) inset;
}

.header__left {
    display: flex;
    align-items: center;
}

.header__logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header__logo img {
    height: 3.125rem;
    margin-right: 0.9375rem;
}

.header__logo h1 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    letter-spacing: 0.1rem;
    background: linear-gradient(135deg, #fff 0%, #d4a520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.header__logo h1 span {
    font-size: var(--font-size-lg);
    font-weight: normal;
    margin-left: 0.5rem;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header 圖標 */
.header__icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid rgba(212, 165, 32, 0.2);
    background: linear-gradient(165deg, rgba(30, 30, 30, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    padding: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

#logoutBtn {
    margin-left: auto;
}

/* 暫時隱藏未實作功能的按鈕 */
.header__icon[aria-label="Notifications"] {
    display: none;
}

.header__icon:hover,
.header__icon:focus {
    color: #ffd700;
    background: linear-gradient(165deg, rgba(212, 165, 32, 0.2) 0%, rgba(184, 134, 11, 0.15) 100%);
    border-color: rgba(212, 165, 32, 0.5);
    transform: translateY(-2px);
    outline: none;
    box-shadow:
        0 4px 15px rgba(212, 165, 32, 0.3),
        0 0 20px rgba(255, 215, 0, 0.15);
}

/* 主題切換按鈕 */
.theme-toggle {
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid rgba(212, 165, 32, 0.2);
    background: linear-gradient(165deg, rgba(30, 30, 30, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.theme-toggle:hover,
.theme-toggle:focus {
    color: #ffd700;
    background: linear-gradient(165deg, rgba(212, 165, 32, 0.2) 0%, rgba(184, 134, 11, 0.15) 100%);
    border-color: rgba(212, 165, 32, 0.5);
    transform: translateY(-2px);
    outline: none;
    box-shadow:
        0 4px 15px rgba(212, 165, 32, 0.3),
        0 0 20px rgba(255, 215, 0, 0.15);
}

/* ========== 遊戲輪播區域 ========== */
.game-carousel {
    flex-shrink: 0;
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 50%, #080808 100%);
    padding: 0 1.5rem 2px 1.5rem;
    position: relative;
    overflow: visible;
    border-bottom: 1px solid rgba(212, 165, 32, 0.25);
}

/* 底部光暈線條 */
.game-carousel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 32, 0.6), rgba(255, 215, 0, 0.8), rgba(212, 165, 32, 0.6), transparent);
    box-shadow: 0 0 20px rgba(212, 165, 32, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
}

.game-carousel__container {
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 1000 / 200;
    /* 備用最小高度以防 aspect-ratio 不支援 */
    min-height: calc(min(100vw, 1000px) * 200 / 1000);
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(25, 22, 18, 1) 0%,
        rgba(35, 30, 22, 1) 50%,
        rgba(25, 22, 18, 1) 100%);
}

/* 輪播圖左右模糊漸變效果 */
.game-carousel__container::before,
.game-carousel__container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.game-carousel__container::before {
    left: 0;
    background: linear-gradient(90deg,
        #0d0d0d 0%,
        rgba(13, 13, 13, 0.85) 25%,
        rgba(13, 13, 13, 0.5) 50%,
        rgba(13, 13, 13, 0.2) 75%,
        transparent 100%);
}

.game-carousel__container::after {
    right: 0;
    background: linear-gradient(270deg,
        #0d0d0d 0%,
        rgba(13, 13, 13, 0.85) 25%,
        rgba(13, 13, 13, 0.5) 50%,
        rgba(13, 13, 13, 0.2) 75%,
        transparent 100%);
}

.game-carousel__track {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: grab;
    user-select: none;
}

.game-carousel__track:active {
    cursor: grabbing;
}

.game-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    /* 備用背景 - 當圖片載入失敗時顯示 */
    background: linear-gradient(135deg,
        rgba(25, 22, 18, 1) 0%,
        rgba(35, 30, 22, 1) 50%,
        rgba(25, 22, 18, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 備用背景裝飾光暈 */
.game-carousel__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(212, 165, 32, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.game-carousel__slide--active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.game-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

/* 圖片載入失敗時的備用樣式 - 讓 alt 文字看起來更好 */
.game-carousel__slide img[src=""],
.game-carousel__slide img:not([src]),
.game-carousel__slide img.error {
    background: transparent;
    color: rgba(212, 165, 32, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-carousel__slide--placeholder {
    background: linear-gradient(135deg,
        rgba(25, 22, 18, 1) 0%,
        rgba(35, 30, 22, 1) 50%,
        rgba(25, 22, 18, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-carousel__slide--placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(212, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

/* 輪播圖覆蓋層（標題和副標題） */
.game-carousel__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem 1rem 7.5%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.game-carousel__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.game-carousel__subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 手機版輪播覆蓋層 */
@media (max-width: 48rem) {
    .game-carousel__overlay {
        padding: 0.375rem 0.5rem 0.375rem 7.5%;
    }

    .game-carousel__title {
        font-size: 0.625rem;
        margin-bottom: 0.125rem;
    }

    .game-carousel__subtitle {
        font-size: 0.5rem;
    }
}

/* Light Theme 輪播覆蓋層 */
.light-theme .game-carousel__overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 60%, transparent 100%);
}

.light-theme .game-carousel__title {
    color: #1a1a1a;
    text-shadow: none;
}

.light-theme .game-carousel__subtitle {
    color: rgba(26, 26, 26, 0.75);
    text-shadow: none;
}

/* 輪播導航按鈕 */
.game-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(212, 165, 32, 0.3);
    border-radius: 50%;
    background: linear-gradient(165deg, rgba(15, 15, 15, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    color: rgba(255, 215, 0, 0.8);
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.game-carousel__btn:hover {
    background: linear-gradient(165deg, rgba(212, 165, 32, 0.3) 0%, rgba(184, 134, 11, 0.2) 100%);
    border-color: rgba(212, 165, 32, 0.6);
    color: #ffd700;
    transform: translateY(-50%) scale(1.1);
    box-shadow:
        0 4px 15px rgba(212, 165, 32, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2);
}

.game-carousel__btn:focus {
    outline: 2px solid rgba(212, 165, 32, 0.5);
    outline-offset: 2px;
}

.game-carousel__btn--prev {
    left: 0.5rem;
}

.game-carousel__btn--next {
    right: 0.5rem;
}

/* 輪播指示點 */
.game-carousel__dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.game-carousel__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.game-carousel__dot:hover {
    background: rgba(212, 165, 32, 0.5);
    transform: scale(1.2);
}

.game-carousel__dot--active {
    background: linear-gradient(135deg, #d4a520 0%, #ffd700 100%);
    border-color: #ffd700;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* 手機版輪播樣式 */
@media (max-width: 48rem) {
    .game-carousel {
        padding: 0 0 2px 0;
    }

    .game-carousel__container {
        max-width: 350px;
        width: 100%;
        aspect-ratio: 350 / 70;
        min-height: calc(min(100vw, 350px) * 70 / 350);
    }

    .game-carousel__container::before,
    .game-carousel__container::after {
        width: 12%;
    }

    /* 手機版隱藏左右切換按鈕 */
    .game-carousel__btn {
        display: none;
    }

    .game-carousel__dots {
        bottom: 0.5rem;
        gap: 0.375rem;
    }

    .game-carousel__dot {
        width: 0.375rem;
        height: 0.375rem;
    }
}

/* 極小螢幕 */
@media (max-width: 26rem) {
    .game-carousel__container {
        width: 100%;
    }

    .game-carousel__container::before,
    .game-carousel__container::after {
        width: 10%;
    }
}

/* Light Theme 輪播樣式 */
.light-theme .game-carousel {
    background: #f0ede5;
    border-bottom-color: rgba(184, 134, 11, 0.2);
}

.light-theme .game-carousel::after {
    background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.4), rgba(212, 165, 32, 0.6), rgba(184, 134, 11, 0.4), transparent);
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.3);
}

.light-theme .game-carousel__container {
    background: #f0ede5;
    border: none;
    outline: none;
    box-shadow: none;
}

.light-theme .game-carousel__container::before {
    left: -4px;
    width: calc(15% + 4px);
    background: linear-gradient(90deg,
        #f0ede5 0%,
        #f0ede5 20%,
        rgba(240, 237, 229, 0.95) 35%,
        rgba(240, 237, 229, 0.7) 55%,
        rgba(240, 237, 229, 0.3) 80%,
        transparent 100%);
}

.light-theme .game-carousel__container::after {
    right: -4px;
    width: calc(15% + 4px);
    background: linear-gradient(270deg,
        #f0ede5 0%,
        #f0ede5 20%,
        rgba(240, 237, 229, 0.95) 35%,
        rgba(240, 237, 229, 0.7) 55%,
        rgba(240, 237, 229, 0.3) 80%,
        transparent 100%);
}

.light-theme .game-carousel__btn {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 246, 240, 0.98) 100%);
    border-color: rgba(184, 134, 11, 0.3);
    color: #b8860b;
}

.light-theme .game-carousel__btn:hover {
    background: linear-gradient(165deg, rgba(184, 134, 11, 0.15) 0%, rgba(184, 134, 11, 0.1) 100%);
    border-color: rgba(184, 134, 11, 0.5);
    color: #8b6914;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.2);
}

.light-theme .game-carousel__dot {
    border-color: rgba(184, 134, 11, 0.5);
    background: rgba(255, 255, 255, 0.8);
}

.light-theme .game-carousel__dot:hover {
    background: rgba(184, 134, 11, 0.3);
}

.light-theme .game-carousel__dot--active {
    background: linear-gradient(135deg, #b8860b 0%, #d4a520 100%);
    border-color: #b8860b;
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.4);
}

.light-theme .game-carousel__slide {
    background: #f0ede5;
    border: none;
    outline: none;
}

.light-theme .game-carousel__slide--placeholder {
    background: #f0ede5;
    border: none;
    outline: none;
}

.light-theme .game-carousel__track {
    background: #f0ede5;
}

.light-theme .game-carousel__slide img {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Light Theme 輪播響應式覆蓋 - 手機版 */
@media (max-width: 48rem) {
    .light-theme .game-carousel__container::before {
        width: calc(12% + 4px);
    }

    .light-theme .game-carousel__container::after {
        width: calc(12% + 4px);
    }
}

/* Light Theme 輪播響應式覆蓋 - 極小螢幕 */
@media (max-width: 26rem) {
    .light-theme .game-carousel__container::before {
        width: calc(10% + 4px);
    }

    .light-theme .game-carousel__container::after {
        width: calc(10% + 4px);
    }
}

/* ========== 主要內容區域 ========== */
.main-content {
    flex: 1 0 auto;
    width: 90%;
    max-width: 78rem;
    margin: 1.875rem auto 0.625rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========== Footer ========== */
footer {
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(8, 8, 8, 1) 100%);
    color: var(--text-dark-secondary);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-top: 1px solid rgba(212, 165, 32, 0.2);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 32, 0.5), transparent);
    box-shadow: 0 0 15px rgba(212, 165, 32, 0.3);
}

footer p {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.footer__social {
    margin: 0.75rem 0;
    display: flex;
    gap: 0.5rem;
}

.footer__social a {
    color: rgba(200, 200, 200, 0.7);
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    padding: 0.625rem;
    border-radius: 0.75rem;
    background: linear-gradient(165deg, rgba(30, 30, 30, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
    border: 1px solid rgba(212, 165, 32, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.footer__social a:hover,
.footer__social a:focus {
    color: #ffd700;
    background: linear-gradient(165deg, rgba(212, 165, 32, 0.2) 0%, rgba(184, 134, 11, 0.15) 100%);
    border-color: rgba(212, 165, 32, 0.5);
    transform: translateY(-3px);
    outline: none;
    box-shadow:
        0 6px 20px rgba(212, 165, 32, 0.3),
        0 0 25px rgba(255, 215, 0, 0.15);
}

/* ========== Loading 圖示 ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-toast);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

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

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    color: var(--color-primary);
    padding: 2rem;
    background: rgba(20, 20, 20, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 165, 32, 0.25);
    box-shadow: 0 8px 32px rgba(212, 165, 32, 0.15);
}

.loading-spinner i {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(212, 165, 32, 0.5));
}

.loading-spinner span {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ========== 響應式設計 ========== */
@media (max-width: 48rem) {
    header {
        padding: 0.625rem 0.75rem;
        position: relative;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .header__left {
        flex: 0 1 auto;
        min-width: 0;
    }

    .header__logo {
        flex: 1;
        min-width: 0;
    }

    .header__logo img {
        height: 2.5rem;
        margin-right: 0.625rem;
        flex-shrink: 0;
    }

    .header__logo h1 {
        font-size: 1.125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header__logo h1 span {
        font-size: 0.8rem;
        margin-left: 0.375rem;
    }

    .header__right {
        gap: 0.375rem;
        flex-shrink: 1;
        min-width: 0;
    }

    /* 隱藏未使用的通知圖標（user-info 改於手機版顯示頭像/名稱/權限）*/
    .header__icon[aria-label="Notifications"] {
        display: none !important;
    }

    /* 手機版隱藏 logo */
    .header__logo {
        display: none;
    }

    /* 手機版統一所有圖標大小 */
    .header__icon,
    .theme-toggle {
        font-size: 1.125rem;
        padding: 0.5rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
        flex-shrink: 0;
    }

    .banner {
        height: 6rem;
    }

    .banner__content {
        width: 95%;
        padding: 0 1rem;
    }

    .banner__content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.375rem;
        white-space: nowrap;
    }

    .banner__content p {
        font-size: 0.65rem;
        letter-spacing: 0.2em;
        white-space: nowrap;
    }

    .main-content {
        margin: 1rem auto 0.5rem auto;
        width: 95%;
    }
}

@media (max-width: 30rem) {
    header {
        padding: 0.5rem 0.5rem;
        gap: 0.375rem;
    }

    .header__logo img {
        height: 2rem;
        margin-right: 0.5rem;
    }

    .header__logo h1 {
        font-size: 0.85rem;
        line-height: 1.2;
        white-space: nowrap;
        display: none;
    }

    .header__logo h1 span {
        font-size: 0.65rem;
        margin-left: 0.25rem;
        opacity: 0.8;
    }

    .header__right {
        gap: 0.25rem;
    }

    .banner {
        height: 5rem;
    }

    .banner__content {
        width: 98%;
        padding: 0 0.5rem;
    }

    .banner__content h2 {
        font-size: 1.25rem;
        white-space: nowrap;
    }

    .banner__content p {
        font-size: 0.55rem;
        letter-spacing: 0.15em;
        white-space: nowrap;
    }

    .main-content {
        width: 98%;
        margin: 0.75rem auto 0.5rem auto;
    }

    .header__icon,
    .theme-toggle {
        font-size: 0.95rem;
        padding: 0.375rem;
        min-width: 2rem;
        min-height: 2rem;
    }
}

@media (max-width: 25rem) {
    header {
        padding: 0.375rem 0.375rem;
        gap: 0.25rem;
    }

    .header__logo h1 {
        font-size: 0.75rem;
        white-space: nowrap;
        display: none;
    }

    .header__logo h1 span {
        font-size: 0.55rem;
        margin-left: 0.2rem;
    }

    .header__right {
        gap: 0.2rem;
    }

    .header__icon,
    .theme-toggle {
        font-size: 0.85rem;
        padding: 0.35rem;
        min-width: 1.75rem;
        min-height: 1.75rem;
    }
}
