* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --primary: #4f8cff;
  --border: #2a2e36;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header h1 {
  font-size: 18px;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 12px;
  font-size: 14px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.card h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 600;
}

.colleges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.college-card {
  border: 2px solid;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}

.college-name {
  padding: 8px;
  color: #fff;
  font-weight: 600;
}

.college-score {
  font-size: 28px;
  font-weight: 700;
  padding: 12px;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

.wall-item {
  text-align: center;
}

.wall-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #333;
}

.wall-name {
  font-size: 13px;
  margin-top: 4px;
  font-weight: 600;
}

.wall-college {
  font-size: 12px;
}

.message {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.message-info {
  background: #1e3a5f;
}

.message-error {
  background: #5f1e1e;
}

.message-success {
  background: #1e5f2e;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  background: #0f1115;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  margin: 8px 0;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

.winner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}

.winner-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.winner-label {
  font-size: 12px;
  color: var(--muted);
}

.winner-name {
  font-size: 18px;
  font-weight: 700;
}

.winner-college {
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 600px) {
  .colleges-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  margin-top: 8px;
  cursor: pointer;
}

.btn-danger {
  width: 100%;
  padding: 14px;
  background: #b03030;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 16px 0;
}

.identity-card img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #333;
}

.identity-info {
  flex: 1;
}

.identity-name {
  font-size: 20px;
  font-weight: 700;
}

.identity-college {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.identity-email {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  word-break: break-all;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
}

.modal-box h3 {
  margin-bottom: 12px;
}

.modal-box p {
  margin-bottom: 16px;
  color: var(--muted);
}

.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  opacity: 0.06;
  overflow: hidden;
}

.watermark span {
  font-size: 12px;
  transform: rotate(-30deg);
  padding: 40px 20px;
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 15px;
}

.status-alive {
  background: #1e5f2e;
  color: #b8f5c8;
}

.status-eliminated {
  background: #5f1e1e;
  color: #f5b8b8;
}

.status-winner {
  background: #7a5c00;
  color: #ffe9a8;
}

.my-code {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  text-align: center;
  padding: 20px;
  background: #0f1115;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-family: monospace;
}

.my-code.muted {
  color: var(--muted);
  font-size: 18px;
  letter-spacing: 2px;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab {
  padding: 8px 14px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-panel.active {
  display: flex;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.admin-row:last-child {
  border-bottom: none;
}

.admin-name {
  font-weight: 600;
}

.admin-meta {
  font-size: 13px;
  color: var(--muted);
}

.btn-mini {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.btn-mini.btn-warn {
  border-color: #b03030;
  color: #f5b8b8;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.report-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.report-item:last-child {
  border-bottom: none;
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-row button {
  flex: 1;
}

@media (max-width: 600px) {
  .admin-row {
    flex-direction: column;
    align-items: flex-start;
  }
}