:root {
  --portal-bg: #0f1015;
  --portal-surface: rgba(255, 255, 255, 0.05);
  --portal-surface-strong: rgba(255, 255, 255, 0.08);
  --portal-line: rgba(255, 255, 255, 0.1);
  --portal-text: #f4f6fb;
  --portal-muted: rgba(244, 246, 251, 0.72);
  --portal-accent: #ffb03a;
  --portal-accent-2: #7bd4ff;
  --portal-green: #9dd641;
  --portal-blue: #4eb7f0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-width: 1080px;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 176, 58, 0.16), transparent 22%),
    linear-gradient(180deg, #161720 0%, #0f1015 100%);
  color: var(--portal-text);
}

body {
  overflow-x: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.portal-container {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.portal-header__bar {
  height: 3px;
  background: linear-gradient(90deg, #fff1b3 0%, #ff8d3b 100%);
}

.portal-header__surface {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 14, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-header__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  min-height: 92px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.portal-brand img {
  width: auto;
  height: 62px;
  object-fit: contain;
}

.portal-brand__copy strong,
.portal-brand__copy span {
  display: block;
}

.portal-brand__copy strong {
  font-size: 18px;
}

.portal-brand__copy span {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.portal-main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-main-nav a {
  padding: 12px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.portal-main-nav a:hover,
.portal-main-nav a:focus-visible,
.portal-main-nav a.is-current {
  background: rgba(255, 176, 58, 0.14);
  color: #fff;
  outline: none;
}

.portal-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-pill,
.portal-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.portal-pill {
  gap: 8px;
}

.portal-pill img {
  width: 13px;
  height: 13px;
}

.portal-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
}

.portal-mega {
  display: none;
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-mega.is-open {
  display: block;
}

.portal-mega__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 20px;
  padding: 22px 0 28px;
}

.portal-mega__column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.portal-mega__column a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  text-align: center;
}

.portal-mega__column a:hover,
.portal-mega__column a:focus-visible {
  color: #ffcf74;
  outline: none;
}

.portal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(123, 212, 255, 0.2), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(255, 176, 58, 0.18), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.portal-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 46px 44px;
}

.portal-hero__eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--portal-accent-2);
}

.portal-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
}

.portal-hero p {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--portal-muted);
  font-size: 16px;
  line-height: 1.8;
}

.portal-hero__meta {
  display: grid;
  gap: 14px;
}

.portal-stat {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--portal-line);
}

.portal-stat strong,
.portal-stat span {
  display: block;
}

.portal-stat strong {
  font-size: 15px;
}

.portal-stat span {
  margin-top: 8px;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.7;
}

.portal-main {
  padding: 22px 0 46px;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 22px;
}

.portal-panel {
  border: 1px solid var(--portal-line);
  border-radius: 24px;
  background: var(--portal-surface);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

.portal-panel__head {
  padding: 24px 24px 0;
}

.portal-panel__head h2 {
  margin: 0;
  font-size: 24px;
}

.portal-panel__head p {
  margin: 10px 0 0;
  color: var(--portal-muted);
  line-height: 1.7;
}

.portal-board {
  padding: 22px 24px 24px;
}

.portal-board-list {
  display: grid;
  gap: 12px;
}

.portal-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.portal-post:hover,
.portal-post:focus-visible {
  border-color: rgba(255, 176, 58, 0.22);
  outline: none;
}

.portal-post__title {
  font-size: 17px;
  font-weight: 700;
}

.portal-post__summary {
  margin-top: 8px;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.7;
}

.portal-post__date {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  white-space: nowrap;
}

.portal-detail {
  margin-top: 18px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.portal-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #ffd699;
  font-size: 12px;
}

.portal-detail h3 {
  margin: 10px 0 12px;
  font-size: 28px;
}

.portal-detail p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.9;
  white-space: pre-wrap;
}

.portal-side {
  display: grid;
  gap: 18px;
}

.portal-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--portal-line);
}

.portal-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.portal-card p,
.portal-card li {
  color: var(--portal-muted);
  line-height: 1.8;
}

.portal-card ul {
  margin: 0;
  padding-left: 18px;
}

.portal-card .portal-action {
  margin-top: 14px;
}

.portal-action,
.portal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
}

.portal-action {
  background: linear-gradient(135deg, var(--portal-accent), #ff8c30);
  color: #271500;
  font-weight: 800;
}

.portal-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-chip {
  background: rgba(255, 255, 255, 0.08);
  color: #fff2d2;
}

.portal-faq-list {
  padding: 20px 24px 24px;
  display: grid;
  gap: 14px;
}

.portal-faq {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.portal-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 700;
}

.portal-faq summary::-webkit-details-marker {
  display: none;
}

.portal-faq__body {
  padding: 0 20px 18px;
  color: var(--portal-muted);
  line-height: 1.8;
}

.portal-ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 24px 0;
}

.portal-ranking-tabs a {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.portal-ranking-tabs a.is-current,
.portal-ranking-tabs a:hover,
.portal-ranking-tabs a:focus-visible {
  color: #15100b;
  background: linear-gradient(135deg, #ffd170, #ffb03a);
  outline: none;
}

.portal-ranking-table {
  padding: 20px 24px 24px;
}

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

.portal-ranking-table th,
.portal-ranking-table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.portal-ranking-table th {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 700;
}

.portal-ranking-table td {
  font-size: 14px;
}

.portal-ranking-table tbody tr:first-child td {
  color: #ffd37b;
}

.portal-auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  margin-top: 22px;
}

.portal-form {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.portal-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-form label {
  display: grid;
  gap: 8px;
}

.portal-form label span {
  font-size: 14px;
  color: #fff2d2;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
}

.portal-form textarea {
  min-height: 180px;
  resize: vertical;
}

.portal-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.portal-form__status {
  color: #ffd483;
  font-size: 14px;
}

.portal-form__inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.portal-session {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-footer {
  margin-top: 24px;
  padding: 24px 0 40px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

@media (max-width: 1180px) {
  html,
  body {
    min-width: 0;
  }

  .portal-container {
    width: calc(100vw - 24px);
  }

  .portal-header__inner,
  .portal-hero__inner,
  .portal-grid,
  .portal-auth-wrap,
  .portal-form__row {
    grid-template-columns: 1fr;
  }

  .portal-header__inner {
    padding: 18px 0;
  }

  .portal-main-nav {
    flex-wrap: wrap;
  }

  .portal-header__actions {
    flex-wrap: wrap;
  }

  .portal-mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .portal-mega__grid {
    grid-template-columns: 1fr;
  }

  .portal-main-nav {
    gap: 8px;
  }
}
