/* genesis/web-app/styles/genesis-global.css */
/* ページ全体の基本的な土台となる設定です */
html,
body {
    font-family: 'Courier New', monospace;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 50% 0%, #15221c 0%, transparent 50%),
        linear-gradient(0deg, transparent 24%, rgba(0, 229, 255, 0.02) 25%, rgba(0, 229, 255, 0.02) 26%, transparent 27%, transparent 74%, rgba(0, 229, 255, 0.02) 75%, rgba(0, 229, 255, 0.02) 76%, transparent 77%, transparent);
    background-size: 100% 100%, 50px 50px;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1,
h2,
h3 {
    margin-top: 0;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

ul,
ol {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

a {
    color: var(--accent-amber);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    text-shadow: 0 0 8px var(--accent-amber);
    /* text-decoration: underline; */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-dark);
}

th {
    color: var(--accent-amber);
    font-family: 'Cinzel', serif;
    font-weight: bold;
    letter-spacing: 1px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-title {
    color: var(--system-gray);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    margin: 20px 0 10px 0;
    font-size: 2em;
    font-weight: 800;
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.2;
    /* 言語が変わっても上下の占有幅を一定に保つ設定です */
}

.network-title {
    text-align: center;
    font-size: 1rem;
    margin-bottom: -10px;
    color: var(--primary-cyan);
    letter-spacing: 2px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
}

.flavor-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.9rem;
    color: var(--primary-cyan);
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 20px;
}

.function-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: 4px;
    color: var(--accent-amber);
    text-shadow: 0 0 20px var(--amber-glow);
    line-height: 1.1;
    /* 言語が変わっても上下の占有幅を一定に保つ設定です */
}

.function-title.faucet-title {
    color: var(--title-b);
    text-shadow: 0 0 20px var(--title-b-glow);
}

.function-title.swap-title {
    color: var(--title-hackergreen);
    text-shadow: 0 0 20px var(--title-hackergreen-glow);
}

.function-title.forge-title {
    color: var(--banner-color);
    text-shadow: 0 0 20px var(--banner-color-glow);
}

.function-title.transfer-title {
    color: var(--title-cyberyellow);
    text-shadow: 0 0 20px var(--title-cyberyellow-glow);
}

.subtitle {
    text-align: center;
    color: var(--text-main);
    font-size: 0.95em;
    font-weight: bold;
    margin-bottom: 25px;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
}

.guide-link {
    color: var(--accent-amber);
    font-size: 0.9em;
    text-decoration: underline;
    margin-top: 5px;
    display: inline-block;
}

.footer-link {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 20px;
}

.footer-link a {
    color: #666;
    font-size: 0.8em;
    text-decoration: none;
    font-family: 'Courier New', monospace;
}

/* 最初から隠しておく（非表示にする）ためのルール */
.hidden-init {
    display: none !important;
}

/* カスタムデータ適用時の状態 */
.data-status.active-custom {
    background: rgba(0, 229, 255, 0.2);
    color: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
}

/* 管理者ワープ時のフラッシュ演出 */
body.admin-transition {
    transition: 0.2s;
    background-color: var(--primary-cyan) !important;
}

/* 汎用的な非表示クラス */
.is-hidden {
    display: none !important;
}

/* 汎用的な表示クラス（モーダル用など） */
.is-visible {
    display: block !important;
}

/* ==========================================
   言語切り替え制御（看板の隠れんぼルール）
========================================== */

/* 1. まだ言葉が決まっていない最初の瞬間は、チラつき防止のため両方隠す */
body:not(.lang-en):not(.lang-ja) .lang-en,
body:not(.lang-en):not(.lang-ja) .lang-ja {
    display: none !important;
}

/* 2. 日本語モードのときは、英語の文字を隠す */
body.lang-ja .lang-en {
    display: none !important;
}

/* 3. 英語モードのときは、日本語の文字を隠す */
body.lang-en .lang-ja {
    display: none !important;
}

/* 4. 日本語モードのときは、タイトルに日本語フォントを適用して高さを安定させます */
body.lang-ja .page-title,
body.lang-ja .function-title {
    font-family: 'Noto Serif JP', serif;
}

/* 言語看板の行の高さの乱れを防ぐための安全設定です */
.page-title .lang-en,
.page-title .lang-ja,
.function-title .lang-en,
.function-title .lang-ja {
    display: inline-block;
    line-height: inherit;
}