/* --- 全体設定 --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: #0b0e14;
    color: #ffffff;
    font-family: 'Exo 2', sans-serif, "Helvetica Neue", Arial;
    margin: 0;
    overflow-x: hidden;
}

/* --- メニューエリア --- */
.top-menu {
    position: fixed;
    top: 15px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

#auth-area {
    display: flex;
    align-items: center;
}

.lang-menu {
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid #38bdf8;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: 0.3s;
}

.lang-btn:hover {
    background: #38bdf8;
    color: #000;
}

/* --- ヒーローエリア --- */
header {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0b0e14 100%);
    border-bottom: 1px solid #38bdf866;
}
.hero { text-align: center; }
h1 { font-size: 2.5rem; text-shadow: 0 0 15px #38bdf8; margin-bottom: 10px; }

/* --- ゲームカード一覧 --- */
.game-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 50px 20px;
    flex-wrap: wrap;
}

.game-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 20px;
    width: 280px;
    text-align: center;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2);
}

.card-icon { font-size: 50px; margin-bottom: 10px; }

.play-button {
    display: block;
    background: #38bdf8;
    color: #0b0e14;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 20px;
    transition: 0.2s;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: center;
}
.play-button:hover { opacity: 0.8; }
.play-button:disabled { background: #334155; color: #94a3b8; cursor: not-allowed; }

/* --- モーダル設定 --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #161b22;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #38bdf8;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    animation: modalAnim 0.3s ease-out;
}

@keyframes modalAnim {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
}
.close:hover { color: #fff; }

.tab-menu {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #30363d;
}
.tab-menu button {
    flex: 1;
    background: none;
    border: none;
    color: #94a3b8;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.tab-menu button.active {
    color: #38bdf8;
    border-bottom: 2px solid #38bdf8;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px; /* チェックボックスとの間隔調整 */
    background: #0b0e14;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #fff;
}
.modal-content input:focus {
    border-color: #38bdf8;
    outline: none;
}

/* --- パスワード表示用チェックボックス（Google風） --- */
.show-password-container {
    display: flex;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 20px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    width: fit-content;
}

.show-password-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0; /* 下マージンをリセット */
    cursor: pointer;
    accent-color: #38bdf8; /* チェックボックスの色をテーマカラーに */
}

.show-password-container label {
    font-size: 0.85rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.show-password-container:hover label {
    color: #fff;
}

/* --- パスワードラッパー（余計な装飾を削除） --- */
.password-wrapper {
    position: relative;
    width: 100%;
}

/* ユーザー設定セクション */
.settings-section {
    margin-top: 20px;
}
.settings-label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 8px;
    text-align: left;
}

/* 携帯（スマホ）対応 */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .game-container { gap: 15px; padding: 30px 10px; }
    .game-card { width: 100%; max-width: 320px; }
    #display-username { font-size: 14px; }
    .lang-btn { padding: 5px 8px; font-size: 12px; }
    .modal-content { padding: 20px; margin: 20% auto; }
}
