/* ──────────────────────────────────────────────
   GTA SA Fonts
   ────────────────────────────────────────────── */
@font-face {
  font-family: 'Pricedown';
  src: url('fonts/pricedown bl.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Diploma';
  src: url('fonts/Diploma.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'BankGothic';
  src: url('fonts/Bank Gothic Light Regular.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ──────────────────────────────────────────────
   Base
   ────────────────────────────────────────────── */
body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #ffffff;
  font-family: 'Pricedown', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

#container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 1em;
  box-sizing: border-box;
  position: relative;
  overflow-x: hidden;
}

/* ──────────────────────────────────────────────
   Header & Background
   ────────────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 1em;
  box-sizing: border-box;
}

.title {
  font-family: 'Diploma', sans-serif;
  font-size: 3em;
  color: #87A1B4;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
  margin-bottom: 1em;
  text-align: center;
}

.logged-in-bar {
  position: fixed;
  top: 0;
  right: 0;
  font-family: 'BankGothic', sans-serif;
  font-size: 1.1em;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 0.6em 1.5em;
  border-bottom-left-radius: 6px;
}

.logged-in-user {
  color: #87A1B4;
}

.logout-link {
  color: #FF5252;
  text-decoration: none;
  margin-left: 0.8em;
  transition: text-shadow 0.3s;
}

.logout-link:hover {
  text-shadow: 0 0 8px #FF5252;
}

#background-image {
  position: absolute;
  right: 0;
  top: 0;
  height: 40vh;
  width: 60vw;
  background-image: url("images/fDWMLvS.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
  clip-path: polygon(0 0, 100% 0%, 100% 100%, 66% 90%, 27% 48%);
  max-width: 100vw;
}

/* ──────────────────────────────────────────────
   Menu System
   ────────────────────────────────────────────── */
#menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Diploma', sans-serif;
  margin-top: 2em;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.menu-option {
  font-family: 'BankGothic', sans-serif;
  font-size: 2em;
  margin: 0.3em 0;
  color: #87A1B4;
  cursor: pointer;
  position: relative;
  transition: color 0.3s, text-shadow 0.3s;
  display: flex;
  align-items: center;
  width: 100%;
}

.menu-text {
  flex: 1;
  text-align: center;
}

.menu-option::before {
  content: "";
  position: absolute;
  left: -2em;
  top: 50%;
  transform: translateY(-50%);
  width: 2em;
  height: 2em;
  opacity: 0;
  transition: opacity 0.3s;
  background-image: url("images/arrow.png");
  background-size: contain;
  background-repeat: no-repeat;
}

.menu-option:hover::before {
  opacity: 1;
}

.menu-option:hover {
  color: #ffffff;
  text-shadow: 0 0 10px #ffffff;
}

/* ──────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────── */
footer {
  position: relative;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 1em;
  background-color: #000;
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  font-size: 1em;
  opacity: 0.8;
}

/* ──────────────────────────────────────────────
   Tables (shared)
   ────────────────────────────────────────────── */
.table-container {
  overflow-y: auto;
  overflow-x: auto;
  margin: 2em 0;
  width: 100%;
  max-width: 1200px;
}

.mission-table {
  min-width: 600px;
  border-collapse: collapse;
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  text-align: center;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  text-align: center;
}

.mission-table th, .mission-table td,
.data-table th, .data-table td {
  padding: 1em;
  border: 1px solid #87A1B4;
  transition: background 0.3s;
}

.mission-table th, .data-table th {
  background-color: #1b1b1b;
  font-size: 1.2em;
}

.mission-table tr, .data-table tr {
  cursor: pointer;
}

.mission-table tr:hover, .data-table tr:hover {
  background-color: #333;
  color: #ffffff;
}

.status.active {
  color: #00FF00;
}

.status.inactive {
  color: #FF0000;
}

/* Highlighted user row */
.highlight-user {
  background-color: rgba(135, 161, 180, 0.15) !important;
  border-left: 3px solid #87A1B4;
}

.highlight-user td {
  color: #ffffff !important;
}

.your-rank-section {
  margin-top: 1.5em;
  border-top: 1px solid #333;
  padding-top: 1em;
}

.your-rank-label {
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 0.5em;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 1.5em;
}

/* Clickable player names in tables */
.player-link {
  color: #87A1B4;
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

.player-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(135, 161, 180, 0.5);
}

/* Custom Scrollbar */
.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #1b1b1b;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

/* ──────────────────────────────────────────────
   Mission Details
   ────────────────────────────────────────────── */
.mission-details {
  background-color: #1b1b1b;
  padding: 2em;
  margin-top: 2em;
  border-radius: 8px;
  width: 100%;
  max-width: 800px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
  font-family: 'BankGothic', sans-serif;
}

.mission-details h2 {
  font-size: 2em;
  color: #87A1B4;
  text-align: center;
  margin-bottom: 1em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.mission-details h3 {
  text-align: center;
  margin-bottom: 0.4em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.mission-details p {
  font-size: 1.2em;
  line-height: 1.5em;
  margin: 0.5em 0;
}

.mission-details p strong {
  color: #87A1B4;
}

/* ──────────────────────────────────────────────
   Content Box (reusable detail section)
   ────────────────────────────────────────────── */
.content-box {
  background-color: #1b1b1b;
  padding: 2em;
  margin-top: 2em;
  border-radius: 8px;
  width: 100%;
  max-width: 900px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
  font-family: 'BankGothic', sans-serif;
}

.content-box h2 {
  font-size: 2em;
  color: #87A1B4;
  text-align: center;
  margin-bottom: 1em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.content-box h3 {
  color: #87A1B4;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.content-box p {
  font-size: 1.1em;
  line-height: 1.6em;
  margin: 0.4em 0;
  color: #ccc;
}

.content-box p strong {
  color: #87A1B4;
}

/* ──────────────────────────────────────────────
   Profile Table
   ────────────────────────────────────────────── */
.profile-table {
  width: 100%;
  max-width: 800px;
  border-collapse: collapse;
  font-family: 'BankGothic', sans-serif;
  color: #87A1B4;
  margin: 1em auto;
}

.profile-table td {
  padding: 0.8em 1em;
  border: 1px solid #333;
}

.profile-table tr:hover {
  background-color: #1b1b1b;
}

.profile-table .attributes {
  background-color: #1b1b1b;
  font-weight: bold;
  width: 30%;
  color: #87A1B4;
}

/* ──────────────────────────────────────────────
   Rank Colors
   ────────────────────────────────────────────── */
.rank-player     { color: #87A1B4; }
.rank-retired    { color: #888888; }
.rank-moderator  { color: #4FC3F7; }
.rank-admin      { color: #81C784; }
.rank-head-admin { color: #FFD54F; }
.rank-manager    { color: #FF8A65; }
.rank-owner      { color: #FF5252; }
.rank-developer  { color: #CE93D8; }

/* ──────────────────────────────────────────────
   Online Indicator
   ────────────────────────────────────────────── */
.online-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.5em;
}

.online-dot.online {
  background-color: #00FF00;
  box-shadow: 0 0 6px #00FF00;
}

.online-dot.offline {
  background-color: #FF0000;
  box-shadow: 0 0 6px #FF0000;
}

/* ──────────────────────────────────────────────
   GTA SA Forms
   ────────────────────────────────────────────── */
.gta-form {
  width: 100%;
  max-width: 600px;
  margin: 1em auto;
  font-family: 'BankGothic', sans-serif;
}

.gta-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 1em;
  align-items: flex-end;
}

.gta-form-group {
  flex: 1;
  min-width: 120px;
}

.gta-form-group label {
  display: block;
  color: #87A1B4;
  font-size: 0.9em;
  margin-bottom: 0.3em;
  font-family: 'BankGothic', sans-serif;
}

.gta-input, .gta-select {
  width: 100%;
  padding: 0.6em 0.8em;
  background-color: #1b1b1b;
  border: 1px solid #87A1B4;
  color: #ffffff;
  font-family: 'BankGothic', sans-serif;
  font-size: 1em;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.gta-input:focus, .gta-select:focus {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(135, 161, 180, 0.5);
}

.gta-input::placeholder {
  color: #555;
}

.gta-select option {
  background-color: #1b1b1b;
  color: #ffffff;
}

.gta-submit {
  padding: 0.6em 2em;
  background-color: transparent;
  border: 2px solid #87A1B4;
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.gta-submit:hover {
  background-color: #87A1B4;
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 15px rgba(135, 161, 180, 0.5);
}

.gta-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  cursor: pointer;
}

.gta-checkbox input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
  accent-color: #87A1B4;
}

/* Error/success messages */
.gta-error {
  color: #FF0000;
  font-family: 'BankGothic', sans-serif;
  text-align: center;
  margin: 0.5em 0;
}

.gta-success {
  color: #00FF00;
  font-family: 'BankGothic', sans-serif;
  text-align: center;
  margin: 0.5em 0;
}

.no-data {
  color: #87A1B4;
  font-family: 'BankGothic', sans-serif;
  text-align: center;
  font-size: 1.2em;
  margin: 2em 0;
}

/* ──────────────────────────────────────────────
   Filter Bar (for stats pages)
   ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin: 1.5em 0;
  width: 100%;
  max-width: 1200px;
}

.filter-bar .gta-form-group {
  min-width: 140px;
  max-width: 200px;
}

/* Stats result container */
#stats-results {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Side-by-side tables for large result sets */
.stats-split {
  display: flex;
  gap: 2em;
  width: 100%;
}

.stats-split .data-table {
  flex: 1;
  min-width: 0;
}

/* ──────────────────────────────────────────────
   Sub-menu layout (stats, tools)
   ────────────────────────────────────────────── */
.sub-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2em;
  width: 100%;
}

.sub-menu ul {
  max-width: 600px;
}

/* ──────────────────────────────────────────────
   Admin Team Cards
   ────────────────────────────────────────────── */
.team-section {
  width: 100%;
  max-width: 800px;
  margin: 1.5em 0;
}

.team-section h2 {
  font-family: 'Diploma', sans-serif;
  font-size: 1.8em;
  color: #87A1B4;
  text-align: center;
  margin-bottom: 0.8em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
}

.team-member {
  background-color: #1b1b1b;
  padding: 1em 1.5em;
  border: 1px solid #333;
  font-family: 'BankGothic', sans-serif;
  text-align: center;
  min-width: 150px;
}

.team-member .name {
  font-size: 1.2em;
  color: #ffffff;
  margin-bottom: 0.3em;
}

.team-member .rank {
  font-size: 0.9em;
  margin-bottom: 0.3em;
}

/* ──────────────────────────────────────────────
   Update Log
   ────────────────────────────────────────────── */
.update-entry {
  background-color: #1b1b1b;
  padding: 1.2em;
  margin-bottom: 1em;
  border-left: 3px solid #87A1B4;
  font-family: 'BankGothic', sans-serif;
}

.update-entry .update-date {
  color: #87A1B4;
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

.update-entry .update-text {
  color: #ccc;
  font-size: 1em;
  line-height: 1.5;
}

/* ──────────────────────────────────────────────
   Toy Images
   ────────────────────────────────────────────── */
.toy-image {
  width: 64px;
  height: 64px;
  vertical-align: middle;
  margin-left: 0.5em;
}

/* ──────────────────────────────────────────────
   Server Info Grid (live monitor)
   ────────────────────────────────────────────── */
.server-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  margin-top: 1em;
}

.server-info-card {
  background-color: #0a0a0a;
  border: 1px solid #333;
  padding: 1em;
}

.server-info-card .info-label {
  color: #555;
  font-family: 'BankGothic', sans-serif;
  font-size: 0.8em;
  text-transform: uppercase;
  margin-bottom: 0.3em;
}

.server-info-card .info-value {
  color: #87A1B4;
  font-family: 'Diploma', sans-serif;
  font-size: 1.8em;
}

.server-info-card .info-value.info-small {
  font-size: 1.1em;
  font-family: 'BankGothic', sans-serif;
}

/* ──────────────────────────────────────────────
   Radio Player
   ────────────────────────────────────────────── */
.radio-player {
  background-color: #1b1b1b;
  padding: 2em;
  border: 1px solid #333;
  text-align: center;
  max-width: 500px;
  margin: 1em auto;
  font-family: 'BankGothic', sans-serif;
}

.radio-player audio {
  width: 100%;
  margin-top: 1em;
}

.radio-info {
  color: #87A1B4;
  margin-top: 1em;
}

/* ──────────────────────────────────────────────
   UCP Login
   ────────────────────────────────────────────── */
.login-box {
  background-color: #1b1b1b;
  padding: 2em;
  border: 1px solid #333;
  max-width: 400px;
  width: 100%;
  margin: 2em auto;
  font-family: 'BankGothic', sans-serif;
}

.login-box h2 {
  color: #87A1B4;
  text-align: center;
  margin-bottom: 1.5em;
  font-family: 'Diploma', sans-serif;
}

/* ──────────────────────────────────────────────
   UCP Dashboard
   ────────────────────────────────────────────── */
.ucp-welcome {
  text-align: center;
  margin: 1em 0;
}

.ucp-welcome h2 {
  font-family: 'Diploma', sans-serif;
  color: #87A1B4;
  font-size: 2em;
}

.ucp-welcome .username {
  color: #ffffff;
  font-size: 1.2em;
  font-family: 'BankGothic', sans-serif;
}

/* ──────────────────────────────────────────────
   Achievements, Titles, Toys grids
   ────────────────────────────────────────────── */
.item-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin: 1em 0;
}

.item-card {
  background-color: #1b1b1b;
  padding: 1em;
  border: 1px solid #333;
  min-width: 200px;
  max-width: 300px;
  flex: 1;
  font-family: 'BankGothic', sans-serif;
}

.item-card h3 {
  color: #87A1B4;
  font-size: 1.1em;
  margin-bottom: 0.5em;
}

.item-card p {
  color: #ccc;
  font-size: 0.9em;
  margin: 0.2em 0;
}

.item-card .reward {
  color: #00FF00;
  font-size: 0.85em;
  margin-top: 0.5em;
}

/* ──────────────────────────────────────────────
   VIP List
   ────────────────────────────────────────────── */
.vip-badge {
  color: #FFD700;
  font-weight: bold;
}

/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */
@media (max-width: 768px) {
  #container {
    padding: 1em;
  }

  .header {
    flex-direction: column;
    align-items: center;
    padding: 0.5em;
  }

  .title {
    font-size: 2.2em;
    margin-top: 1em;
    text-align: center;
  }

  .table-container {
    width: 100%;
  }

  .mission-table, .data-table {
    font-size: 0.9em;
  }

  .mission-table th, .mission-table td,
  .data-table th, .data-table td {
    padding: 0.6em;
  }

  .menu-option {
    font-size: 1.5em;
  }

  .mission-details, .content-box {
    padding: 1.5em;
  }

  .mission-details h2, .content-box h2 {
    font-size: 1.8em;
  }

  .mission-details p, .content-box p {
    font-size: 1em;
  }

  .stats-split {
    flex-direction: column;
    gap: 1em;
  }

  .server-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    flex-direction: column;
    align-items: center;
  }

  .filter-bar .gta-form-group {
    max-width: 100%;
    width: 100%;
  }

  .gta-form-row {
    flex-direction: column;
  }

  .team-member {
    min-width: 120px;
  }

  .item-card {
    min-width: 100%;
  }

  .login-box {
    margin: 1em;
    padding: 1.5em;
  }

  .profile-table .attributes {
    width: 40%;
  }
}
