:root {
  --bg: #121212;
  --panel: #1e1e1e;
  --panel-dark: #181818;
  --text: #e0e0e0;
  --text-dark: #b0b0b0;
  --accent: #cc3d3d;
  --accent-light: #ff6666;
  --accent-blue: #3d85cc;
  --accent-green: #3dcc6a;
  --accent-yellow: #ffcf3d;
  --radius: 12px;
  --shadow: 0 0 15px rgba(0, 0, 0, 0.25);
  --transition: 0.25s ease;
  --font-main: 'Segoe UI', sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
}
h1, h2, h3, h4 {
  color: var(--accent);
  margin-bottom: 0.75rem;
}
p {
  margin-bottom: 0.75rem;
}
a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-light);
}
.container {
  max-width: 1200px;
  margin: 6rem auto 3rem auto;
  padding: 2rem;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card, .loacard, .application-box, .account-section {
  background: var(--panel-dark);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.card h2, .loacard h2 {
  margin-top: 0;
}
header.portal-header {
  background: var(--panel);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.logo-area {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 40px;
  margin-right: 10px;
}
.portal-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 1rem;
}
.nav-links a {
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}
footer {
  background: var(--panel-dark);
  color: var(--text-dark);
  text-align: center;
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
}
button, .btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-red, .delete {
  background: var(--accent);
  color: #fff;
}
.btn-blue, .update {
  background: var(--accent-blue);
  color: #fff;
}
.btn-green, .save {
  background: var(--accent-green);
  color: #fff;
}
.btn-yellow {
  background: var(--accent-yellow);
  color: #000;
}
.btn:hover {
  filter: brightness(1.1);
}
input, select, textarea {
  background: var(--panel-dark);
  color: var(--text);
  border: 1px solid #444;
  padding: 0.5rem;
  border-radius: var(--radius);
  width: 100%;
  margin-bottom: 1rem;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
th, td {
  padding: 0.75rem;
  border: 1px solid #333;
}
th {
  background: var(--panel-dark);
  color: var(--accent-yellow);
}
tr:nth-child(even) {
  background: #181818;
}
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-blue);
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.dashbutton-grid, .loacard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.question-editor, .form-selector, .grade-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.action-cell, .question-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
.success-box {
  background: var(--accent-green);
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.error-box {
  background: var(--accent);
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.lockout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  text-align: center;
}
.lockout-avalanche {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, var(--accent-light), transparent);
}
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  width: 100%;
  height: 100%;
}
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
  }
  .container {
    padding: 1rem;
  }
  .logo-area .portal-title {
    font-size: 1.25rem;
  }
}
