/* ==========================================================================
   gfriend.jp - Global Styles (日本語コメント修正版)
   ========================================================================== */

:root {
    /* チームカラー & 基本色 */
    --gfriend-blue: #a1c4fd;
    --gfriend-purple: #c2e9fb;
    --gfriend-pink: #ff6699;
    --anniv-gold: #ffb100;
    --bg-color: #f8fafd;
    --text-color: #333;
    --sub-text: #888;
    --white: #ffffff;
    
    /* サイトの最大幅 (約80% = 1000pxに設定) */
    --container-width: 1000px;
}

/* 基本設定 */
* { box-sizing: border-box; }
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* 全体のレイアウト幅制限 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 30px 20px;
    min-height: 600px;
}
/* ヘッダー：上下の幅を極限までカット */
.global-header {
    background: linear-gradient(135deg, var(--gfriend-blue) 0%, var(--gfriend-purple) 100%);
    padding: 8px 10px; /* 20pxから8pxへ大幅縮小 */
    color: var(--white);
    text-align: center;
}

.global-header h1 {
    margin: 0;
    font-size: 1.4em; /* 2.2emから1.4emへ。視認性を保ちつつスリムに */
    letter-spacing: 2px; /* 少し詰めて横幅も節約 */
    line-height: 1.1;
}

.global-header h1 a {
    color: var(--white);
    text-decoration: none;
}

.global-header .subtitle {
    opacity: 0.8;
    margin-top: 2px; /* 8pxから2pxへ。h1にピタッとくっつける */
    font-size: 0.7em; /* 0.9emから0.7emへ。さりげない表示に */
    letter-spacing: 1px;
}

/* 固定ナビゲーション */
.sticky-nav {
    background: var(--white);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* メインメニュー */
.main-menu {
    display: flex;
    gap: 15px;
    font-weight: bold;
    flex-wrap: wrap;
    justify-content: center;
}
.main-menu a {
    text-decoration: none;
    color: #555;
    transition: 0.3s;
    padding: 5px 12px;
    font-size: 0.85em;
    border-radius: 20px;
}
.main-menu a:hover {
    background: #f0f4ff;
    color: var(--gfriend-pink);
}
.anniv-link {
    color: var(--anniv-gold) !important;
    border: 1px solid var(--anniv-gold);
}

/* メンバータグ */
.member-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.tag {
    text-decoration: none;
    font-size: 0.65em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 15px;
    border: 1px solid var(--gfriend-blue);
    color: var(--gfriend-blue);
    transition: 0.3s;
    background: var(--white);
}
.tag:hover {
    background: var(--gfriend-blue);
    color: var(--white);
}

/* 検索窓 */
.search-form { display: flex; gap: 5px; margin-top: 5px; }
.search-input {
    padding: 6px 15px;
    border: 2px solid #eee;
    border-radius: 20px;
    outline: none;
    width: 200px;
    font-size: 0.85em;
    transition: 0.3s;
}
.search-input:focus { border-color: var(--gfriend-blue); }
.search-btn {
    background: var(--gfriend-blue);
    color: var(--white);
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
}

/* 埋め込みプレイヤー & グリッド共通のレスポンシブ設定 */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9比率 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 動画グリッド */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0 50px;
}

.video-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* サムネイル容器 */
.thumb-container {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}
.thumb-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* 時代バッジ */
.era-label {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: bold;
}

/* カードテキスト部 */
.card-body { padding: 12px; flex-grow: 1; }
.card-tag {
    color: var(--gfriend-pink);
    font-size: 0.7rem;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}
.card-body h3 {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.card-body .date {
    color: #bbb;
    font-size: 0.75rem;
    margin-top: 8px;
    display: block;
}

/* ヒーローセクション（メインプレイヤー） */
.hero-card {
    background: #000; /* プレイヤーの背後を黒に */
    border-radius: 12px;
    padding: 0; /* 余計な隙間をゼロに */
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); /* 浮遊感を出す */
    margin: 0 auto 30px; 
    max-width: 650px;
}

.hero-info {
    padding: 20px;
    border-left: 6px solid var(--gfriend-pink);
}
.hero-info h2 {
    margin: 0;
    font-size: 1.2em;
    color: var(--text-color);
}

#archive-list-top {
    margin-top: 10px; /* プレイヤーとの距離を少し詰める */
}

/* セクションタイトル */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-left: 5px solid var(--gfriend-blue);
    padding-left: 12px;
}
.section-title h2 {
    margin: 0;
    font-size: 1.1em;
    letter-spacing: 1px;
}
.section-title a {
    color: var(--gfriend-blue);
    text-decoration: none;
    font-size: 0.8em;
    font-weight: bold;
}
.section-title a:hover { color: var(--gfriend-pink); }

/* アーカイブヘッダー */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.page-header h2 { font-size: 1.5em; margin: 0; }
.page-header p { color: var(--sub-text); font-size: 0.9em; margin-top: 5px; }

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
    flex-wrap: wrap;
}
.page-btn {
    padding: 6px 14px;
    background: var(--white);
    border: 1px solid #ddd;
    text-decoration: none;
    color: #666;
    border-radius: 5px;
    font-size: 0.85em;
    transition: 0.3s;
}
.page-btn:hover { background: #f0f4ff; border-color: var(--gfriend-blue); }
.page-btn.active {
    background: var(--gfriend-blue);
    color: var(--white);
    border-color: var(--gfriend-blue);
    font-weight: bold;
}

/* フッター */
.global-footer {
    margin-top: 80px;
    padding: 50px 20px;
    background: #f0f3f7;
    text-align: center;
    color: #999;
    font-size: 0.8em;
    border-top: 1px solid #eee;
}
.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
}
.footer-inner p { margin: 10px 0; }
.footer-logo {
    font-weight: bold;
    letter-spacing: 2px;
    color: #777;
    font-size: 1em;
}

/* レスポンシブ (スマホ表示) */
@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .global-header h1 { font-size: 1.6em; }
    .nav-container { padding: 0 10px; }
    .main-menu { gap: 8px; }
    .main-menu a { font-size: 0.75em; padding: 4px 8px; }
    .hero-info h2 { font-size: 1em; }
}