/* リセットと基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-width: 240px;
    --primary-color: #003d7a;
    --secondary-color: #0066cc;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #d0d0d0;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --bg-lighter: #fafafa;
    --accent-gold: #c5a25f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    overflow-x: hidden;
    background: var(--bg-white);
}

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

/* サイドバー */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--primary-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 28px 24px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

.sidebar-brand i {
    color: var(--accent-gold);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    letter-spacing: 0.2px;
}

.sidebar-link i {
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: white;
    background: rgba(255,255,255,0.09);
    border-left-color: var(--accent-gold);
}

/* サイドバーサブメニュー */
.sidebar-submenu {
    list-style: none;
    background: rgba(0,0,0,0.18);
    padding: 4px 0;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 48px;
    color: rgba(255,255,255,0.58);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    letter-spacing: 0.1px;
}

.sidebar-sublink i {
    width: 13px;
    text-align: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    color: white;
    background: rgba(255,255,255,0.07);
    border-left-color: var(--accent-gold);
}

/* メインコンテンツ領域 */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* モバイル用ハンバーガーボタン */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1100;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
}

/* モバイル用オーバーレイ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, #003d7a 0%, #0059b3 100%);
    color: white;
    padding: 180px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,200 Q300,100 600,200 T1200,200 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.03)"/></svg>') no-repeat center bottom;
    background-size: cover;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-subtitle-top {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 15px;
    opacity: 0.95;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 1rem;
    margin-top: 25px;
    opacity: 0.9;
    font-weight: 300;
}

/* セクション */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-lighter);
}

.section-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title-en {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
}

.section-description {
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 60px;
    line-height: 1.8;
}

/* プロジェクトについて */
.about-intro {
    max-width: 900px;
    margin: 0 auto 70px;
    text-align: center;
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-color);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.about-item {
    background: var(--bg-white);
    padding: 40px 35px;
    border-left: 4px solid var(--accent-gold);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.about-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.about-number {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 20px;
    opacity: 0.7;
}

.about-item-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.about-item p {
    color: var(--text-color);
    line-height: 1.9;
    font-size: 0.95rem;
}

/* メンバーグリッド */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 50px;
}

.member-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.member-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    font-weight: 600;
}

.member-name {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.member-role {
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.member-affiliation {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.member-bio {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 0.9rem;
    text-align: left;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* 認証フォーム */
.auth-container {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.auth-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 50px 40px;
    box-shadow: var(--shadow-sm);
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.auth-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.auth-icon i {
    font-size: 1.8rem;
    color: white;
}

.auth-card h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.auth-card p {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.7;
}

.form-group {
    margin-bottom: 25px;
}

.form-control,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

.btn {
    padding: 14px 32px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #002d5a;
}

.btn-block {
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

/* データベースコンテナ */
.database-container {
    animation: fadeIn 0.5s ease;
}

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

.database-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.search-controls {
    flex: 1;
    min-width: 320px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-controls {
    display: flex;
    gap: 15px;
}

.filter-controls select {
    flex: 1;
    min-width: 150px;
}

.results-info {
    margin-bottom: 25px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* 文献リスト */
.bibliography-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.bib-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 30px;
    transition: all 0.3s ease;
}

.bib-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(3px);
}

.bib-type {
    display: inline-block;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bib-type.book {
    background: #e3f2fd;
    color: #1565c0;
}

.bib-type.article {
    background: #f3e5f5;
    color: #6a1b9a;
}

.bib-type.thesis {
    background: #e8f5e9;
    color: #2e7d32;
}

.bib-type.other {
    background: #fff3e0;
    color: #e65100;
}

.bib-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
    line-height: 1.5;
}

.bib-authors {
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.bib-authors i {
    color: var(--accent-gold);
    margin-right: 6px;
}

.bib-publication {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.bib-year {
    color: var(--secondary-color);
    font-weight: 600;
}

.bib-year i {
    margin-right: 6px;
}

.bib-abstract {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    line-height: 1.9;
    font-size: 0.95rem;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination button {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 61, 122, 0.05);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ページヘッダー（サブページ用） */
.page-hero {
    background: linear-gradient(135deg, #003d7a 0%, #0059b3 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.4rem;
    font-weight: 600;
    margin-top: 12px;
    letter-spacing: 1px;
}

/* ホームページのヒーローリンクボタン */
.hero-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    padding: 14px 36px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--accent-gold);
    color: white;
}

.hero-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.7);
}

.hero-btn-outline:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* ホームページの概要カードリンク */
.about-item-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

.about-item-link .about-number {
    font-size: 2rem;
}

/* データベース シート一覧グリッド */
.db-sheet-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.db-sheet-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 24px 28px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.db-sheet-card:hover {
    box-shadow: var(--shadow);
    border-left-color: var(--accent-gold);
    transform: translateX(4px);
}

.db-sheet-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-sheet-icon i {
    color: white;
    font-size: 1.2rem;
}

.db-sheet-info {
    flex: 1;
}

.db-sheet-info h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.db-sheet-en {
    color: var(--text-light);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin: 0;
}

.db-sheet-count {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: rgba(197,162,95,0.1);
    padding: 2px 10px;
}

.db-sheet-arrow {
    color: var(--border-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.db-sheet-card:hover .db-sheet-arrow {
    color: var(--primary-color);
}

/* 各シートページ用ツールバー */
.db-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.db-toolbar .search-box {
    flex: 1;
    min-width: 280px;
    margin-bottom: 0;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* 文献リスト共通 */
.bib-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bib-link {
    margin-top: 12px;
}

.bib-link a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.bib-link a:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    color: var(--text-light);
    padding: 3rem;
}

/* ページヘッダー パンくずリンク */
.page-hero-back {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
}

.page-hero-back:hover {
    color: white;
}

/* モバイル：サイドバーをドロワーとして表示 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        display: flex;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
        padding-top: 60px;
    }
}

/* フッター */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 35px 0;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .database-header {
        flex-direction: column;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .auth-card {
        padding: 35px 25px;
    }
    
    .bib-item {
        padding: 20px;
    }
    
    .bib-title {
        font-size: 1.15rem;
    }
}
