/* =========================================
   Soyuzslai Theme Specific Styles
   ========================================= */

.soyuzslai-theme {
    --color-red: #a31818;
    --color-red-dim: #661111;
    --color-silver: #bdbdbd;
    --color-blue-cold: #7fd3ff;
    --color-bg-darkest: #090909;
}

.soyuzslai-theme {
    background-color: var(--color-bg-darkest);
}

/* 吹雪のエフェクト
   ・inset:0 で覆う。100vw はスクロールバー分だけ横にはみ出し、
     100vh はモバイルのURLバー伸縮で画面下端に隙間ができるため
     （＝雪が画面途中で途切れて見える原因だった）。
   ・移動量はタイル幅 200px の整数倍にする。整数倍でないと
     ループの瞬間に模様が飛び、雪が一瞬消えたように見える。
   ・レイヤーごとに移動距離を変えて奥行きを出す。 */
.blizzard-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    opacity: 0.35;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2.5px 2.5px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 130px 80px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: snow 14s linear infinite;
    will-change: background-position;
}

@keyframes snow {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    to {
        background-position:
             200px 1200px,
            -200px 1000px,
             400px  800px,
            -400px  600px,
             200px  400px;
    }
}

/* テキスト・カラーユーティリティ */
.text-red { color: var(--color-red) !important; }
.text-blue { color: var(--color-blue-cold) !important; }
.silver-text { color: var(--color-silver) !important; }
.dark-red-bg { background-color: #120505 !important; }
.red-glow { text-shadow: 0 0 20px rgba(163, 24, 24, 0.8); }
.glow-red-text { text-shadow: 0 0 15px rgba(163, 24, 24, 1); }
.red-borders { border-color: var(--color-red) !important; }

/* Hero Section */
.soyuzslai-hero .hero-bg {
    filter: brightness(0.6) contrast(1.2);
}
.hero-overlay-dark {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(transparent, rgba(163, 24, 24, 0.2), var(--color-bg-darkest));
    z-index: 1;
}

.soyuzslai-hero .red-scroll .line {
    background-color: var(--color-red);
}
.soyuzslai-hero .red-scroll p {
    color: var(--color-red);
}

/* 共通カード＆テーブル 上書き */
.soyuz-table {
    border-color: var(--color-red-dim) !important;
    background: rgba(10, 0, 0, 0.8) !important;
}
.soyuz-table th {
    color: var(--color-red) !important;
}

.soyuz-card {
    border-color: var(--color-red-dim) !important;
    background: rgba(10, 0, 0, 0.8) !important;
    transition: all 0.3s ease;
}
.soyuz-card:hover {
    border-color: var(--color-red) !important;
    box-shadow: 0 0 20px rgba(163, 24, 24, 0.3);
    transform: translateY(-5px);
}

.soyuz-border {
    border: 1px solid var(--color-red-dim) !important;
    transition: all 0.3s ease;
}
.soyuz-border:hover {
    border-color: var(--color-red) !important;
    box-shadow: 0 0 20px rgba(163, 24, 24, 0.3);
}

/* 概要・テキストボックス */
.soyuz-summary {
    background-color: var(--color-bg-darkest);
}
.soyuz-textbox {
    border-color: var(--color-red-dim);
    background: rgba(20, 5, 5, 0.8);
}

/* 歴史年表 */
.soyuz-timeline .timeline-item::before {
    background: var(--color-red) !important;
    box-shadow: 0 0 10px var(--color-red);
}
.soyuz-timeline .timeline::before {
    background: var(--color-red-dim) !important;
}

/* 日本帝国との対立（左右分割） */
.border-conflict {
    background-color: #0d0d0d;
}
.japan-border-pane .pane-bg {
    filter: brightness(0.5) contrast(1.2);
}
.territory-issue {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid var(--color-red-dim);
    background: rgba(255, 0, 0, 0.05);
}
.territory-issue h3 {
    color: var(--color-red);
    margin-bottom: 15px;
}
.issue-items {
    font-size: 1.5rem;
    font-weight: bold;
}
.issue-items span {
    margin: 0 10px;
}

/* 国家思想 */
.ideology-section {
    padding: 150px 0;
}
.ideology-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.ideology-card {
    flex: 1;
    min-width: 300px;
    position: relative;
    border: 1px solid var(--color-red-dim);
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.ideo-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    transition: transform 0.5s ease;
    z-index: 0;
}
.ideology-card:hover .ideo-bg {
    transform: scale(1.05);
}
.ideo-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(transparent, rgba(0,0,0,0.9) 30%, #000);
    padding: 40px;
    width: 100%;
}
.ideo-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* 首都 */
.capital-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.cap-card {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.cap-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3);
    z-index: 0;
}
.cap-content {
    position: relative;
    z-index: 1;
    padding: 30px;
    background: rgba(0,0,0,0.7);
    width: 100%;
}

/* 治安維持（秘密警察等） */
.security-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.security-pane {
    flex: 1;
    min-width: 350px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}
.sec-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.2);
    z-index: 0;
}
.sec-content {
    position: relative;
    z-index: 1;
    padding: 40px;
    background: rgba(10, 0, 0, 0.6);
    border: 1px solid rgba(163, 24, 24, 0.2);
    margin: 20px;
    backdrop-filter: blur(5px);
}
.sec-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}
.sec-content small {
    font-size: 1rem;
    color: var(--color-silver);
    display: block;
    margin-top: 5px;
}
.sec-list {
    margin-bottom: 20px;
    padding-left: 20px;
    color: #ccc;
}
.sec-list li {
    margin-bottom: 10px;
}

/* 外交・反体制 */
.diplomacy-section {
    padding: 100px 0;
}
.diplo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.diplo-card {
    padding: 30px;
}
.diplo-card h4 {
    color: var(--color-red);
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-red-dim);
    padding-bottom: 10px;
}
.mt-80 {
    margin-top: 80px;
}
.sub-section-title {
    font-size: 2rem;
    color: var(--color-silver);
    margin-bottom: 30px;
    text-align: center;
}

/* 反体制（ツァーリ解放戦線） */
.resistance-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #120505 0%, #0b0b0b 60%, #1a0808 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* resistance.jpg は 250x167 しかない小さな旗画像。
   cover で 5 倍近く引き伸ばすと完全に潰れて表示が破綻するため、
   強めにぼかして「旗の色を帯びた背景」として使う。
   （差し替え用の高解像度画像が用意できたら blur を弱めてよい） */
.res-bg {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(26px) brightness(0.4) saturate(1.4);
    opacity: 0.85;
    z-index: 0;
}
.res-content {
    position: relative;
    z-index: 1;
    background: rgba(20, 20, 20, 0.85);
    padding: 40px;
    max-width: 800px;
    text-align: center;
    border: 1px solid #555;
}
.res-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    font-size: 1.2rem;
    color: #ddd;
}

/* 国家評価 */
.evaluation-section {
    padding: 200px 0;
}
.eval-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-silver);
}
