* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: #f4f4f4;
  color: #202124;
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

.site-header {
  background: #ffffff;
  border-bottom: 2px solid #d8d8d8;
}

.brand-row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.brand-mark {
  height: 54px;
  width: auto;
}

.brand-title {
  max-width: min(520px, 72vw);
  height: auto;
}

.site-nav {
  border-top: 1px solid #ececec;
}

.site-nav ul {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 18px 14px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.site-nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #40e0d0;
  color: #111;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.button-link:hover {
  color: #176d66;
  transform: translateY(-1px);
}

.layout {
  width: min(1180px, calc(100% - 36px));
  margin: 26px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.panel {
  background: #ffffff;
  border: 1px solid #dedede;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

.hero {
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  color: #111;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.hero p {
  max-width: 780px;
  margin: 0 auto 24px;
  color: #333;
  font-size: 18px;
  line-height: 1.55;
}

.play-now {
  margin: 26px auto 20px;
  padding: 24px 64px;
  border-radius: 12px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: 1px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.media-section {
  margin-top: 24px;
}

.media-section h2,
.sidebar-section h2,
.sidebar-section h3,
.tools-page h1 {
  margin: 0 0 12px;
  color: #111;
}

.media-section video {
  display: block;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  background: #000000;
  border-radius: 8px;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-section {
  padding-bottom: 18px;
  border-bottom: 1px solid #e1e1e1;
}

.sidebar-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar-section p {
  margin: 8px 0;
  line-height: 1.45;
}

.discord-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.discord-button img {
  width: 22px;
  height: 22px;
}

.details-list {
  margin: 0;
  padding-left: 20px;
}

.details-list li {
  margin: 7px 0;
}

.tools-page {
  width: min(960px, calc(100% - 36px));
  margin: 32px auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tools-grid .button-link {
  min-height: 56px;
  text-align: center;
}

.muted {
  color: #555;
}

.tool-page {
  width: min(1080px, calc(100% - 36px));
  margin: 30px auto 48px;
}

.tool-hero {
  margin-bottom: 18px;
}

.tool-hero h1 {
  margin: 0 0 8px;
  color: #111;
  font-size: clamp(30px, 4vw, 44px);
}

.tool-hero p {
  max-width: 760px;
  margin: 0;
  color: #444;
  font-size: 18px;
  line-height: 1.5;
}

.tool-card {
  margin: 18px 0;
  padding: 24px;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.tool-card-narrow {
  max-width: 560px;
}

.tool-card h2 {
  margin: 0 0 16px;
  color: #111;
  font-size: 26px;
}

.tool-form {
  display: grid;
  gap: 14px;
}

.tool-form-row {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}

.tool-form label,
.tool-choice-group {
  display: grid;
  gap: 6px;
  color: #222;
  font-weight: 700;
}

.tool-form input,
.tool-form select {
  width: 100%;
  min-height: 44px;
  border: 2px solid #222;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: #111;
  font: 16px Arial, sans-serif;
}

.tool-choice-group {
  border: 2px solid #222;
  border-radius: 8px;
  padding: 12px;
}

.tool-choice-group legend {
  padding: 0 8px;
}

.tool-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.tool-radio input {
  width: auto;
  min-height: auto;
}

.button-danger {
  background: #ef6f6c;
}

.tool-alert {
  margin: 16px 0;
  padding: 14px 16px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 700;
}

.tool-alert-success {
  background: #d9f8ef;
}

.tool-alert-error {
  background: #ffe1df;
}

.tool-table-wrap {
  overflow-x: auto;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
}

.tool-table th,
.tool-table td {
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  text-align: left;
  white-space: nowrap;
}

.tool-table th {
  background: #40e0d0;
  color: #111;
}

@media (max-width: 860px) {
  .brand-row {
    flex-direction: column;
    gap: 12px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 20px;
  }

  .play-now {
    width: 100%;
    padding: 22px 20px;
  }

  .tool-form-row {
    grid-template-columns: 1fr;
  }
}
