/* styles.css */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111;
  color: #f5f5f5;
}

/* ヘッダー共通 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #1e1e1e;
  border-bottom: 1px solid #333;
}

.logo {
  font-weight: bold;
  font-size: 18px;
}

.header-right a {
  margin-left: 16px;
  font-size: 12px;
  color: #ccc;
  text-decoration: none;
}

.header-right a:hover {
  text-decoration: underline;
}

/* ログアウトボタン（バッジ風スタイル） */
.status-logout {
  display: inline-block;
  background-color: #555;
  color: #fff !important; /* リンク色の上書き */
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: bold;
  transition: background-color 0.3s;
}
.status-logout:hover {
  background-color: #777;
}

/* ウェルカム画面用 */
.welcome-container {
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(circle at top, #2d9c5b33, #111 60%);
}

.welcome-inner {
  display: flex;
  max-width: 960px;
  width: 100%;
  gap: 40px;
  align-items: center;
}

/* キャラクター側 */
.character-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4px;
}

.character-image {
  width: 220px;
  height: 220px;
  border-radius: 24px;
  background: #222;
  border: 2px solid #2d9c5b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}

.character-image img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.character-speech {
  background: #1b1b1b;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  position: relative;
  max-width: 260px;
}

.character-speech::after {
  content: "";
  position: absolute;
  left: 40px;
  top: -10px;
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent #1b1b1b transparent;
}

/* ログインカード */
.login-card {
  flex: 1;
  background: #1b1b1b;
  border-radius: 16px;
  padding: 24px 24px 20px;
  border: 1px solid #2a2a2a;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.login-card p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #ccc;
}

.status-line {
  font-size: 13px;
  margin-bottom: 16px;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  margin-left: 8px;
  
  /* ▼ リンクとして使う場合のための追加設定 */
  color: #fff;           /* 文字色を白に */
  text-decoration: none; /* 下線を消す */
  vertical-align: middle;/* 位置調整 */
}

.status-online {
  background: #2d9c5b;
}

.status-offline {
  background: #b03535;
}

/* ▼ ログアウト用に追加（色は濃いグレーに設定） */
.status-logout {
  background: #555;
  transition: background 0.3s;
}
.status-logout:hover {
  background: #777; /* ホバー時に少し明るく */
  text-decoration: none;
}

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

label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

/* 入力欄（emailを追加しました） */
input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #f5f5f5;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: #2d9c5b;
}

input::placeholder {
    color: #aaa;
}

.helper-text {
  font-size: 11px;
  color: #888;
  margin-bottom: 12px;
}

.footer-text {
    /* 著作権表示（© micra.earth）のスタイル */
    margin-top: 20px;
    font-size: 14px;
    color: #aaa; /* 著作権表示の色 */
    display: flex; /* 子要素を横並びにするために flex を適用 */
    align-items: center;
    justify-content: center; /* 中央寄せ */
}

.footer-contact-link {
    /* リンク全体に適用するスタイル */
    margin-left: 10px; /* 著作権表示との間に少しスペースを空ける */
    font-size: 12px; /* 小さな白文字 */
    line-height: 1; /* 行の高さを調整 */
}

.footer-contact-link a {
    /* aタグに適用するスタイル */
    color: white; /* 白文字 */
    text-decoration: none; /* ★下線を消す★ */
    transition: opacity 0.2s;
}

.footer-contact-link a:hover {
    opacity: 0.7; /* ホバーで少し透明にする */
}

/* リセット画面のID表示（左寄せ・白文字） */
.target-id-text {
  text-align: left;
  margin-bottom: 20px;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
  padding-left: 2px;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #2d9c5b;
  color: white;
}

.btn-danger {
  background: #b03535;
  color: white;
}

.btn-secondary {
  background: #333;
  color: #eee;
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* ダッシュボード共通レイアウト */
.layout {
  display: flex;
  height: calc(100vh - 50px);
}

aside {
  width: 220px;
  background: #181818;
  border-right: 1px solid #333;
  padding: 16px 0;
}

.menu-title {
  padding: 0 20px 8px;
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
}

nav a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: #ddd;
  font-size: 14px;
}

nav a:hover {
  background: #232323;
}

main {
  flex: 1;
  padding: 60px 20px 20px;
  overflow: auto;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.server-name {
  font-size: 20px;
  font-weight: bold;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 8px;
}

.badge-online { background: #2d9c5b; }
.badge-offline { background: #b03535; }

.user-info {
  font-size: 14px;
  color: #ccc;
}

.role-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #333;
  font-size: 11px;
}

/* カード */
.cards {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: #1b1b1b;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid #2a2a2a;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p {
  font-size: 16px;
  color: #ccc;
  margin: 0 0 12px;
}

/* メンバー用のキャラメッセージ */
.member-hero {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
  width: 100%;
}

.member-hero .character-image {
  width: 120px;
  height: 120px;
  border-radius: 16px;
}

.member-hero-text {
  font-size: 22px;
}

/* プレイヤー一覧テーブル（簡易） */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  border-bottom: 1px solid #333;
  padding: 6px 4px;
  text-align: left;
}

.table th {
  color: #aaa;
  font-weight: normal;
}

/* スマホ対応ざっくり */
@media (max-width: 768px) {
  .welcome-inner {
    /* デフォルトで横並びになっている要素を、必ず縦並びにする */
    flex-direction: column; 
    gap: 20px; /* 要素間の隙間 */
  }

  /* 横並びの原因となる flex: 1 の指定をモバイルでのみ無効化し、
     幅を100%にして縦に積み重ねるようにする */
  .character-box,
  .login-card {
    flex: none; /* flex: 1 を解除 */
    width: 100%; /* 横幅を100%にする */
    max-width: none;
  }

  /* キャラクター画像のサイズをモバイル向けに縮小（任意） */
  .character-image {
    width: 150px;
    height: 150px;
  }
  
  aside {
    display: none;
  }
  .layout {
    height: auto;
  }
}