/* 共通スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック Pro', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    padding-top: 120px;
    /* ヘッダーの高さ分 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

input,
select,
textarea {
    font-family: inherit;
    line-height: inherit;
    color: inherit;
}

/* ===== ヘッダー ===== */
.header-trigger {
    height: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.header.hidden {
    transform: translateY(-100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    flex: 1;
    min-width: 300px;
}

.logo-line1 {
    font-size: 1.1em;
    line-height: 1.2;
    margin-bottom: 5px;
}

.logo-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.logo-link:hover {
    opacity: 0.8;
}

.inline-block {
    display: inline-block;
}

.inline {
    display: inline;
}

.F-large {
    font-size: 1.3em;
    font-weight: bold;
}

.F-medium {
    font-size: 1em;
}

.shift5 {
    margin-right: -6px;
}

.red {
    color: #dc3545;
}

.gray5 {
    color: #6c757d;
}

.logo-line2 {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.logo-line3 {
    font-size: 0.9em;
    color: #666;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: #f0f0f0;
}

.lang-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ユーザー情報とログイン/ログアウト */
.login-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.user-name {
    color: #333;
    font-weight: 500;
    font-size: 12px;
}

.login-btn,
.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    margin: 10px 0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
    justify-content: center;
    white-space: nowrap;
}

.login-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
}

/* ===== メインレイアウト ===== */
.main-container {
    display: flex;
    flex: 1;
    min-height: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.content {
    /* flex: 1 !important; */
    width: 900px;
    flex-shrink: 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

/* ===== サイドバー ===== */
.sidebar {
    width: 240px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu>li {
    border-bottom: 1px solid #eee;
}

.sidebar-menu>li:last-child {
    border-bottom: none;
}

@media (max-width: 1200px) {
    .content {
        flex: 1 !important;
        width: calc(100vw - 250px)
    }
}

@media (max-width: 480px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar,
    .content {
        width: 100%;
        max-width: 100%;
    }
}


/* メインメニューアイテム（サブメニューなし） */
.single-menu-item {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.single-menu-item:hover {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
    color: #dc3545;
}

.single-menu-item.active {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
    color: #dc3545;
    font-weight: bold;
}

/* アコーディオンメニューヘッダー */
.menu-header {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.menu-header:hover {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
    color: #dc3545;
}

.menu-header.active {
    background-color: #f8f9fa;
    color: #dc3545;
    border-left-color: #dc3545;
}

.menu-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
}

.menu-arrow.rotated {
    transform: rotate(180deg);
}

/* サブメニュー */
.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #dc3545;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.submenu.open {
    max-height: 300px;
    /* 十分な高さを確保 */
    opacity: 1;
    visibility: visible;
}

.submenu a {
    display: block;
    padding: 12px 20px 12px 40px;
    font-size: 14px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
}

.submenu a:hover {
    background-color: #c82333;
    border-left: 12px solid white;
}

.submenu a.active {
    background-color: #c82333;
    border-left: 12px solid white;
}

/* 会員専用セクション */
.member-section {
    border-top: 2px solid #007bff;
    margin-top: 20px;
    padding-top: 15px;
}

.member-section-title {
    font-size: 12px;
    color: #007bff;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px;
}

.member-menu-header {
    border-left: 4px solid #007bff;
}

.member-menu-header:hover {
    border-left-color: #0056b3;
    color: #0056b3;
}

.member-menu-header.active {
    border-left-color: #0056b3;
    color: #0056b3;
}

.member-submenu {
    background-color: #007bff;
}

.member-submenu a {
    color: white;
}

.member-submenu a:hover,
.member-submenu a.active {
    background-color: #0056b3;
    border-left: 12px solid white;
}

/* ===== コンテンツスタイル ===== */
.section-title {
    font-size: 1.8em;
    color: #dc3545;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dc3545;
}

.news-item {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.news-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-date {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.news-content {
    color: #666;
    line-height: 1.6;
}

.conference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.conference-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.conference-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.conference-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.conference-content {
    padding: 20px;
}

.conference-year {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.conference-venue {
    color: #666;
    font-size: 0.9em;
}

.picture {
    width: fit-content;
    margin: 20px 0;
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 8px;
}

/* ===== スクロールボタン ===== */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 18px;
}

.scroll-to-top.show,
.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* ===== フッター ===== */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    flex-shrink: 0;
}

/* ===== ログインモーダル ===== */
.login-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

.login-modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal-title {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.login-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.login-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.login-modal-body {
    padding: 25px;
}

/* ログインタブ */
.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.login-tab {
    flex: 1;
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.login-tab:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.login-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

/* ログインフォーム */
.login-tab-content {
    display: none;
}

.login-tab-content.active {
    display: block;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 0.9em;
}

.login-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.login-form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-code-input {
    text-align: center;
    font-size: 1.2em;
    letter-spacing: 3px;
    font-weight: bold;
}

.login-form-actions {
    text-align: center;
    margin-top: 20px;
}

.login-btn-submit {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.login-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.login-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 認証コード関連 */
.auth-code-info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #b3d7ff;
}

.auth-code-info p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #0056b3;
}

.auth-code-info p:last-child {
    margin-bottom: 0;
}

#authTimer {
    font-weight: bold;
    color: #007bff;
}

#authTimer.warning {
    color: #ffc107;
}

#authTimer.expired {
    color: #dc3545;
}

.auth-code-actions {
    margin-top: 15px;
    text-align: center;
}

.resend-btn,
.back-btn {
    background: none;
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.resend-btn:hover,
.back-btn:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* メッセージ */
.login-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
    display: none;
}

.login-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* コンテンツローディング状態 */
.loading-content {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.content-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
    color: #007bff;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-spinner p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* コンテンツ内のリンクスタイル */
.content a:not(.btn):not(.button) {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content a:not(.btn):not(.button):hover {
    color: #0056b3;
    text-decoration: underline;
}

/* フォームスタイルの改善 */
.content form {
    margin: 20px 0;
}

.content .form-group {
    margin-bottom: 20px;
}

.content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.content input[type="text"],
.content input[type="email"],
.content input[type="password"],
.content textarea,
.content select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.content input:focus,
.content textarea:focus,
.content select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.content .btn,
.content .button {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.content .btn:hover,
.content .button:hover {
    background: #0056b3;
}

/* ページ遷移アニメーション */
.content {
    transition: opacity 0.3s ease-in-out;
}

.content.page-transition {
    opacity: 0;
}

/* 画像の遅延読み込み */
.content img[data-src] {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.content img[src] {
    opacity: 1;
}

/* エラーメッセージスタイル */
.content .error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

.content .success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* ===== 既存のレスポンシブ対応 ===== */
@media (max-width: 1024px) {
    .main-container {
        padding: 15px;
    }

    .content {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 160px;
    }

    .conference-grid {
        grid-template-columns: 1fr;
    }

    .main-container {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }

    .sidebar {
        width: 100%;
        order: 2;
        max-height: none;
    }

    .content {
        order: 1;
        padding: 20px 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-controls {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .language-switcher {
        order: 1;
    }

    .login-section {
        order: 2;
        align-items: flex-end;
    }

    .login-modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .logo-line1 {
        font-size: 0.95em;
    }

    .F-large {
        font-size: 1.1em;
    }

    .user-info {
        flex-direction: column;
        gap: 5px;
        align-items: flex-end;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 180px;
    }

    .login-modal-body {
        padding: 20px;
    }

    .lang-btn {
        padding: 5px 8px;
        font-size: 0.85em;
    }

    .login-btn,
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.85em;
        min-width: 80px;
    }

    .main-container {
        padding: 5px;
    }

    .user-name {
        font-size: 11px;
    }

    .content {
        padding: 15px 10px;
    }
}