/* === Splatoon風フォント（合成）読み込み === */
@font-face {
  font-family: 'Ikamodoki';
  src: url('https://sorute-api.haruto-mori0602.workers.dev/ikamodoki.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'KanjiFont';
  src: url('https://sorute-api.haruto-mori0602.workers.dev/kanji.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'LatinFont';
  src: url('https://sorute-api.haruto-mori0602.workers.dev/latin.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'ExtraFont';
  src: url('https://sorute-api.haruto-mori0602.workers.dev/extra.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* === カラーパレット === */
:root {
  --ink-pink: #ff2d89;
  --ink-green: #39ff14;
  --ink-yellow: #ffe600;
  --ink-blue: #00cfff;
  --ink-purple: #a259ff;
  --ink-black: #1a1a1a;
  --ink-gray: #2c2c2c;
  --ink-white: #fefefe;
}

/* === 全体スタイル === */
body {
  font-family: 'Ikamodoki', 'KanjiFont', 'LatinFont', 'ExtraFont', sans-serif;
  margin: 0;
  display: flex;
  background: linear-gradient(135deg, var(--ink-black), var(--ink-gray));
  color: var(--ink-white);
  min-height: 100vh;
}

/* === サイドバー === */
.sidebar {
  width: 220px;
  background: var(--ink-purple);
  padding: 1.5em;
  height: 100vh;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
}

.sidebar a {
  display: block;
  margin: 1em 0;
  text-decoration: none;
  color: var(--ink-white);
  font-size: 1.1em;
  transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar a:hover {
  color: var(--ink-yellow);
  transform: scale(1.05);
}

/* === メインコンテンツ === */
.main {
  flex: 1;
  padding: 2em;
  position: relative;
  z-index: 0;
  background: url('https://copilot.microsoft.com/th/id/BCO.1cd44756-7e78-4ee9-8b4d-6a0b12031b94.png') no-repeat center center;
  background-size: cover;
}

.main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* === フォーム要素 === */
label {
  display: block;
  margin-top: 1em;
  font-weight: bold;
}

input, select, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 0.5em;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  box-sizing: border-box;
  font-family: inherit;
}

/* === メッセージ表示 === */
.message {
  margin-top: 1em;
  background: rgba(255, 255, 255, 0.1);
  padding: 1em;
  border-left: 5px solid var(--ink-green);
  border-radius: 5px;
}

/* === モーダル === */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--ink-white);
  color: var(--ink-black);
  padding: 2em;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 0 20px var(--ink-pink);
}

.close {
  position: absolute;
  top: 0.5em;
  right: 1em;
  font-size: 1.5em;
  cursor: pointer;
  color: var(--ink-black);
}

/* === ボタン === */
button {
  background-color: var(--ink-pink);
  color: var(--ink-white);
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-family: inherit;
  border-radius: 8px;
  box-shadow: 0 4px #000;
  cursor: pointer;
  transition: transform 0.1s ease;
}

button:hover {
  transform: scale(1.05);
  background-color: var(--ink-yellow);
  color: var(--ink-black);
}

/* === テーブル === */
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1em;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink-white);
}

th, td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  text-align: left;
}

th {
  background-color: rgba(255, 255, 255, 0.2);
}

/* === 戻るボタンなど === */
.back-button {
  margin-bottom: 1em;
  padding: 8px 16px;
  background-color: var(--ink-blue);
  color: var(--ink-white);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease;
}

.back-button:hover {
  background-color: var(--ink-yellow);
  color: var(--ink-black);
}

/* === スマホ対応（レスポンシブ） === */
@media screen and (max-width: 768px) {
  body {
    flex-direction: column;
    font-size: 14px;
    padding: 0;
  }

  .sidebar {
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1em;
    box-shadow: none;
    background: var(--ink-purple);
  }

  .sidebar a {
    flex: 1 1 45%;
    text-align: center;
    margin: 0.5em;
    font-size: 1em;
  }

  .main {
    padding: 1em;
    background-position: center top;
  }

  .filters {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
  }

  .filters label {
    font-size: 14px;
  }

  .ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
  }

  .ranking-tabs button {
    flex: 1 1 45%;
    font-size: 14px;
  }

  table {
    font-size: 13px;
    overflow-x: auto;
    display: block;
  }

  thead {
    display: none;
  }

  table, tbody, tr, td {
    display: block;
    width: 100%;
  }

  tr {
    margin-bottom: 1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5em;
    border-radius: 8px;
  }

  td {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    color: var(--ink-yellow);
    margin-right: 1em;
    flex-shrink: 0;
  }

  .modal-content {
    width: 95%;
    padding: 1em;
  }

  button {
    width: 100%;
    font-size: 15px;
  }
}
