:root {
  --bg: #201f1f;
  --panel: #1a1919;
  --text: #eee;
  --accent: #5c53ae;
  --border: #ffffff18;

  --gap: 5vw;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}


.container {
  display: flex;
  min-height: 100vh;
  justify-content: space-between;
  gap: var(--gap)
}


.game-area {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: var(--gap)
}


.history-box {
  width: 80%;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);

  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-box h1 {
  font-size: 1.9em;
  color: var(--accent);
}

.history-box p {
  font-size: 0.95em;
  line-height: 1.7;
  color: #ddd;
}


.index-box {
  position: sticky;
  top: 24px;
  min-width: 200px;
  padding: 20px;

  background: linear-gradient(180deg, #272525, #1f1e1e);
  border: 1px solid #ffffff1a;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

  height: fit-content;
}

.index-box h3 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  font-size: 1.1em;
  color: var(--accent);
  border-bottom: 1px solid #ffffff1a;
}

.index-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.index-box a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95em;
  text-decoration: none;
  color: #ccc;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.index-box a:hover {
  background: rgba(92, 83, 174, 0.15);
  color: #fff;
  transform: translateX(4px);
}

.index-box a.active {
  background: rgba(92, 83, 174, 0.25);
  color: #fff;
}


.content-img {
  width: 100%;
  max-width: 480px;
  margin: 12px auto 24px;
  display: block;

  border-radius: 14px;
  border: 1px solid var(--border);
  background: #111;
  object-fit: cover;
}


@media (max-width: 900px) {
  .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }

  .game-area {
    margin-left: 0;
    flex-direction: column;
    width: 90%;
  }

  .history-box {
    width: 90%;
    order: 2;
    padding: 24px;
  }

  .history-box h1 {
    font-size: 1.5em;
  }

  .index-box {
    width: 90%;
    order: 1;
    position: relative;
    top: 0;
  }
}
