/* ヘッダー関連のスタイル */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgb(48,54,66,0.95);
    backdrop-filter: blur(4px);
    z-index: 50;
    padding: 0.2rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
    gap: 1rem;
    flex-wrap: nowrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.nav-desktop {
    display: flex; /* デスクトップナビゲーションを表示 */
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap; /* メニュー項目を折り返さない */
    overflow-x: auto; /* 横スクロールを許可 */
    overflow-y: hidden;
    white-space: nowrap;
    flex: 1 1 auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-desktop::-webkit-scrollbar { display: none; height: 0; }

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #D1D5DB;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    color: white;
}

.nav-link svg {
    width: 16px;
    height: 16px;
}

.nav-mobile {
    display: block;
}

/* メディアクエリ: 768px以下の画面幅に適用 */
@media (max-width: 768px) {
    .nav-desktop {
        display: none; /* デスクトップナビゲーションを非表示 */
    }
    .nav-mobile {
        display: block; /* モバイルメニューボタンを表示 */
    }
    #mobile-menu {
        top: 60px; /* ヘッダーの高さに合わせて調整 */
    }
}

#mobile-menu-toggle {
    background: none;
    border: none;
    color: #D1D5DB;
    cursor: pointer;
}

#mobile-menu-toggle:hover {
    color: white;
}

#mobile-menu {
    display: none;
    background: rgb(48,54,66,0.95);
    position: fixed;
    width: 100%;
    left: 0;
    top: 70px;
    padding: 1rem;
}

#mobile-menu.active {
    display: block;
}


.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #D1D5DB;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.mobile-nav-link:hover {
    background-color: rgba(55, 65, 81, 0.5);
    color: white;
}

.accordion-content {
    left: 60%;
    transform: translateX(-60%);
    top: calc(100% + 10px);
}

#mobile-menu .accordion-content {
    position: static;
    left: 0;
    right: 0;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    box-shadow: none;
}

/* スパークルアニメーション */
.nav-sparkle {
    font-size: 14px;
    animation: sparkle-pulse 1.5s ease-in-out infinite;
    margin-left: 2px;
}

.nav-link--has-update {
    position: relative;
}

@keyframes sparkle-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Light theme overrides */
body.theme-light .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #E2E8F0; /* slate-200 */
}

body.theme-light .logo {
    color: #0F172A; /* slate-900 */
}

body.theme-light .nav-link,
body.theme-light #mobile-menu-toggle {
    color: #475569; /* slate-600 */
}

body.theme-light .nav-link:hover,
body.theme-light #mobile-menu-toggle:hover {
    color: #0F172A; /* slate-900 */
}

body.theme-light #mobile-menu {
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0; /* slate-200 */
}

body.theme-light .mobile-nav-link {
    color: #334155; /* slate-700 */
}

body.theme-light .mobile-nav-link:hover {
    background-color: #F1F5F9; /* slate-100 */
    color: #0F172A;
}

body.theme-light .language-button {
    color: #475569; /* slate-600 */
}

body.theme-light .language-button:hover {
    background-color: #F1F5F9; /* slate-100 */
    color: #0F172A;
}
