:root {
  --bg-1: #0c0f14;
  --bg-2: #1a2030;
  --accent: #1db954;
  --accent-2: #6ee7b7;
  --text: #f3f5f7;
  --muted: #a7b0be;
  --card: rgba(18, 24, 36, 0.78);
  --card-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

html, body {
  height: 100%;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
}

body {
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(29, 185, 84, 0.12), transparent 60%),
    radial-gradient(900px 700px at 80% 20%, rgba(110, 231, 183, 0.10), transparent 55%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.25;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  padding: 24px;
}

.centered {
  text-align: center;
  padding: 36px 40px;
  max-width: 560px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: lift-in 0.7s ease both;
}

.site-notice {
  text-align: left;
  padding: 18px 18px 14px;
  margin-bottom: 22px;
  background: rgba(255, 163, 59, 0.12);
  border: 1px solid rgba(255, 163, 59, 0.35);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.site-notice-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
  color: #ffd7a1;
  text-transform: uppercase;
}

.site-notice p {
  margin-bottom: 12px;
  color: #f7e9d6;
}

.site-notice p:last-child {
  margin-bottom: 0;
}

.site-notice a {
  color: var(--accent-2);
  text-decoration: none;
}

.site-notice a:hover {
  text-decoration: underline;
}

.site-notice-contact,
.site-notice-thanks {
  font-weight: 600;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 2.6vw, 2.8rem);
  letter-spacing: -0.02em;
}

p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.small-text {
  font-size: 0.95rem;
  margin-top: 16px;
  color: var(--muted);
}

.small-text a {
  color: var(--accent-2);
  text-decoration: none;
}

.small-text a:hover {
  text-decoration: underline;
}

#error-message,
.error-message {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}

.error-message p {
  color: #fecaca;
  margin-bottom: 0;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 12px 26px;
  margin: 8px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn.primary {
  background-color: var(--accent);
  color: #0c0f14;
  box-shadow: 0 10px 25px rgba(29, 185, 84, 0.35);
}

.btn.primary:hover {
  background-color: #18a44b;
  transform: translateY(-1px) scale(1.01);
}

.btn.secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.loading-container {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 12, 18, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-container.active {
  opacity: 1;
  visibility: visible;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  display: inline-block;
  width: 72px;
  height: 72px;
  position: relative;
}

.loading-spinner:after {
  content: " ";
  display: block;
  border-radius: 50%;
  width: 0;
  height: 0;
  margin: 6px;
  box-sizing: border-box;
  border: 30px solid var(--accent);
  border-color: var(--accent) transparent var(--accent) transparent;
  animation: loading-spinner 1.1s infinite;
}

.loading-text {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--text);
}

.admin-table {
  margin-top: 20px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table-scroll {
  max-height: 260px;
  height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.admin-card {
  margin: 14px 0 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-card-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.admin-table th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

@keyframes loading-spinner {
  0% {
    transform: rotate(0);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }
  50% {
    transform: rotate(180deg);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Login form */
.login-form {
  margin: 8px 0 12px;
}

.login-form label {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.login-form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.login-form input[type="email"]:focus {
  border-color: var(--accent);
}

.login-form input[type="email"]::placeholder {
  color: rgba(167, 176, 190, 0.5);
}

/* Contact links */
.contact-links {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.contact-links p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* Admin wide layout */
.centered.wide {
  max-width: 900px;
}

h2 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

/* Admin form */
.admin-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-input {
  flex: 1;
  min-width: 180px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.admin-input:focus {
  border-color: var(--accent);
}

.admin-input::placeholder {
  color: rgba(167, 176, 190, 0.5);
}

.admin-select {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.admin-select option {
  background: var(--bg-2);
  color: var(--text);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.9rem;
}

.btn-del {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-del:hover {
  background: rgba(239, 68, 68, 0.35);
}

@media (max-width: 640px) {
  .centered {
    padding: 28px 22px;
  }

  .centered.wide {
    max-width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  .admin-form {
    flex-direction: column;
  }

  .admin-input,
  .admin-select {
    width: 100%;
  }
}

/* Privacy Policy */
.privacy-page {
  max-width: 720px;
  text-align: left;
}

.privacy-content {
  text-align: left;
}

.privacy-section {
  margin-bottom: 24px;
}

.privacy-section h2 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
}

.privacy-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.privacy-section ul {
  padding-left: 24px;
  margin-bottom: 10px;
}

.privacy-section li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
}

.privacy-section code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
}
