/* ===========================================
   Cyberian Home Server - Estilos principales
   =========================================== */

/* Reset y base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: #0f1724;
  color: #e6eef8;
}

/* Layout principal */
.main-content {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.container {
  width: 100%;
  max-width: 1200px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 6px 30px rgba(2, 6, 23, 0.6);
  position: relative;
  z-index: 1;
}

/* Título y autor */
h1 {
  font-size: 2.2rem;
  color: #f7fbff;
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
  width: 100%;
}

.title-letters span {
  display: inline-block;
  transform-origin: center;
}

.autor {
  color: rgba(230, 238, 248, 0.75);
  text-align: center;
  margin-bottom: 18px;
}

/* Grid de servicios */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

/* Tarjetas de servicio */
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px;
  border-radius: 14px;
  text-decoration: none;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  min-height: 96px;
  transform-style: preserve-3d;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 0.25s;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.55);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.service::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -50%;
  width: 220%;
  height: 220%;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: rotate(25deg);
  animation: shine 6s linear infinite;
}

.service::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  box-shadow:
    inset 0 10px 30px rgba(0, 0, 0, 0.45),
    inset 0 -6px 18px rgba(255, 255, 255, 0.03);
  mix-blend-mode: multiply;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  100% {
    transform: translateX(100%) rotate(25deg);
  }
}

.service .metal-rim {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(0, 0, 0, 0.12)
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

.service .label {
  font-size: 1.05rem;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 1;
}

.service .desc {
  font-weight: 600;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

/* Colores de servicios */
.service.monitor {
  background: linear-gradient(145deg, #c8ffd0, #6bdc8a, #166732);
  color: #061a10;
}

.service.primary {
  background: linear-gradient(145deg, #bfe6ff, #4aa3ff, #08214a);
  color: #02102a;
}

.service.orange {
  background: linear-gradient(145deg, #ffe6c2, #ffb36b, #4b2200);
  color: #241000;
}

.service.red {
  background: linear-gradient(145deg, #ffd9d9, #ff4b4b, #671616);
  color: #2a0202;
}

.service.minecraft {
  background: linear-gradient(145deg, #c6ffb3, #5cb85c, #1e4620);
  color: #0a1f0c;
}

.service.gallery {
  background: linear-gradient(145deg, #fff0d9, #ffb347, #663300);
  color: #2a1200;
}

.service.fileserver {
  background: linear-gradient(145deg, #fff7d1, #ffd84d, #b8860b);
  color: #2a1a00;
}

.service.romm {
  background: linear-gradient(145deg, #ff9eff, #bd00ff, #4d0080);
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.service.docker {
  background: linear-gradient(145deg, #d4f1ff, #13b5ea, #003d5c);
  color: #001a2a;
}

.service.analytics {
  background: linear-gradient(145deg, #ffe4f0, #ff6bb3, #5c1133);
  color: #2a0014;
}

.service.booklore {
  background: linear-gradient(145deg, #e8d4b8, #8b5a2b, #3d2314);
  color: #1a0f08;
}

.service.sbc {
  background: linear-gradient(145deg, #e6f9ff, #00b4db, #0083b0);
  color: #002a3a;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  text-align: center;
}

.modal-content h2 {
  color: #5cb85c;
  margin-bottom: 16px;
  font-size: 1.8rem;
}

.modal-content .server-name {
  font-size: 1.3rem;
  color: #c6ffb3;
  font-weight: 700;
  background: rgba(92, 184, 92, 0.15);
  padding: 12px 24px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 16px;
  border: 1px solid rgba(92, 184, 92, 0.3);
}

.modal-content img {
  width: 100%;
  border-radius: 12px;
  margin: 16px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 1;
}

/* Estilos específicos del modal Booklore */
.booklore-modal h2 {
  color: #c9a66b;
}

.modal-subtitle {
  color: rgba(230, 238, 248, 0.85);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.credentials-box {
  background: rgba(139, 90, 43, 0.15);
  border: 1px solid rgba(139, 90, 43, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.credentials-box h3 {
  color: #c9a66b;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.credential-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0;
}

.credential-label {
  color: rgba(230, 238, 248, 0.75);
  font-weight: 600;
}

.credential-value {
  background: rgba(0, 0, 0, 0.3);
  color: #c9a66b;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  font-weight: 700;
}

.collaborate-box {
  background: rgba(92, 184, 92, 0.1);
  border: 1px solid rgba(92, 184, 92, 0.25);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.collaborate-box h3 {
  color: #6bdc8a;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.collaborate-box p {
  color: rgba(230, 238, 248, 0.75);
  margin-bottom: 10px;
}

.email-link {
  display: inline-block;
  color: #7fd1ff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  background: rgba(127, 209, 255, 0.1);
  border-radius: 8px;
  transition: background 0.2s;
}

.email-link:hover {
  background: rgba(127, 209, 255, 0.2);
}

.booklore-buttons {
  margin-top: 20px;
}

.romm-modal h2 {
  color: #ff9eff;
  text-shadow: 0 0 15px rgba(255, 158, 255, 0.4);
}

.romm-buttons {
  margin-top: 20px;
}

.mc-button.romm-enter {
  background: linear-gradient(145deg, #ff9eff, #bd00ff, #4d0080);
  color: #fff;
  width: 100%;
  box-shadow: 0 0 20px rgba(189, 0, 255, 0.3);
}

.mc-button.booklore-enter {
  background: linear-gradient(145deg, #e8d4b8, #8b5a2b, #3d2314);
  color: #1a0f08;
  width: 100%;
}

/* SBC Modal Specifics */
.sbc-modal h2 {
  color: #00b4db;
}

.sbc-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.sbc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.sbc-item img {
  height: 56px; /* Ajustado para alinear con el botón */
  width: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin: 0 !important;
}

.mc-button.cubie {
  background: linear-gradient(145deg, #e6f9ff, #00b4db, #0083b0);
  color: #002a3a;
  min-width: unset;
  flex: 1;
  display: flex;
  justify-content: space-between;
  padding-right: 20px;
}

.status-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #666; /* Offline / Desconocido */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.status-led.online {
  background-color: #00ff00;
  box-shadow:
    0 0 10px #00ff00,
    0 0 20px rgba(0, 255, 0, 0.5);
}

.status-led.offline {
  background-color: #ff3333;
  box-shadow:
    0 0 10px #ff3333,
    0 0 20px rgba(255, 51, 51, 0.5);
}

.status-led.checking {
  background-color: #ffcc00;
  box-shadow: 0 0 10px #ffcc00;
  animation: pulse-orange 1s infinite alternate;
}

@keyframes pulse-orange {
  from {
    opacity: 0.5;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Botones del modal Minecraft */
.mc-buttons {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.mc-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 0.25s;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.55);
  cursor: pointer;
  flex: 1;
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
}

.mc-button::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -50%;
  width: 220%;
  height: 220%;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: rotate(25deg);
  animation: mcShine 6s linear infinite;
}

.mc-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  box-shadow:
    inset 0 10px 30px rgba(0, 0, 0, 0.45),
    inset 0 -6px 18px rgba(255, 255, 255, 0.03);
  mix-blend-mode: multiply;
}

@keyframes mcShine {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  100% {
    transform: translateX(100%) rotate(25deg);
  }
}

.mc-button-rim {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(0, 0, 0, 0.12)
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

.mc-button-icon {
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.mc-button-text {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Colores de botones MC */
.mc-button.status {
  background: linear-gradient(145deg, #d4f1ff, #4aa3ff, #08214a);
  color: #02102a;
}

.mc-button.map {
  background: linear-gradient(145deg, #ffe6c2, #ffb36b, #4b2200);
  color: #241000;
}

.mc-button.moss {
  background: linear-gradient(145deg, #d4e5c9, #7a9b6f, #2d4a26);
  color: #1a2817;
}

.mc-button.vote {
  background: linear-gradient(145deg, #ffd9ff, #ff6bdc, #5c1149);
  color: #2a0020;
}

.mc-button.vote2 {
  background: linear-gradient(145deg, #d9f0ff, #6ba8ff, #114a5c);
  color: #002a3a;
}

.mc-button:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.mc-button:active {
  transform: translateY(-4px) scale(1.03);
}

/* Footer */
.footer {
  background: transparent;
  padding: 26px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  color: rgba(230, 238, 248, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-content {
  text-align: center;
  max-width: 900px;
  line-height: 1.4;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 6px;
}

.footer-brand img {
  height: 44px;
}

.footer-brand-name {
  font-weight: 700;
  color: #aee1ff;
}

.footer-info {
  font-size: 0.95rem;
  color: rgba(230, 238, 248, 0.75);
}

.footer-info a {
  color: #7fd1ff;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    padding: 32px;
  }

  .container {
    padding: 20px;
  }

  .services {
    gap: 14px;
  }

  .mc-buttons {
    flex-direction: column;
  }

  .mc-button {
    min-width: 100%;
  }
}
