:root {
  --bg: #0b1220;
  --card: #121b2d;
  --text: #e9eef8;
  --muted: #a9b4c7;
  --line: #22304b;
  --btn: #1e2a44;
  --btnHover: #2a3a5c;
  --danger: #ff4d4d;
}

* { box-sizing: border-box; }

/* Dark mode scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--bg);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--bg);
}

*::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #2a3a5c;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

h1 { margin: 0 0 6px 0; font-size: 22px; }
h2 { margin: 0 0 10px 0; font-size: 16px; }
.muted { color: var(--muted); }

label { display:block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e1626;
  color: var(--text);
}

button {
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--btn);
  color: var(--text);
  cursor: pointer;
}
button:hover { background: var(--btnHover); }

.alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--danger);
  color: var(--text);
  background: rgba(255,77,77,0.08);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

a { color: var(--text); }
a.link { text-decoration: none; color: var(--muted); }
a.link:hover { color: var(--text); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #0c1426;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand { font-weight: 700; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-username {
  color: var(--muted);
  font-size: 13px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  margin-right: 4px;
}

.topbar-btn {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--btn);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--line);
  transition: all 0.2s;
}

.topbar-btn:hover {
  background: var(--btnHover);
  border-color: var(--btnHover);
  color: var(--text);
}
.container { max-width: 980px; margin: 0 auto; padding: 20px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.list { list-style: none; padding: 0; margin: 10px 0 0 0; }
.list-item { padding: 10px 0; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; }
.list-title { font-weight: 600; }

.footer {
  margin-top: 60px;
  padding: 30px 20px;
  border-top: 1px solid var(--line);
  background: #0c1426;
}

.footer-content {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.footer-text {
  font-size: 12px;
  color: var(--muted);
}

.footer-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-top: 4px;
}

.footer-link:hover {
  color: var(--text);
}

.footer-changelog {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  max-height: 150px;
  overflow-y: auto;
}


/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.modal-close:hover {
  background: var(--btn);
  color: var(--text);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.changelog-section {
  margin-bottom: 16px;
}

.changelog-content {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  background: #0e1626;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-btn {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--btn);
  color: var(--text);
  cursor: pointer;
}

.modal-btn:hover {
  background: var(--btnHover);
}
