/* ===== Reset and Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* Futuristic cyberpunk font */
}

/* ===== General Link Styles ===== */
a {
  color: #00b7eb; /* Neon blue */
  text-decoration: none;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
  transition: all 0.3s ease;
}

a:hover {
  color: #0a0e1a;
  background: #00b7eb;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.9);
  text-decoration: none;
}

/* ===== Body ===== */
body {
  background: #0a0e1a url('https://torabit.org/Themes/Dark/images/bg5.jpg') fixed; /* Replace with actual path to the image */
  background-size: 56%; /* Resized to 80% of the viewport */
  background-position: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  color: #b3e5fc; /* Light neon blue text */
}

/* ===== Header ===== */
header {
  background: rgba(10, 14, 26, 0.85); /* Unified opacity */
  border-bottom: 2px solid #00b7eb;
  padding: 15px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.7);
  backdrop-filter: blur(6px);
}

header h1 {
  font-size: 1.8em;
  color: #00b7eb;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

header marquee {
  color: #b3e5fc;
  font-size: 16px;
  margin-top: 10px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

/* ===== Navigation ===== */
nav {
  background: rgba(10, 14, 26, 0.85);
  padding: 10px;
  display: flex;
  justify-content: center;
  gap: 15px;
  border-bottom: 2px solid #00b7eb;
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.7);
  backdrop-filter: blur(6px);
}

nav a.nav-link {
  font-size: 15px;
  padding: 8px 16px;
  border: 1px solid #00b7eb;
  border-radius: 6px;
}

/* ===== Container ===== */
.container {
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #00b7eb;
  border-radius: 10px;
  padding: 25px;
  max-width: 900px;
  width: 100%;
  margin: 20px auto;
  box-shadow: 0 0 20px rgba(0, 183, 235, 0.7);
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

/* ===== Headings ===== */
h2, .page-title, .news-title {
  color: #00b7eb;
  text-align: center;
  margin-bottom: 20px;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 183, 235, 0.8);
}

.subtitle {
  text-align: center;
  color: #b3e5fc;
  margin-bottom: 30px;
  font-size: 16px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

/* ===== Form Styling ===== */
.form-container {
  text-align: left;
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #b3e5fc;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.form-input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #00b7eb;
  background: rgba(10, 14, 26, 0.85);
  color: #b3e5fc;
  margin-bottom: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #00b7eb;
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.7);
}

.form-checkbox {
  display: flex;
  align-items: center;
  color: #b3e5fc;
  margin-bottom: 15px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.form-checkbox input {
  margin-right: 8px;
  accent-color: #00b7eb;
}

/* ===== Buttons ===== */
button, .btn-submit, .btn-holo {
  background: transparent;
  border: 2px solid #00b7eb;
  color: #00b7eb;
  padding: 10px 20px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.7);
  animation: neon-glow 2s infinite;
}

button:hover, .btn-submit:hover, .btn-holo:hover {
  background: #00b7eb;
  color: #0a0e1a;
  box-shadow: 0 0 20px rgba(0, 183, 235, 0.9);
  transform: translateY(-1px);
}

button:active, .btn-submit:active, .btn-holo:active {
  transform: scale(0.95);
}

.btn-submit {
  background-color: #00b7eb;
  color: #0a0e1a;
  border: none;
}

.btn-submit:hover {
  background-color: #40c4ff; /* Brighter neon blue */
}

.btn-submit:disabled {
  background-color: #4a4a4a; /* Slate gray */
  cursor: not-allowed;
  opacity: 0.65;
}

/* ===== Card Component ===== */
.card {
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #00b7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 183, 235, 0.9);
}

.card h3, .card h4 {
  color: #00b7eb;
  margin-bottom: 10px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

/* ===== Table Styles ===== */
.summary-table, .characters-table, table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  background: rgba(10, 14, 26, 0.7); /* Slightly lighter for tables */
  border: 1px solid #00b7eb;
  border-radius: 8px;
  overflow: hidden;
  animation: neon-glow 2s infinite;
}

.summary-table th, .summary-table td,
.characters-table th, .characters-table td,
table th, table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 183, 235, 0.3);
}

.summary-table th, .characters-table th, table th {
  background: #00b7eb;
  color: #0a0e1a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-table td, .characters-table td, table td {
  color: #b3e5fc;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.3);
}

.characters-table tr:hover, table tr:hover {
  background: rgba(0, 183, 235, 0.2);
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.7);
}

/* ===== News Section ===== */
.news-card {
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #00b7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 183, 235, 0.9);
}

.news-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.news-header h3 {
  color: #00b7eb;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.news-date {
  font-size: 14px;
  color: #b3e5fc;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.news-content p {
  font-size: 15px;
  line-height: 1.5;
  color: #b3e5fc;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.3);
}

/* ===== Server Info Box ===== */
.server-info {
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #00b7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

.server-info .info-title {
  font-size: 1.4em;
  color: #00b7eb;
  margin-bottom: 15px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.server-info .info-list {
  list-style: none;
  padding: 0;
}

.server-info .info-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 183, 235, 0.3);
  color: #b3e5fc;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.3);
}

.server-info .info-list li:last-child {
  border-bottom: none;
}

/* ===== User Info Panel ===== */
.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.user-info .username {
  font-size: 1.2em;
  color: #00b7eb;
  font-weight: 500;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.user-panel-box {
  background: rgba(10, 14, 26, 0.85);
  border-left: 4px solid #00b7eb;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

/* ===== Login Component ===== */
.login {
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #00b7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

.login h3, .login h4 {
  color: #00b7eb;
  margin-bottom: 15px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(10, 14, 26, 0.75);
  padding-top: 50px;
}

.modal-content {
  background: rgba(10, 14, 26, 0.85);
  margin: 5% auto;
  padding: 20px;
  border: 2px solid #00b7eb;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  backdrop-filter: blur(6px);
  animation: neon-glow 2s infinite;
}

.modal-close {
  color: #b3e5fc;
  font-size: 24px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.modal-close:hover {
  color: #00b7eb;
}

/* ===== Footer ===== */
footer {
  background: rgba(10, 14, 26, 0.85);
  color: #b3e5fc;
  padding: 15px;
  text-align: center;
  font-size: 14px;
  border-top: 2px solid #00b7eb;
  box-shadow: 0 0 12px rgba(0, 183, 235, 0.7);
  backdrop-filter: blur(6px);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
  background: #00b7eb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #40c4ff;
}

/* ===== No Data and Loading ===== */
.no-data {
  text-align: center;
  color: #00b7eb;
  font-size: 15px;
  padding: 20px;
  text-shadow: 0 0 6px rgba(0, 183, 235, 0.7);
}

.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.loading::after {
  content: '';
  border: 3px solid rgba(0, 183, 235, 0.3);
  border-top: 3px solid #00b7eb;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* ===== Utility & Class Colors ===== */
.lightpurple { color: #7b68ee; }
.lightblue { color: #40c4ff; }
.lightgreen { color: #00ff7f; }
.red { color: #ff3d3d; }
.darkgreen { color: #008b45; }

.class-warrior { color: #ffa500; }
.class-blader { color: #40c4ff; }
.class-wizard { color: #7b68ee; }
.class-archer { color: #00ff7f; }
.class-shielder { color: #40c4ff; }
.class-fblader { color: #ff3d3d; }
.class-gladiator { color: #ba55d3; }
.class-gunner { color: #ff4500; }
.class-dmage { color: #b0c4de; }
.class-unknown { color: #708090; }

/* ===== Nation Colors ===== */
.nation-neutral { color: #00ff7f; }
.nation-capella { color: #7b68ee; }
.nation-procyon { color: #40c4ff; }
.nation-gm { color: #ff3d3d; }
.nation-unknown { color: #00ff7f; }
.nation-menu {
  background: rgba(10, 14, 26, 0.85);
  padding: 10px; /* Added padding for distinction */
  border: 1px solid #00b7eb;
}

/* ===== Backdrop-Filter Fallback ===== */
@supports not (backdrop-filter: blur(6px)) {
  header, nav, footer, .container, .card, .news-card, .server-info, .login, .modal-content, .user-panel-box, .nation-menu {
    background: rgba(10, 14, 26, 0.9); /* Slightly more opaque */
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  h2, .page-title, .news-title {
    font-size: 24px;
  }

  nav {
    flex-direction: column;
    gap: 10px;
  }

  nav a.nav-link {
    width: 100%;
    text-align: center;
  }

  body {
    background-size: auto; /* Adjust for smaller screens */
    background-position: top center;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 15px;
  }

  button, .btn-submit, .btn-holo {
    padding: 8px 15px;
    font-size: 14px;
  }

  .summary-table th, .summary-table td,
  .characters-table th, .characters-table td,
  table th, table td {
    font-size: 13px;
    padding: 10px;
  }
}

/* ===== Animations ===== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes neon-glow {
  0% { box-shadow: 0 0 8px rgba(0, 183, 235, 0.7); }
  50% { box-shadow: 0 0 18px rgba(0, 183, 235, 0.9); }
  100% { box-shadow: 0 0 8px rgba(0, 183, 235, 0.7); }
}