:root {
  --tera-bg: #020610;
  --tera-ink: #eef5ff;
  --tera-muted: #a9b9d4;
  --tera-soft: #c8d8f2;
  --tera-blue: #1977dc;
  --tera-blue-hot: #3db7ff;
  --tera-blue-deep: #082a65;
  --tera-panel: rgba(5, 9, 19, 0.78);
  --tera-panel-deep: rgba(1, 4, 12, 0.9);
  --tera-line: rgba(122, 166, 232, 0.34);
  --tera-line-hot: rgba(98, 190, 255, 0.84);
  --tera-gold: #d4a85e;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.tera-body {
  margin: 0;
  min-height: 100vh;
  color: var(--tera-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 58% 26%, rgba(65, 126, 255, 0.18), transparent 28%),
    linear-gradient(to bottom, rgba(2, 6, 16, 0.08), rgba(2, 6, 16, 0.86) 76%, rgba(0, 0, 0, 0.98)),
    url('/public/images/site/tera-bg-clean.png') center top / cover no-repeat fixed,
    var(--tera-bg);
  overflow-x: hidden;
}

body.tera-body::before,
body.tera-body::after,
.tera-page-glow {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.tera-body::before {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 45%, transparent 26%, rgba(0, 0, 0, 0.42) 72%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(to right, rgba(0, 0, 0, 0.64), transparent 22%, transparent 76%, rgba(0, 0, 0, 0.74));
}

body.tera-body::after {
  z-index: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, black 30%, transparent 100%);
}

.tera-page-glow {
  z-index: 0;
  background:
    radial-gradient(circle at 19% 12%, rgba(33, 132, 255, 0.22), transparent 12%),
    radial-gradient(circle at 82% 18%, rgba(154, 89, 255, 0.2), transparent 18%);
}

.tera-site-header,
.tera-main,
.tera-footer-bar {
  position: relative;
  z-index: 1;
}

.tera-site-header {
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px 36px 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.tera-logo {
  display: inline-flex;
  flex-direction: column;
  width: max-content;
  text-decoration: none;
  color: #f7fbff;
  line-height: 0.9;
  text-shadow:
    0 0 16px rgba(104, 171, 255, 0.75),
    0 4px 20px rgba(0, 0, 0, 0.9);
}

.tera-logo-main {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 7.1vw, 112px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tera-logo-sub {
  margin-top: 0.24em;
  margin-left: 0.26em;
  color: #d2def3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(13px, 1.55vw, 24px);
  letter-spacing: 0.52em;
  text-transform: uppercase;
}

.tera-main-nav {
  justify-self: end;
  display: flex;
  align-items: stretch;
  min-height: 56px;
  border: 1px solid rgba(134, 171, 230, 0.2);
  background: linear-gradient(to bottom, rgba(5, 10, 22, 0.88), rgba(2, 5, 13, 0.64));
  box-shadow:
    inset 0 0 28px rgba(60, 113, 206, 0.12),
    0 16px 38px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.tera-main-nav a,
.tera-main-nav button {
  position: relative;
  border: 0;
  min-width: 92px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd9f0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.tera-main-nav a:hover,
.tera-main-nav button:hover {
  color: white;
  background: rgba(28, 114, 222, 0.13);
  text-shadow: 0 0 12px rgba(115, 192, 255, 0.95);
}

.tera-main-nav a.is-active,
.tera-main-nav button.is-active {
  color: #65c6ff;
  background: linear-gradient(to bottom, rgba(18, 101, 203, 0.42), rgba(10, 37, 80, 0.26));
  box-shadow:
    inset 0 -2px 0 rgba(43, 186, 255, 0.95),
    inset 0 0 24px rgba(36, 136, 255, 0.18);
  text-shadow: 0 0 14px rgba(92, 190, 255, 0.95);
}

.tera-main-nav form {
  display: contents;
}

.tera-nav-cta {
  margin: 8px 7px;
  min-height: 40px;
  border: 1px solid rgba(129, 167, 223, 0.38) !important;
  background: rgba(4, 9, 20, 0.72) !important;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}

.tera-nav-cta-hot {
  border-color: rgba(118, 195, 255, 0.75) !important;
  background: linear-gradient(to bottom, rgba(26, 102, 211, 0.95), rgba(7, 39, 96, 0.95)) !important;
  color: white !important;
}

.tera-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 72px 36px 104px;
}

.tera-home-grid {
  display: grid;
  grid-template-columns: 330px minmax(420px, 1fr) 330px;
  gap: 32px;
  align-items: center;
  min-height: calc(100vh - 350px);
}

.tera-panel {
  position: relative;
  border: 1px solid var(--tera-line);
  background:
    linear-gradient(135deg, rgba(67, 108, 187, 0.14), transparent 38%),
    linear-gradient(to bottom, var(--tera-panel), var(--tera-panel-deep));
  box-shadow:
    inset 0 0 34px rgba(76, 121, 205, 0.17),
    inset 0 0 1px rgba(255, 255, 255, 0.23),
    0 18px 55px rgba(0, 0, 0, 0.62),
    0 0 34px rgba(40, 96, 190, 0.15);
  backdrop-filter: blur(6px);
}

.tera-panel::before,
.tera-panel::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.tera-panel::before {
  left: -1px;
  top: -1px;
  border-left: 2px solid rgba(114, 188, 255, 0.72);
  border-top: 2px solid rgba(114, 188, 255, 0.72);
}

.tera-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid rgba(114, 188, 255, 0.72);
  border-bottom: 2px solid rgba(114, 188, 255, 0.72);
}

.tera-panel-pad,
.tera-news-panel,
.tera-login-panel {
  padding: 24px;
}

.tera-panel-heading {
  margin-bottom: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(141, 173, 227, 0.22);
  color: #8ed0ff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tera-news-panel {
  align-self: end;
}

.tera-news-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(141, 173, 227, 0.18);
}

.tera-news-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tera-news-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(155, 191, 244, 0.34);
  color: #dce9ff;
  background:
    radial-gradient(circle, rgba(103, 171, 255, 0.28), transparent 48%),
    rgba(1, 5, 14, 0.78);
  box-shadow: inset 0 0 18px rgba(95, 146, 220, 0.22), 0 0 16px rgba(60, 126, 235, 0.22);
  font-size: 24px;
}

.tera-news-icon-gold {
  color: #ffd98d;
  box-shadow: inset 0 0 18px rgba(225, 170, 74, 0.22), 0 0 16px rgba(205, 135, 35, 0.18);
}

.tera-news-icon-steel {
  color: #c8d1df;
}

.tera-news-item h2 {
  margin: 0 0 8px;
  color: #75bfff;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tera-news-item p {
  margin: 0;
  color: #c4cee1;
  font-size: 14px;
  line-height: 1.45;
}

.tera-news-item time {
  display: block;
  margin-top: 10px;
  color: #818faa;
  font-size: 12px;
}

.tera-hero-stage {
  align-self: center;
  text-align: center;
  padding: 80px 24px 52px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
}

.tera-hero-kicker {
  color: #cbd8ef;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.tera-hero-title,
.tera-title {
  margin: 10px 0 0;
  color: #f7fbff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5.4vw, 82px);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(98, 168, 255, 0.78),
    0 4px 22px rgba(0, 0, 0, 0.92);
}

.tera-title {
  font-size: clamp(34px, 4vw, 62px);
}

.tera-rule {
  width: min(520px, 76%);
  height: 1px;
  margin: 24px auto;
  background: linear-gradient(to right, transparent, rgba(155, 198, 255, 0.7), transparent);
  box-shadow: 0 0 10px rgba(88, 174, 255, 0.72);
}

.tera-hero-copy {
  max-width: 700px;
  margin: 0 auto;
  color: #d7e0f2;
  font-size: 17px;
  line-height: 1.65;
}

.tera-hero-actions,
.tera-actions,
.tera-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.tera-hero-actions {
  justify-content: center;
  margin-top: 34px;
}

.tera-actions {
  margin-top: 24px;
}

.tera-button {
  border: 1px solid rgba(149, 204, 255, 0.76);
  min-height: 46px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(to bottom, #2573d6, var(--tera-blue-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 18px rgba(162, 208, 255, 0.32),
    0 0 22px rgba(55, 132, 255, 0.42),
    0 12px 28px rgba(0, 0, 0, 0.48);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.tera-button:hover {
  filter: brightness(1.14);
}

.tera-button-large {
  min-width: 230px;
  min-height: 62px;
  font-size: 17px;
}

.tera-button-secondary {
  background: linear-gradient(to bottom, rgba(31, 47, 82, 0.96), rgba(8, 15, 32, 0.98));
  border-color: rgba(150, 178, 225, 0.44);
  box-shadow:
    inset 0 0 16px rgba(124, 166, 234, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.48);
}

.tera-button-full {
  width: 100%;
}

.tera-form {
  display: grid;
  gap: 16px;
}

.tera-form label {
  display: grid;
  gap: 8px;
  color: #c9d7ee;
  font-size: 13px;
}

.tera-form label > span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tera-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(123, 158, 217, 0.35);
  color: white;
  background: rgba(0, 3, 12, 0.78);
  padding: 0 13px;
  outline: none;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.52);
}

.tera-form input:focus {
  border-color: rgba(143, 202, 255, 0.86);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.52),
    0 0 18px rgba(73, 142, 255, 0.4);
}

.tera-check-row {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
}

.tera-check-row input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--tera-blue);
}

.tera-login-copy {
  color: var(--tera-muted);
  line-height: 1.6;
}

.tera-mini-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  margin: 18px 0 24px;
  padding: 14px;
  border: 1px solid rgba(124, 164, 229, 0.22);
  background: rgba(0, 4, 12, 0.42);
}

.tera-mini-stats span {
  color: var(--tera-muted);
}

.tera-mini-stats strong {
  color: white;
}

.tera-login-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.tera-login-links a,
.tera-link-button {
  border: 0;
  padding: 0;
  color: #83bcff;
  background: none;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.tera-login-links a:hover,
.tera-link-button:hover {
  color: white;
  text-shadow: 0 0 10px rgba(91, 174, 255, 0.8);
}

.tera-logout-form {
  margin-top: 14px;
  text-align: center;
}

.tera-feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 58px;
  margin-left: 350px;
  margin-right: 350px;
}

.tera-feature-card,
.tera-stat-card {
  border: 1px solid rgba(122, 158, 215, 0.26);
  background:
    linear-gradient(135deg, rgba(55, 95, 170, 0.12), transparent 45%),
    rgba(2, 7, 17, 0.66);
  box-shadow: inset 0 0 22px rgba(71, 113, 190, 0.12), 0 14px 34px rgba(0,0,0,0.42);
  backdrop-filter: blur(5px);
}

.tera-feature-card {
  min-height: 154px;
  padding: 24px 18px;
  text-align: center;
}

.tera-feature-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border: 1px solid rgba(112, 184, 255, 0.54);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 150, 255, 0.32), rgba(7, 22, 50, 0.86));
  box-shadow: 0 0 20px rgba(43, 145, 255, 0.25), inset 0 0 14px rgba(170, 216, 255, 0.18);
}

.tera-feature-card h2,
.tera-stat-card h2 {
  margin: 0 0 12px;
  color: #8dc8ff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tera-feature-card p,
.tera-stat-card p,
.tera-stat-card li {
  color: #bdc9df;
  font-size: 14px;
  line-height: 1.55;
}

.tera-dashboard-shell {
  max-width: 1220px;
  margin: 0 auto;
}

.tera-dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 28px;
}

.tera-muted {
  color: var(--tera-muted);
}

.tera-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tera-stat-card {
  min-height: 190px;
  padding: 22px;
}

.tera-alert {
  margin-bottom: 18px;
  border: 1px solid rgba(236, 93, 93, 0.52);
  background: rgba(74, 5, 12, 0.76);
  padding: 12px 14px;
  color: #ffd2d2;
}

.tera-alert-good {
  border-color: rgba(82, 210, 142, 0.52);
  background: rgba(4, 55, 31, 0.76);
  color: #d6ffe8;
}

.tera-alert-warn {
  border-color: rgba(237, 198, 94, 0.52);
  background: rgba(70, 48, 4, 0.76);
  color: #fff0bf;
}

.tera-auth-page {
  min-height: calc(100vh - 300px);
  display: grid;
  place-items: center;
}

.tera-auth-panel {
  width: min(440px, 100%);
}

.tera-auth-title {
  margin-bottom: 24px;
}

.tera-form-large {
  gap: 18px;
}

.tera-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 54px);
  padding: 0 36px;
  border-top: 1px solid rgba(130, 170, 230, 0.28);
  background: linear-gradient(to bottom, rgba(8, 14, 27, 0.92), rgba(1, 4, 11, 0.97));
  box-shadow: 0 -16px 38px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.tera-footer-bar a {
  color: #b9c9e5;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
}

.tera-footer-bar a:hover {
  color: white;
  text-shadow: 0 0 12px rgba(125, 187, 255, 0.95);
}

.tera-footer-status {
  margin-left: auto;
  color: #71e281;
  font-size: 13px;
}

@media (max-width: 1240px) {
  .tera-site-header {
    grid-template-columns: 1fr;
  }

  .tera-main-nav {
    justify-self: stretch;
    overflow-x: auto;
  }

  .tera-home-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tera-hero-stage {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-top: 40px;
  }

  .tera-feature-row {
    margin-left: 0;
    margin-right: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .tera-site-header,
  .tera-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tera-main {
    padding-top: 34px;
  }

  .tera-home-grid,
  .tera-card-grid,
  .tera-feature-row {
    grid-template-columns: 1fr;
  }

  .tera-dashboard-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tera-footer-bar {
    position: static;
    flex-wrap: wrap;
    padding: 16px 18px;
  }

  .tera-footer-status {
    width: 100%;
    margin-left: 0;
  }
}

.tera-character-panel {
  margin-top: 24px;
  padding-top: 8px;
}

.tera-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tera-panel-header h2 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(91, 169, 255, 0.75);
}

.tera-panel-header span {
  color: #9fb7df;
}

.tera-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(104, 154, 230, 0.25);
  background: rgba(2, 6, 16, 0.35);
  box-shadow: inset 0 0 24px rgba(25, 70, 140, 0.22);
}

.tera-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tera-table th,
.tera-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(104, 154, 230, 0.18);
  text-align: left;
  white-space: nowrap;
}

.tera-table th {
  color: #ffffff;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(7, 14, 32, 0.7);
}

.tera-table td {
  color: #cfe0ff;
}

.tera-table tbody tr:hover {
  background: rgba(45, 100, 190, 0.16);
}
