/* =============================================
   BASE STYLES
   ============================================= */

/* ---------- Root Colors ---------- */
:root {
  --darkgreen: #0A1410;
  --green: #3FA36A;
  --lightgrey: #CCCCCC;
  --white: #FFFFFF;

  /* Status Colors */
  --status-pending: var(--lightgrey);
  --status-review: #A4C97F;
  --status-accepted: var(--green);
  --status-rejected: #B84C4C;
}

/* ---------- Global Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

html, body {
  overflow-x: hidden;
  background-color: var(--darkgreen);
  color: var(--white);
}

/* =============================================
   HEADER & NAVIGATION
   ============================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(180deg, #021109 0%, #03130d 100%);
  border-bottom: 1px solid rgba(63, 163, 106, 0.12);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  z-index: 1000;
}

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.logo img {
  height: 100px;
  width: auto;
  display: block;
  filter: brightness(1.05) drop-shadow(0 0 8px rgba(63,163,106,0.15));
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-left  { justify-content: flex-start; }
.nav-right { justify-content: flex-end; }

.nav a {
  color: rgba(255,255,255,0.72);
  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 6px 11px;
  border-radius: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--white) !important;
  background: rgba(63,163,106,0.12);
}

/* ---------- Anmelden / Profil Button ---------- */
.nav .login {
  color: var(--white) !important;
  border: 1.5px solid rgba(63,163,106,0.65);
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.nav .login:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--darkgreen) !important;
}

/* ---------- Admin-Link ---------- */
#adminLink {
  color: #FFD966 !important;
  border: 1.5px solid rgba(255,217,102,0.45);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  display: none;
  transition: all 0.25s ease;
}

#adminLink:hover {
  background: rgba(255,217,102,0.12);
  border-color: rgba(255,217,102,0.8);
}

/* ---------- Logout-Button in Navigation ---------- */
#logoutNavBtn {
  background: transparent;
  color: #E06666;
  border: 1.5px solid rgba(224,102,102,0.5);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

#logoutNavBtn:hover {
  background: rgba(224,102,102,0.15);
  border-color: rgba(224,102,102,0.9);
  color: #ff8888;
}

/* =============================================
   HERO / INDEX PAGE
   ============================================= */

.hero {
  height: 100vh;
  margin-top: 160px;
  background:
    linear-gradient(rgba(10, 28, 20, 0.55), rgba(10, 28, 20, 0.9)),
    url("assets/background.png") center 10% / cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-content {
  z-index: 2;
}

.hero-content h1 {
  font-size: 4rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 1.3rem;
  color: #cfcfcf;
}
/* =============================================
   REGELWERK PAGE
   ============================================= */

.regelwerk {
  background:
    linear-gradient(rgba(10, 28, 20, 0.90), rgba(10, 28, 20, 0.95)),
    url("assets/DOJ.png") center top / cover fixed no-repeat;
  min-height: 100vh;
  color: var(--white);
  padding-top: 25px;
  padding-bottom: 100px;
  display: flex;
  justify-content: center;
}

/* ---------- Regelwerk Container ---------- */
.content-container {
  width: 80%;
  max-width: 1200px;
  background-color: rgba(0, 0, 0, 0.35);
  padding: 50px 70px;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  line-height: 1.75;
  text-align: justify;
  word-spacing: 0.05em;
  hyphens: auto;
  overflow-wrap: break-word;
}

.content-container h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 3rem;
  color: var(--green);
}

.content-container h2 {
  margin-top: 45px;
  margin-bottom: 20px;
  color: var(--green);
  font-size: 1.6rem;
}

.content-container p {
  margin-bottom: 18px;
  color: var(--lightgrey);
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
  overflow-wrap: break-word;
}

.content-container h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 25px;
  background: linear-gradient(90deg, transparent, rgba(63,163,106,0.3), transparent);
}

.stand {
  margin-top: 40px;
  text-align: right;
  color: var(--lightgrey);
  font-style: italic;
}
/* ──────────────── GUIDELINE SEITE ──────────────── */
body.guideline {
  background: 
    linear-gradient(rgba(10, 28, 20, 0.9), rgba(10, 28, 20, 0.95)),
    url("assets/guideline.png") center top / cover fixed no-repeat;
  color: var(--white);
}

/* Inhalt */
body.guideline main {
  display: flex;
  justify-content: center;
  margin-top: -40px; /* Abstand unter Header */
  z-index: 1;
}

.guideline-container {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 50px 70px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  width: 80%;
  max-width: 1200px;
  color: var(--white);
  line-height: 1.7;
}

/* Überschriften */
.guideline-container h1 {
  color: var(--green);
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 40px;
  font-weight: 700;
}

.guideline-container h2 {
  color: var(--green);
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* Text */
.guideline-container p {
  font-size: 1rem;
  color: var(--lightgrey);
  margin-bottom: 1rem;
}

/* =============================================
   PROFILE PAGE
   ============================================= */

body.profile {
  background: linear-gradient(rgba(10, 28, 20, 0.9), rgba(10, 28, 20, 0.95)),
              url("assets/profile.png") center top / cover fixed no-repeat;
  color: var(--white);
}

.profile-content {
  padding-top: 25px;
  display: flex;
  justify-content: center;
}

.profile .content-container {
  background: rgba(0, 0, 0, 0.35);
  padding: 40px 70px;
  border-radius: 10px;
  backdrop-filter: blur(6px);
  max-width: 800px;
  width: 80%;
}

.profile .content-container h1 {
  text-align: center;
  font-size: 3rem;
  color: var(--green);
  margin-bottom: 30px;
}

.logout-btn {
  position: fixed;
  top: 165px;
  right: 60px;
  background: transparent;
  border: 1px solid #00ff9f;
  color: #00ff9f;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  z-index: 2000;
}

.logout-btn:hover {
  background: #00ff9f;
  color: #081410;
}

.profile #charStoryView {
  width: 100%;
  min-height: 200px;
  background: rgba(63,163,106,0.1);
  border: 1px solid rgba(63,163,106,0.3);
  border-radius: 6px;
  color: var(--white);
  padding: 10px;
  resize: none;
}

/* =============================================
   WHITELIST PAGE
   ============================================= */

body.whitelist {
  background: linear-gradient(rgba(10, 28, 20, 0.85), rgba(10, 28, 20, 0.95)),
              url("assets/background.png") center top / cover fixed no-repeat;
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 15px; /* space under header */
}

.whitelist main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15px;
}

.whitelist .content-container {
  width: 90%;
  max-width: 1200px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--green);
  border-radius: 10px;
  padding: 2.5rem;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 4rem;
}

.whitelist .content-container h1 {
  text-align: center;
  font-size: 3rem;
  color: var(--green);
  margin-bottom: 2.5rem;
}

/* ---------- Whitelist Form ---------- */
#whitelistForm h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--green);
}

#whitelistForm .form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

#whitelistForm label {
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--lightgrey);
}

#whitelistForm input,
#whitelistForm textarea,
#whitelistForm select {
  background: rgba(63, 163, 106, 0.1);
  border: 1px solid rgba(63, 163, 106, 0.3);
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--white);
  font-size: 1rem;
  outline: none;
  transition: border 0.2s ease, background 0.2s ease;
}

#whitelistForm input:focus,
#whitelistForm textarea:focus {
  border-color: var(--green);
  background: rgba(63, 163, 106, 0.15);
}

#whitelistForm textarea {
  height: 250px;
  resize: vertical;
}

#charCounter {
  text-align: right;
  font-size: 0.9rem;
  color: var(--lightgrey);
  margin-top: 4px;
}

/* ---------- Questions ---------- */
.frage {
  margin-top: 35px;
  margin-bottom: 25px;
}

.frage h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: var(--green);
}

.frage label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--lightgrey);
  cursor: pointer;
  transition: color 0.2s ease;
}

.frage label:hover {
  color: var(--green);
}

.frage input[type="radio"] {
  accent-color: var(--green);
  margin-right: 6px;
}

/* ---------- Buttons ---------- */
.form-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

#saveBtn,
#submitBtn {
  background-color: transparent;
  border: 2px solid var(--green);
  color: var(--white);
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#saveBtn:hover,
#submitBtn:hover {
  background: var(--green);
  color: var(--darkgreen);
}

/* ---------- Status / Cooldown ---------- */
.wl-locked-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(63, 163, 106, 0.3);
  border-radius: 10px;
  padding: 25px;
  margin-top: 30px;
  text-align: center;
  color: var(--lightgrey);
  backdrop-filter: blur(6px);
}

.wl-locked-box h2 {
  color: var(--green);
  margin-bottom: 10px;
}

.cooldown-box h2 {
  color: #E06666;
}

#cooldown-timer {
  color: #FFD966;
  font-weight: bold;
}
/* =============================================
   ADMIN PAGE
   ============================================= */

body.admin {
  background:
    linear-gradient(rgba(10, 28, 20, 0.92), rgba(10, 28, 20, 0.97)),
    url("assets/background.png") center top / cover fixed no-repeat;
  min-height: 100vh;
  color: var(--white);
}

.admin-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 130px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- Admin Toolbar ---------- */
.admin-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(63,163,106,0.08);
  border: 1.5px solid rgba(63,163,106,0.35);
  color: var(--white) !important;
  text-decoration: none !important;
  padding: 8px 18px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.admin-toolbar-btn:hover {
  background: rgba(63,163,106,0.18);
  border-color: var(--green);
  color: var(--white) !important;
}

/* ---------- Cards ---------- */
.admin-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(63, 163, 106, 0.2);
  border-radius: 12px;
  padding: 28px 32px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.admin-card h2 {
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(63, 163, 106, 0.2);
}

#accessDenied.admin-card {
  color: #E06666;
  font-size: 1.1rem;
  text-align: center;
  padding: 40px;
}

/* ---------- Scrollbarer Tabellencontainer ---------- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
}

/* ---------- Gemeinsame Tabellenstyles ---------- */
#whitelistTable,
#bannedTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.92rem;
}

#whitelistTable th,
#whitelistTable td,
#bannedTable th,
#bannedTable td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#whitelistTable th,
#bannedTable th {
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid rgba(63, 163, 106, 0.25);
  background: rgba(63, 163, 106, 0.06);
}

#whitelistTable td,
#bannedTable td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--lightgrey);
}

#whitelistTable tr:hover td,
#bannedTable tr:hover td {
  background: rgba(63, 163, 106, 0.05);
}

#whitelistTable td[title] {
  cursor: help;
}

/* ---------- Spaltenbreiten Whitelist-Tabelle ---------- */
#whitelistTable th:nth-child(1),
#whitelistTable td:nth-child(1) { width: 13%; } /* Discord-ID */
#whitelistTable th:nth-child(2),
#whitelistTable td:nth-child(2) { width: 11%; } /* Name */
#whitelistTable th:nth-child(3),
#whitelistTable td:nth-child(3) { width: 10%; } /* Geburtsdatum */
#whitelistTable th:nth-child(4),
#whitelistTable td:nth-child(4) { width: 10%; } /* Status */
#whitelistTable th:nth-child(5),
#whitelistTable td:nth-child(5) { width: 22%; } /* Story */
#whitelistTable th:nth-child(6),
#whitelistTable td:nth-child(6) { width: 12%; } /* Ban bis */
#whitelistTable th:nth-child(7),
#whitelistTable td:nth-child(7) { width: 22%; overflow: visible; } /* Aktion */

/* ---------- Status-Badges ---------- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-in_review  { background: rgba(255, 217, 102, 0.15); color: #FFD966; border: 1px solid rgba(255,217,102,0.3); }
.status-accepted   { background: rgba(63, 163, 106, 0.15);  color: #3FA36A; border: 1px solid rgba(63,163,106,0.3); }
.status-rejected   { background: rgba(224, 102, 102, 0.15); color: #E06666; border: 1px solid rgba(224,102,102,0.3); }
.status-banned     { background: rgba(204, 0, 0, 0.15);     color: #ff4444; border: 1px solid rgba(204,0,0,0.3); }

/* ---------- Aktions-Buttons ---------- */
.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow: visible;
  flex-wrap: nowrap;
}

/* Aktion-Spalte nie abschneiden */
td.action-buttons,
td:has(.action-buttons) {
  overflow: visible;
  white-space: nowrap;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.icon-btn:hover          { transform: scale(1.12); background: rgba(255,255,255,0.1); }
.icon-btn.accept:hover   { border-color: var(--green); background: rgba(63,163,106,0.2); }
.icon-btn.reject:hover   { border-color: #E06666;      background: rgba(224,102,102,0.2); }
.icon-btn.ban:hover      { border-color: #ff4444;      background: rgba(204,0,0,0.2); }
.icon-btn.story-btn:hover { border-color: #7eb8f7;     background: rgba(126,184,247,0.15); }

/* ---------- Story Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-box {
  background: #1a2a1e;
  border: 1px solid rgba(63,163,106,0.45);
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(63,163,106,0.25);
  font-size: 1.05rem;
  color: var(--green);
}

.modal-close {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  font-family: inherit;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

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

.modal-body pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: #d4d4d4;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}

/* ---------- Entsperren-Button ---------- */
button.unban {
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

button.unban:hover {
  background: var(--green);
  color: var(--darkgreen);
}

/* ---------- Admin-Log ---------- */
#adminLogBox {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 16px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #aaa;
  line-height: 1.6;
}

#adminLogBox::-webkit-scrollbar       { width: 6px; }
#adminLogBox::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 3px; }
#adminLogBox::-webkit-scrollbar-thumb { background: rgba(63,163,106,0.4);   border-radius: 3px; }

/* ---------- Submit-Button (Whitelist) ---------- */
.submit-btn {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--green);
  color: var(--white);
  padding: 10px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--green);
  color: var(--darkgreen);
}

/* =============================================
   HOW TO PLAY PAGE
   ============================================= */

body.howtoplay {
  position: relative;
  background: linear-gradient(rgba(10, 28, 20, 0.70), rgba(10, 28, 20, 0.85)),
    url("assets/howtoplay.png") center top / cover fixed no-repeat;
  color: #fff;
  overflow-x: hidden;
}

/* green overlay */
body.howtoplay::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 60, 45, 0.55);
  z-index: 0;
}

/* content position */
body.howtoplay main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: 100px !important;
}

/* container */
.howto-container {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 50px 70px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  width: 80%;
  max-width: 1200px;
  color: var(--white);
  line-height: 1.75;
}

/* headings */
.howto-container h1 {
  color: var(--green);
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 40px;
  font-weight: 700;
}

.howto-container h2 {
  color: var(--green);
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* text */
.howto-container p {
  font-size: 1rem;
  color: var(--lightgrey);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* links */
body.howtoplay a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

body.howtoplay a:hover {
  color: #4ECB84;
  text-decoration: underline;
}

/* image */
.howto-image {
  display: block;
  width: calc(100% - 40px);
  margin: 20px auto 10px auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.howto-image:hover {
  transform: scale(1.02);
}

/* lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .hero {
    margin-top: 120px;
    height: calc(100vh - 120px);
  }

  .content-container,
  .howto-container,
  .profile .content-container {
    width: 90%;
    padding: 30px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .howto-container h1 {
    font-size: 2rem;
  }
}
/* =============================================
   SECTION SPACING (Header-Höhe: 110px)
   ============================================= */

.hero,
.regelwerk,
.profile-content,
.whitelist main {
  margin-top: 110px;
}
