:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0b1220;
  color: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: #0b1220;
}

button,
select {
  font: inherit;
}

.portal {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.portal-card {
  width: min(100%, 460px);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

#status {
  min-height: 20px;
  margin: 0 0 16px;
  color: #9ca3af;
  font-size: 13px;
}

.actions {
  display: grid;
  gap: 10px;
}

.portal-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.portal-button.user {
  background: #168447;
}

.portal-button.game {
  background: #e56b08;
}

.portal-button.admin {
  background: #2361cc;
}

.portal-button:active {
  transform: translateY(1px);
}

.notice {
  padding: 14px;
  border: 1px solid #e6c45b;
  border-radius: 8px;
  background: #fff3cd;
  color: #654900;
  text-align: center;
}

.notice p {
  margin: 0 0 12px;
}

.language-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 13px;
}

select {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #0b1220;
  color: #e5e7eb;
}

[dir="rtl"] .language-label {
  flex-direction: row-reverse;
}
