/* ======================== */
/* Reset & Base */
/* ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0e0e0e;
  color: #f0f0f0;
  min-height: calc(var(--vh, 1vh) * 100);  /* ✅ allow full content height */
  width: 100vw;
  overflow-x: hidden; /* ✅ prevents horizontal scroll */
  overflow-y: scroll;   /* ✅ enables vertical scroll */
}
html {
  height: auto;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow-x: hidden;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .container {
    flex-direction: column; /* ✅ Only applies on mobile now */
  }

  .content {
    padding: 60px 20px 20px 20px;
    margin-left: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    width: 250px;
    z-index: 1500;
    transition: left 0.3s ease-in-out;
  }

  .sidebar.open {
    left: 0;
  }
}



/* ======================== */
/* Layout Structure */
/* ======================== */
.container {
  display: flex;
  flex-direction: row;
  min-height: calc(var(--vh, 1vh) * 100);
  width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}


/* ======================== */
/* Sidebar */
/* ======================== */
.sidebar {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  flex-shrink: 0;
  background-color: #121212;
  padding: 20px;
  border-right: 1px solid #1f1f1f;
  box-shadow: 2px 0 10px rgba(255, 0, 0, 0.05);
  box-sizing: border-box;
}

/* Header in Sidebar */
.header h1 {
  color: #ff4d4d;
  font-size: 1.8em;
  margin-bottom: 4px;
}

.header p {
  font-size: 0.9em;
  color: #ff9999;
  margin-bottom: 20px;
}

/* Sidebar Navigation */
nav ul {
  list-style: none;
}

nav ul li {
  margin-bottom: 10px;
}

nav ul li a {
  color: #ffcfcf;
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* Hover Effect */
nav ul li a:hover {
  background-color: tomato;
  color: #000000;
}

/* Active Page Button */
nav ul li a.active {
  background-color: #8B0000;
  color: #ffffff;
}

/* ======================== */
/* Main Content Area */
/* ======================== */
.content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
}

.content h2 {
  color: #ff4d4d;
  margin-bottom: 10px;
}

.content p {
  line-height: 1.6;
}

/* ======================== */
/* Race Display Section */
/* ======================== */
.race-button {
  padding: 10px 16px;
  font-size: 1em;
  margin: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: bold;
  border: 2px solid transparent;
}

.race-button:hover {
  background-color: tomato;
  color: #000;
  border-color: tomato;
  box-shadow: 0 0 10px #ff6347aa;
}

#race-detail {
  background-color: #1a1a1a;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 10px;
  color: #f0f0f0;
  margin-top: 20px;
}

#race-detail h3 {
  color: #ff4d4d;
  margin-bottom: 10px;
}

#race-detail p {
  margin: 6px 0;
  line-height: 1.4;
}

/* ======================== */
/* Link Styling */
/* ======================== */
.city-link {
  color: #ff4d4d;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.city-link:hover {
  color: #8B0000;
  text-decoration: underline;
}

.gray-link {
  color: #b0b0b0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.gray-link:hover {
  color: #e3e3e3;
  text-decoration: underline;
}

.blue-link {
  color: #4da6ff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.blue-link:hover {
  color: #3399ff;
  text-decoration: underline;
}

.red-link {
  color: #ff4444;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.red-link:hover {
  color: #cc2222;
  text-decoration: underline;
}

.green-link {
  color: #4dff88;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.green-link:hover {
  color: #00cc66;
  text-decoration: underline;
}

.orange-link {
  color: #ffaa4d;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.orange-link:hover {
  color: #ff8800;
  text-decoration: underline;
}

.yellow-link {
  color: #ffaa4d;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.yellow-link:hover {
  color: #ffe600;
  text-decoration: underline;
}

.purple-link {
  color: #cd73fa;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.purple-link:hover {
  color: #e2a8ff;
  text-decoration: underline;
}

/* ======================== */
/* Race Faction Coloring */
/* ======================== */
.good-race {
  background-color: #113311;
  color: #33ff33;
  border-color: #33ff33;
}
.good-race:hover {
  background-color: #44ff44;
  color: #000;
  border-color: #66ff66;
}

.evil-race {
  background-color: #220000;
  color: #ff4444;
  border-color: #ff4444;
}
.evil-race:hover {
  background-color: #cc2222;
  color: #000;
  border-color: #ff6666;
}

.neutral-race {
  background-color: #111;
  color: #ccc;
  border-color: #888;
}
.neutral-race:hover {
  background-color: #333;
  color: #fff;
  border-color: #aaa;
}

/* ======================== */
/* Race Header & Key Legend */
/* ======================== */
.races-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.race-key-inline {
  display: flex;
  gap: 12px;
  font-size: 0.9em;
}

.key-box {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 3px;
}

.key-label {
  margin-right: 10px;
  color: #ccc;
}

.good-box {
  background-color: #4dff88;
}

.evil-box {
  background-color: #ff4d4d;
}

.neutral-box {
  background-color: #333;
}

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  background-color: #121212;
  padding: 10px;
  border-bottom: 1px solid #1f1f1f;
}

.menu-toggle {
  font-size: 24px;
  cursor: pointer;
  color: #ff4d4d;
}

.mobile-title {
  font-weight: bold;
  color: #fff;
  font-size: 1em;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    width: 250px;
    background-color: #121212;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .content {
    padding: 20px;
    margin-left: 0;
  }
}

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: #121212;
  color: white;
  padding: 10px 20px;
  z-index: 2000;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  color: #ff4d4d;
}

.mobile-title {
  font-size: 16px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    width: 250px;
    background-color: #121212;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .content {
    padding: 60px 20px 20px 20px;
    margin-left: 0;
  }
}

.beginners-guide {
  padding: 20px;
  max-width: 900px;
  margin: auto;
}

.beginner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.beginner-box {
  background: #1f1f1f;
  border: 1px solid #3f3f3f;
  color: #ffe37d;
  text-align: center;
  padding: 15px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
}

.beginner-box:hover {
  background: #2a2a2a;
  transform: scale(1.03);
  cursor: pointer;
}

.beginner-content-box {
  margin-top: 30px;
  background: #1a1a1a;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 10px;
  color: #ddd;
  font-size: 1rem;
  line-height: 1.6;
}

.item-filters {
  margin-bottom: 15px;
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

.item-filters input,
.item-filters select {
  padding: 6px;
  font-size: 1rem;
}

.item-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

.item-table th, .item-table td {
  border: 1px solid #555;
  padding: 6px 8px;
  text-align: center;
  color: #fff;
  will-change: transform;
}

.item-table th {
  background-color: #333;
  color: #ffe37d;
}

.quest-link {
  color: #ffcfcf;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.quest-link:hover {
  color: #e6bebe;
  text-decoration: underline;
}

#quest-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  background-color: #1a1a1a;
  padding: 15px 20px;
  border-radius: 10px;
  border: 1px solid #333;
  margin-bottom: 25px;
}

#quest-filters label {
  font-weight: bold;
  color: #ffe37d;
  font-size: 1rem;
}

#quest-filters select,
#quest-filters button {
  background-color: #121212;
  color: #ffcfcf;
  border: 1px solid #333;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

#quest-filters select:disabled {
  opacity: 0.5;
}

#quest-filters select:hover,
#quest-filters button:hover {
  background-color: #2a2a2a;
  cursor: pointer;
}

#filter-button {
  background-color: #8B0000;
  color: #fff;
  font-weight: bold;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
}

#filter-button:hover {
  background-color: #a50000;
}

.label-red {
  color: #ff4d4d;
}
.zones-map-container {
  height: calc(var(--vh, 1vh) * 90);  /* 90% of actual mobile viewport */
  overflow: auto;
  cursor: grab;
  background: #111;
  margin: 0 auto;          /* ✅ Center horizontally if desired */
  border-radius: 8px;
  padding: 10px;
  max-width: fit-content;  /* Prevents full-page stretch */
}


.zones-map-container.active {
  cursor: grabbing;
  user-select: none;
}

.zone-slice {
  width: 64px;
  height: 64px;
  object-fit: cover;
  outline: 1px solid rgba(87, 87, 87, 0.6); /* thin + subtle */
  box-sizing: border-box;
}


.zone-slice::after {
  display: none;
}
.zone-slice:hover {
  filter: brightness(1.2);
}
.drag-scroll {
  cursor: grab;
  overflow: auto;
  user-select: none;
}

.drag-scroll.dragging {
  cursor: grabbing;
}

.zoom-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.zoom-controls button {
  background: #222;
  color: #fff;
  font-size: 1.2em;
  padding: 5px 10px;
  margin: 2px;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
}

.zoom-controls button:hover {
  background: #444;
}
.map-key-slice {
  pointer-events: none;
  outline: none;
  opacity: 0.85;
  cursor: default;
}
.open-sea-slice {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.map-key-container {
  background: #111;
  color: white;
  border: 1px solid #333;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  grid-column: 1 / span 2; /* Reserved position */
  grid-row: 1 / span 4;
}

.map-key-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-key-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #cfcfcf;
  cursor: pointer;
}

.map-key-panel input[type="checkbox"] {
  transform: scale(1.1);
  accent-color: #4db8ff;
}

.map-key-panel h3 {
  margin-bottom: 8px;
  font-size: 16px;
  color: #ff4d4d;
}

.zone-map-grid {
  display: grid;
  grid-template-columns: repeat(16, 64px);
  grid-template-rows: repeat(14, 64px); /* Add row definition */
  gap: 0;
  width: max-content;
  height: max-content;
  position: relative;
}

.zone-slice, .map-key-slice {
  width: 64px;
  height: 64px;
  object-fit: cover;
  box-sizing: border-box;
}

#interactive-zone-map {
  transition: transform 0.15s ease;
}
.zone-tile-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
}

.zone-label {
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  transform: translateY(-50%);
  text-align: center;
  font-size: 9px;
  font-weight: regular;
  color: #fff;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  padding: 3px 6px;  
  text-shadow:
    -1px -1px 2px #000,
     1px -1px 2px #000,
    -1px  1px 2px #000,
     1px  1px 2px #000;             /* ✅ Adds breathing room around text */
  border-radius: 4px;             /* Optional: slightly rounded corners */
  pointer-events: none;
  user-select: none;
  text-transform: capitalize;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
  max-height: 100%;
  overflow: hidden;
}


.zone-label.good-zone {
  color: #4dff88;
}

.zone-label.evil-zone {
  color: #ff4d4d;
}

.zone-label.neutral-zone {
  color: #ffd59e;
}

.page-labels {
  color: #ffe37d;
  font-weight: bold;
  display: inline-block;
  min-width: 100px; /* optional: aligns values nicely */
}
.developer-page {
  background-color: #1a1a1a;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 10px;
  color: #f0f0f0;
  max-width: 700px;
  margin: auto;
}

.developer-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.developer-buttons button {
  background: #8B0000;
  color: white;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.developer-buttons button:hover {
  background-color: #a50000;
}

.quest-report-form label {
  display: block;
  margin-bottom: 10px;
}

.quest-report-form input,
.quest-report-form select,
.quest-report-form textarea {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
  background-color: #121212;
  border: 1px solid #333;
  color: #fff;
  border-radius: 4px;
  font-family: inherit;
}
.item-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border: 1px solid #444; /* Outer border */
}

.item-results-table th,
.item-results-table td {
  border: 1px solid #444; /* Grid lines */
  padding: 6px 10px;
  text-align: center;
}

.item-results-table th {
  background-color: #222;
  color: #ffa94d;
}

.item-results-table tr:nth-child(even) {
  background-color: #1a1a1a;
}

.item-results-table td:first-child {
  text-align: left;
}

.item-results-table td:last-child {
  white-space: normal;
  line-height: 1.5;
  text-align: left;
}

.item-results-table td div {
  margin-bottom: 2px;
}

/* Optional: row hover effect */
.item-results-table tr:hover {
  background-color: #2a2a2a;
}
.item-results-table td.item-name {
  color: #c084fc; /* Light purple */
  font-weight: bold;
  text-align: left;
}
.stat-strength {
  color: #6ecdf6; /* Light Blue */
}

.stat-stamina {
  color: #f87171; /* Red */
}

.stat-agility {
  color: #facc15; /* Yellow */
}

.stat-dexterity {
  color: #f472b6; /* Pink */
}

.stat-wisdom {
  color: #fb923c; /* Orange */
}

.stat-intelligence {
  color: #34d399; /* Green */
}

.stat-charisma {
  color: #e879f9; /* Magenta */
}
.stat-hot {
  color: #34d399; /* Light Blue (HoT) */
}

.stat-pot {
  color: #6c5ce7; /* Light Pink (PoT) */
}
.stat-damage {
  color: #FFC107; /* Light Pink (PoT) */
}
.stat-ac {
  color: #a78bfa; /* Light Pink (PoT) */
}
.developer-form input,
.developer-form select,
.developer-form textarea {
  width: 100%;
  margin: 6px 0 12px;
  padding: 6px;
  background-color: #1e1e1e;
  color: #f0f0f0;
  border: 1px solid #444;
  border-radius: 4px;
}

.developer-form button {
  background-color: #c45252;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.developer-form button:hover {
  background-color: #a63e3e;
}

/* 🔄 Updated Input Styling for All Forms */
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  background-color: #1a1a1a;
  color: #f0f0f0;
  border: 1px solid #333;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, background-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #666;
  background-color: #222;
}

/* 🧾 Label-aligned DevAuth Row */
.dev-auth-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dev-auth-row label {
  width: 80px;
  color: #ccc;
  font-weight: bold;
  text-align: right;
}
/* ✅ Developer Tool Buttons */
#dev-auth-box button,
#quest-report-form button {
  background-color: #8B0000;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  width: 100%;
  transition: background 0.2s, transform 0.2s;
}

#dev-auth-box button:hover,
#quest-report-form button:hover {
  background-color: #a50000;
  transform: scale(1.02);
}
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  background-color: #1a1a1a !important;
  color: #f0f0f0 !important;
  border: 1px solid #333;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  transition: background-color 0.2s ease;
}

/* 🟡 Fix for Chrome autofill turning fields white */
input:-webkit-autofill {
  box-shadow: 0 0 0px 1000px #1a1a1a inset !important;
  -webkit-text-fill-color: #f0f0f0 !important;
}
