* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Segoe UI", sans-serif;
  background: #0d0d0d;
  background-image: url("https://i.imgur.com/LxJYbU2.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  z-index: 0;
}
header,
.form-card,
.admin-section {
  position: relative;
  z-index: 1;
}
header {
  text-align: center;
  margin-bottom: 40px;
}
header h1 {
  font-size: 2rem;
  color: #c0a060;
  letter-spacing: 2px;
  text-transform: uppercase;
}
header p {
  color: #888;
  margin-top: 8px;
  font-size: 0.95rem;
}
.form-card {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 36px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c0a060;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2e2e2e;
}
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 6px;
}
input[type="text"],
input[type="number"],
input[type="password"],
textarea {
  width: 100%;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e0e0e0;
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
}
input:focus,
textarea:focus {
  border-color: #c0a060;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.divider {
  margin: 28px 0;
  border: none;
  border-top: 1px solid #2e2e2e;
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: #c0a060;
  color: #0d0d0d;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s;
  margin-top: 10px;
}
.btn-submit:hover {
  background: #d4b47a;
}
.admin-section {
  width: 100%;
  max-width: 680px;
  margin-top: 50px;
}
.admin-login {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 28px;
}
.admin-login h2 {
  color: #c0a060;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.admin-login .row {
  align-items: flex-end;
}
.btn-admin {
  padding: 10px 20px;
  background: #333;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-admin:hover {
  background: #444;
}
#applications-panel {
  display: none;
  margin-top: 30px;
}
.app-card {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 16px;
}
.app-card h3 {
  color: #c0a060;
  margin-bottom: 12px;
  font-size: 1rem;
}
.app-card p {
  font-size: 0.88rem;
  color: #bbb;
  margin-bottom: 6px;
  line-height: 1.5;
}
.app-card p span {
  color: #e0e0e0;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.badge-pendiente {
  background: #3a3000;
  color: #f0c040;
}
.badge-aprobado {
  background: #003a10;
  color: #40f080;
}
.badge-rechazado {
  background: #3a0000;
  color: #f04040;
}
.empty-msg {
  text-align: center;
  color: #555;
  padding: 30px;
  font-size: 0.9rem;
}
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #c0a060;
  color: #0d0d0d;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 999;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reproductor ── */
#player {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid #2e2e2e;
  border-radius: 14px;
  padding: 12px 16px;
  width: 300px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
#player .song-title {
  font-size: 0.82rem;
  color: #c0a060;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#player .controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
#player .controls button {
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
#player .controls button:hover {
  color: #c0a060;
}
#player input[type="range"] {
  flex: 1;
  accent-color: #c0a060;
  height: 4px;
  cursor: pointer;
}
#player .volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #888;
}
#player .volume-row input {
  flex: 1;
  accent-color: #c0a060;
}
#playlist {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#playlist.open {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
}
#playlist .track {
  padding: 6px 8px;
  font-size: 0.8rem;
  color: #aaa;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#playlist .track:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}
#playlist .track.active {
  color: #c0a060;
  font-weight: 600;
}

/* Panel eventos admin */
.eventos-admin {
  margin-top: 24px;
  border-top: 1px solid #2e2e2e;
  padding-top: 20px;
}
.eventos-admin h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c9a84c;
  margin-bottom: 16px;
}
.evento-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.evento-form input,
.evento-form textarea {
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.evento-form textarea {
  resize: vertical;
  min-height: 70px;
}
.evento-admin-card {
  background: #111;
  border-left: 3px solid #c9a84c;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.evento-admin-card .info {
  flex: 1;
}
.evento-admin-card .info .titulo {
  font-weight: bold;
  color: #fff;
  font-size: 0.9rem;
}
.evento-admin-card .info .fecha {
  font-size: 0.7rem;
  color: #c9a84c;
  margin-bottom: 4px;
}
.evento-admin-card .info .desc {
  font-size: 0.8rem;
  color: #aaa;
}
.btn-del-evento {
  background: #3a1a1a;
  border: 1px solid #f4433644;
  color: #f44336;
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}
.btn-del-evento:hover {
  background: #f44336;
  color: #fff;
}

/* Contador miembros */
.members-counter {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.counter-box {
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  padding: 16px 28px;
  text-align: center;
  min-width: 120px;
}
.counter-box .num {
  font-size: 2rem;
  font-weight: bold;
  color: #c9a84c;
}
.counter-box .lbl {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}
/* Eventos */
.eventos-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.evento-card {
  background: #111;
  border-left: 3px solid #c9a84c;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
}
.evento-card .evento-fecha {
  font-size: 0.7rem;
  color: #c9a84c;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.evento-card .evento-titulo {
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
}
.evento-card .evento-desc {
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.5;
}
.no-eventos {
  color: #555;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

/* ── Nuevas secciones ── */
.page-sections {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section-card {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.section-card h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c9a84c;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2e2e2e;
}
/* Facciones */
.factions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.faction-card {
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  padding: 18px;
}
.faction-card h3 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 6px;
}
.faction-card .badge {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.faction-card p {
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.5;
}
.faction-card ul {
  margin-top: 8px;
  padding-left: 16px;
}
.faction-card ul li {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 4px;
}
.badge-legal {
  background: #1a3a1a;
  color: #4caf50;
  border: 1px solid #4caf5044;
}
.badge-ems {
  background: #1a2a3a;
  color: #2196f3;
  border: 1px solid #2196f344;
}
.badge-ilegal {
  background: #3a1a1a;
  color: #f44336;
  border: 1px solid #f4433644;
}
/* Discord btn */
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865f2;
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.2s;
}
.discord-btn:hover {
  background: #4752c4;
}
/* IP */
.ip-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
}
.ip-box span {
  font-family: monospace;
  font-size: 1rem;
  color: #c9a84c;
  flex: 1;
}
.ip-box button {
  background: #c9a84c;
  color: #000;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
}
/* FAQ */
.faq-item {
  border-bottom: 1px solid #2e2e2e;
  padding: 12px 0;
  cursor: pointer;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-q {
  font-size: 0.9rem;
  color: #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-a {
  font-size: 0.82rem;
  color: #aaa;
  margin-top: 8px;
  line-height: 1.6;
  display: none;
}
.faq-item.open .faq-a {
  display: block;
}
.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}
.faq-arrow {
  transition: transform 0.2s;
  color: #c9a84c;
}
/* Reglas */
.rules-list {
  list-style: none;
  padding: 0;
}
.rules-list li {
  padding: 8px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.85rem;
  color: #ccc;
  display: flex;
  gap: 10px;
}
.rules-list li:last-child {
  border-bottom: none;
}
.rule-num {
  color: #c9a84c;
  font-weight: bold;
  min-width: 24px;
}

/* Partículas */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

@keyframes shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
.title-shine {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    #8b6914 0%,
    #c9a84c 30%,
    #fff8dc 48%,
    #ffffff 50%,
    #fff8dc 52%,
    #c9a84c 70%,
    #8b6914 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 6s linear infinite;
  margin-bottom: 8px;
}

/* Typing cursor */
.typing-cursor {
  border-right: 2px solid #c9a84c;
  animation: blink 0.7s step-end infinite;
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Validacion campos */
input.valid,
textarea.valid {
  border-color: #4caf50 !important;
}
input.invalid,
textarea.invalid {
  border-color: #f44336 !important;
}
.char-counter {
  font-size: 0.7rem;
  color: #555;
  text-align: right;
  margin-top: 3px;
}
.char-counter.warn {
  color: #f44336;
}

/* Barra progreso envio */
#submitProgress {
  display: none;
  height: 3px;
  background: #2e2e2e;
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
#submitProgressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a84c, #fff8dc);
  transition: width 0.3s;
  border-radius: 2px;
}

/* Boton volver arriba */
#backToTop {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 9999;
  background: #c9a84c;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 2px 10px #0008;
}
#backToTop.visible {
  opacity: 1;
}

/* Seccion sobre el servidor */
.about-card {
  background: linear-gradient(135deg, #1a1a1a, #111);
  border: 1px solid #c9a84c33;
  border-radius: 12px;
  padding: 28px 32px;
  width: 100%;
  max-width: 680px;
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  text-align: center;
}
.about-card h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #c9a84c;
  margin-bottom: 16px;
}
.about-card p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.7;
}
.about-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.about-stat {
  text-align: center;
}
.about-stat .n {
  font-size: 1.8rem;
  font-weight: bold;
  color: #c9a84c;
}
.about-stat .l {
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 900px) {
  #rightPanel,
  [style*="left:12px !important"] {
    display: none !important;
  }
}

/* Cursor personalizado */
* {
  cursor: none !important;
}
#custom-cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition:
    transform 0.1s,
    opacity 0.2s;
}
#custom-cursor .dot {
  width: 8px;
  height: 8px;
  background: #c9a84c;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px #c9a84c;
}
#custom-cursor .ring {
  width: 18px;
  height: 18px;
  border: 1.5px solid #c9a84c88;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: cursorPulse 1.5s ease-in-out infinite;
}
@keyframes cursorPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.2;
  }
}

/* Animacion de entrada */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cuenta regresiva */
.countdown-card {
  background: linear-gradient(135deg, #1a1400, #1a1a1a);
  border: 1px solid #c9a84c66;
  border-radius: 12px;
  padding: 22px 28px;
  width: 100%;
  max-width: 680px;
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  text-align: center;
}
.countdown-card h2 {
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 14px;
}
.countdown-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cd-box {
  background: #111;
  border: 1px solid #c9a84c33;
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 70px;
}
.cd-box .cd-num {
  font-size: 2rem;
  font-weight: 900;
  color: #c9a84c;
  line-height: 1;
}
.cd-box .cd-lbl {
  font-size: 0.6rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}
.countdown-card .apertura-txt {
  color: #888;
  font-size: 0.8rem;
  margin-top: 14px;
}

/* Separador animado */
.divider-anim {
  width: 100%;
  max-width: 680px;
  height: 1px;
  position: relative;
  z-index: 1;
  margin: 4px 0;
  overflow: hidden;
}
.divider-anim::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
  animation: dividerSlide 3s ease-in-out infinite;
}
@keyframes dividerSlide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Hora servidor */
#serverClock {
  font-size: 0.75rem;
  color: #c9a84c;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-family: monospace;
}

/* Mapa */
.map-section {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
  margin-top: 24px;
}
.map-card {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.map-card h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c9a84c;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2e2e2e;
}
.map-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.map-img-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
}
.map-img-wrap img {
  width: 100%;
  border-radius: 10px;
  display: block;
}
.map-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 200px;
}
.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.legend-item:hover {
  background: #111;
  border-color: #c9a84c33;
}
.legend-item.active {
  background: #111;
  border-color: #c9a84c66;
}
.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-top: 3px;
  flex-shrink: 0;
}
.legend-info .legend-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: #e0e0e0;
}
.legend-info .legend-desc {
  font-size: 0.75rem;
  color: #888;
  margin-top: 3px;
  line-height: 1.4;
}
