* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colores principales */
  --black: #050505;
  --black-soft: #0a0a0f;
  --dark-blue: #07152f;
  --dark-blue-2: #0b1f3a;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --pink: #ec4899;
  --pink-dark: #be185d;
  --yellow: #facc15;
  --yellow-dark: #ca8a04;
  --red: #ef4444;
  --red-dark: #b91c1c;

  /* Texto */
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  /* UI */
  --bg: var(--black);
  --bg-card: #0d1728;
  --border: rgba(34, 211, 238, 0.18);
}

/* =========================
   BASE
========================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background:
          radial-gradient(
                  circle at 10% 10%,
                  rgba(34, 211, 238, 0.08),
                  transparent 30%
          ),
          radial-gradient(
                  circle at 90% 20%,
                  rgba(236, 72, 153, 0.08),
                  transparent 30%
          ),
          radial-gradient(
                  circle at 50% 100%,
                  rgba(37, 99, 235, 0.1),
                  transparent 35%
          ),
          var(--black);

  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* =========================
   CONTAINER
========================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* =========================
   HEADER
========================= */

header {
  text-align: center;
  padding: 5rem 0;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 3rem;
}

header h1 {
  font-size: 3.5rem;
  font-weight: 800;

  background: linear-gradient(
          90deg,
          var(--cyan),
          var(--blue),
          var(--pink),
          var(--yellow)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  margin-bottom: 0.75rem;

  text-shadow: 0 0 30px rgba(34, 211, 238, 0.15);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* =========================
   SECTIONS
========================= */

section {
  margin-bottom: 4rem;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;

  color: var(--cyan);

  text-shadow: 0 0 15px rgba(34, 211, 238, 0.25);
}

/* =========================
   PROJECTS
========================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  position: relative;

  background:
          linear-gradient(
                  145deg,
                  rgba(11, 31, 58, 0.95),
                  rgba(5, 5, 5, 0.95)
          );

  border: 1px solid var(--border);
  border-radius: 14px;

  padding: 1.5rem;

  transition:
          transform 0.3s ease,
          border-color 0.3s ease,
          box-shadow 0.3s ease;
}

.project-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 3px;

  background: linear-gradient(
          90deg,
          var(--cyan),
          var(--blue),
          var(--pink)
  );

  border-radius: 14px 14px 0 0;

  opacity: 0.8;
}

.project-card:hover {
  transform: translateY(-7px);

  border-color: var(--cyan);

  box-shadow:
          0 10px 35px rgba(34, 211, 238, 0.15),
          0 0 20px rgba(37, 99, 235, 0.08);
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.project-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* =========================
   BUTTON
========================= */

.btn {
  background: linear-gradient(
          135deg,
          var(--blue),
          var(--cyan-dark)
  );

  color: white;

  border: 1px solid rgba(34, 211, 238, 0.4);

  padding: 0.75rem 1.5rem;

  border-radius: 8px;

  cursor: pointer;

  font-size: 1rem;
  font-weight: 700;

  transition:
          transform 0.2s ease,
          box-shadow 0.2s ease,
          border-color 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);

  border-color: var(--cyan);

  box-shadow:
          0 0 20px rgba(34, 211, 238, 0.3),
          0 4px 20px rgba(37, 99, 235, 0.3);
}

.btn:active {
  transform: scale(0.98);
}

/* =========================
   SKILLS
========================= */

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  background: var(--dark-blue);

  border: 1px solid rgba(34, 211, 238, 0.25);

  padding: 0.5rem 1rem;

  border-radius: 20px;

  font-size: 0.9rem;

  color: var(--cyan);

  transition:
          border-color 0.3s ease,
          color 0.3s ease,
          background 0.3s ease,
          transform 0.2s ease;
}

.tag:hover {
  border-color: var(--pink);

  color: var(--pink);

  background: rgba(236, 72, 153, 0.08);

  transform: translateY(-2px);
}

/* =========================
   NAVIGATION
========================= */

.nav-section {
  margin-bottom: 4rem;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.nav-card {
  background:
          linear-gradient(
                  145deg,
                  var(--dark-blue-2),
                  var(--black-soft)
          );

  border: 1px solid rgba(37, 99, 235, 0.25);

  border-radius: 14px;

  padding: 2rem;

  text-decoration: none;
  color: var(--text);

  transition:
          transform 0.3s ease,
          border-color 0.3s ease,
          box-shadow 0.3s ease;

  display: block;
}

.nav-card:hover {
  transform: translateY(-7px);

  border-color: var(--pink);

  box-shadow:
          0 8px 30px rgba(236, 72, 153, 0.15),
          0 0 20px rgba(236, 72, 153, 0.08);
}

.nav-card h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;

  color: var(--cyan);
}

.nav-card p {
  color: var(--text-muted);
}

/* =========================
   FEATURES
========================= */

.content-section {
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(250px, 1fr));

  gap: 1.5rem;

  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);

  border: 1px solid rgba(34, 211, 238, 0.18);

  border-radius: 14px;

  padding: 1.5rem;

  text-align: center;

  transition:
          transform 0.3s ease,
          border-color 0.3s ease,
          box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);

  border-color: var(--yellow);

  box-shadow:
          0 8px 25px rgba(250, 204, 21, 0.12);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;

  color: var(--yellow);
}

.feature-card p {
  color: var(--text-muted);
}

/* =========================
   SERVER
========================= */

.server-section {
  margin-bottom: 4rem;
}

.server-info {
  background:
          linear-gradient(
                  145deg,
                  #0b1f3a,
                  #050505
          );

  border: 1px solid rgba(34, 211, 238, 0.25);

  border-radius: 18px;

  padding: 3rem;

  text-align: center;

  max-width: 600px;

  margin: 0 auto;

  box-shadow:
          0 10px 40px rgba(0, 0, 0, 0.5);
}

.server-icon {
  font-size: 5rem;
  margin-bottom: 1rem;

  filter:
          drop-shadow(0 0 15px rgba(34, 211, 238, 0.5));
}

.server-info h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;

  color: var(--cyan);
}

.server-description {
  color: var(--text-muted);

  font-size: 1.25rem;

  margin-bottom: 2rem;
}

/* =========================
   SERVER DETAILS
========================= */

.server-details {
  background:
          rgba(7, 21, 47, 0.8);

  border:
          1px solid rgba(37, 99, 235, 0.2);

  border-radius: 12px;

  padding: 1.5rem;

  margin-bottom: 2rem;

  text-align: left;
}

.detail-item {
  display: flex;

  justify-content: space-between;

  padding: 0.75rem 0;

  border-bottom:
          1px solid rgba(34, 211, 238, 0.12);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-muted);

  font-weight: 600;
}

.detail-value {
  color: var(--text);

  font-family: 'Courier New', monospace;
}

.detail-value.online {
  color: #22c55e;

  text-shadow:
          0 0 10px rgba(34, 197, 94, 0.5);
}

/* =========================
   BACK
========================= */

.back-section {
  margin-bottom: 4rem;

  text-align: center;
}

/* =========================
   PROFILE
========================= */

.profile-header {
  display: flex;

  align-items: center;

  gap: 1.5rem;

  margin-bottom: 2rem;

  padding: 1.5rem;

  background:
          linear-gradient(
                  135deg,
                  rgba(34, 211, 238, 0.06),
                  rgba(236, 72, 153, 0.05)
          );

  border:
          1px solid rgba(34, 211, 238, 0.15);

  border-radius: 14px;
}

.profile-avatar {
  width: 80px;
  height: 80px;

  border-radius: 50%;

  object-fit: cover;

  border:
          3px solid var(--cyan);

  box-shadow:
          0 0 20px rgba(34, 211, 238, 0.25);
}

.profile-info h2 {
  margin: 0 0 0.5rem 0;

  color: var(--text);
}

.profile-tag {
  color: var(--text-muted);

  font-size: 0.875rem;

  margin: 0 0 0.25rem 0;
}

.profile-status {
  color: #22c55e;

  font-size: 0.875rem;

  margin: 0;
}

/* =========================
   BIO
========================= */

.bio-section {
  margin-bottom: 2rem;
}

.bio-section h3 {
  margin-bottom: 0.75rem;

  color: var(--pink);

  text-shadow:
          0 0 12px rgba(236, 72, 153, 0.2);
}

.bio-section p {
  color: var(--text);

  line-height: 1.6;
}

/* =========================
   STATS
========================= */

.stats-section {
  margin-top: 2rem;

  padding: 1.5rem;

  background:
          rgba(7, 21, 47, 0.75);

  border:
          1px solid rgba(37, 99, 235, 0.2);

  border-radius: 14px;
}

.stats-section h3 {
  margin-bottom: 1rem;

  color: var(--yellow);
}

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(120px, 1fr));

  gap: 1rem;
}

.stat-item {
  text-align: center;

  padding: 1rem;

  background: var(--black-soft);

  border:
          1px solid rgba(34, 211, 238, 0.15);

  border-radius: 10px;

  transition:
          transform 0.2s ease,
          border-color 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-3px);

  border-color: var(--yellow);
}

.stat-value {
  display: block;

  font-size: 2rem;

  font-weight: 700;

  color: var(--cyan);

  margin-bottom: 0.25rem;

  text-shadow:
          0 0 12px rgba(34, 211, 238, 0.25);
}

.stat-label {
  font-size: 0.875rem;

  color: var(--text-muted);
}

/* =========================
   FOOTER
========================= */

footer {
  text-align: center;

  padding: 2rem 0;

  border-top:
          1px solid rgba(34, 211, 238, 0.15);

  color: var(--text-muted);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  header {
    padding: 3rem 0;
  }

  header h1 {
    font-size: 2.2rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns:
      repeat(auto-fit, minmax(100px, 1fr));
  }

  .server-info {
    padding: 2rem 1.5rem;
  }
}

/* =========================
   SELECTION
========================= */

::selection {
  background: var(--pink);
  color: white;
}

/* =========================
   CHAT
========================= */

.chat-section {
  margin-bottom: 4rem;
}

.chat-section h2 {
  margin-bottom: 1.5rem;

  color: var(--cyan);

  text-shadow: 0 0 15px rgba(34, 211, 238, 0.25);
}

.chat-container {
  background:
          linear-gradient(
                  145deg,
                  var(--dark-blue-2),
                  var(--black-soft)
          );

  border:
          1px solid rgba(34, 211, 238, 0.2);

  border-radius: 16px;

  padding: 1.5rem;

  box-shadow:
          0 10px 40px rgba(0, 0, 0, 0.5);
}

.chat-messages {
  max-height: 400px;

  overflow-y: auto;

  padding-right: 0.5rem;

  margin-bottom: 1.5rem;

  border-bottom:
          1px solid rgba(34, 211, 238, 0.12);

  padding-bottom: 1.5rem;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(34, 211, 238, 0.05);

  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--cyan);

  border-radius: 4px;
}

.chat-loading {
  text-align: center;

  color: var(--text-muted);

  font-style: italic;
}

.chat-message {
  background:
          rgba(7, 21, 47, 0.6);

  border:
          1px solid rgba(37, 99, 235, 0.15);

  border-radius: 10px;

  padding: 1rem;

  margin-bottom: 0.75rem;

  transition:
          transform 0.2s ease,
          border-color 0.2s ease;
}

.chat-message:hover {
  transform: translateX(5px);

  border-color: var(--cyan);
}

.chat-message-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 0.5rem;

  padding-bottom: 0.5rem;

  border-bottom:
          1px solid rgba(34, 211, 238, 0.1);
}

.chat-message-name {
  font-weight: 700;

  color: var(--pink);

  text-shadow:
          0 0 10px rgba(236, 72, 153, 0.3);
}

.chat-message-time {
  font-size: 0.75rem;

  color: var(--text-muted);
}

.chat-message-content {
  color: var(--text);

  line-height: 1.5;

  word-wrap: break-word;
}

.chat-input-container {
  display: flex;

  gap: 0.75rem;

  align-items: center;
}

.chat-name-input {
  flex: 0 0 120px;

  background: var(--black-soft);

  border:
          1px solid rgba(34, 211, 238, 0.2);

  border-radius: 8px;

  padding: 0.75rem 1rem;

  color: var(--text);

  font-size: 0.9rem;

  transition:
          border-color 0.3s ease,
          box-shadow 0.3s ease;
}

.chat-name-input:focus {
  outline: none;

  border-color: var(--cyan);

  box-shadow:
          0 0 15px rgba(34, 211, 238, 0.2);
}

.chat-name-input::placeholder {
  color: var(--text-muted);
}

.chat-message-input {
  flex: 1;

  background: var(--black-soft);

  border:
          1px solid rgba(34, 211, 238, 0.2);

  border-radius: 8px;

  padding: 0.75rem 1rem;

  color: var(--text);

  font-size: 0.9rem;

  transition:
          border-color 0.3s ease,
          box-shadow 0.3s ease;
}

.chat-message-input:focus {
  outline: none;

  border-color: var(--cyan);

  box-shadow:
          0 0 15px rgba(34, 211, 238, 0.2);
}

.chat-message-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  background: linear-gradient(
          135deg,
          var(--blue),
          var(--cyan-dark)
  );

  color: white;

  border:
          1px solid rgba(34, 211, 238, 0.4);

  border-radius: 8px;

  padding: 0.75rem 1.5rem;

  font-size: 0.9rem;

  font-weight: 700;

  cursor: pointer;

  transition:
          transform 0.2s ease,
          box-shadow 0.2s ease,
          border-color 0.2s ease;
}

.chat-send-btn:hover {
  transform: translateY(-2px);

  border-color: var(--cyan);

  box-shadow:
          0 0 20px rgba(34, 211, 238, 0.3),
          0 4px 20px rgba(37, 99, 235, 0.3);
}

.chat-send-btn:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .chat-input-container {
    flex-direction: column;

    align-items: stretch;
  }

  .chat-name-input {
    flex: 1;
  }

  .chat-messages {
    max-height: 300px;
  }
}

/* =========================
   MODAL
========================= */

.modal {
  display: none;

  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background:
          rgba(0, 0, 0, 0.85);

  backdrop-filter: blur(10px);

  z-index: 1000;

  justify-content: center;

  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background:
          linear-gradient(
                  145deg,
                  var(--dark-blue-2),
                  var(--black-soft)
          );

  border:
          1px solid rgba(34, 211, 238, 0.3);

  border-radius: 20px;

  padding: 2.5rem;

  max-width: 450px;

  width: 90%;

  text-align: center;

  box-shadow:
          0 20px 60px rgba(0, 0, 0, 0.7),
          0 0 40px rgba(34, 211, 238, 0.15);
}

.modal-content h2 {
  margin-bottom: 0.75rem;

  color: var(--cyan);

  text-shadow:
          0 0 15px rgba(34, 211, 238, 0.3);
}

.modal-subtitle {
  color: var(--text-muted);

  margin-bottom: 2rem;

  font-size: 0.95rem;
}

.modal-input {
  width: 100%;

  background: var(--black-soft);

  border:
          1px solid rgba(34, 211, 238, 0.3);

  border-radius: 10px;

  padding: 1rem 1.25rem;

  color: var(--text);

  font-size: 1rem;

  margin-bottom: 1.5rem;

  transition:
          border-color 0.3s ease,
          box-shadow 0.3s ease;
}

.modal-input:focus {
  outline: none;

  border-color: var(--cyan);

  box-shadow:
          0 0 20px rgba(34, 211, 238, 0.3);
}

.modal-input::placeholder {
  color: var(--text-muted);
}

.modal-btn {
  width: 100%;

  background: linear-gradient(
          135deg,
          var(--blue),
          var(--cyan-dark)
  );

  color: white;

  border:
          1px solid rgba(34, 211, 238, 0.4);

  border-radius: 10px;

  padding: 1rem 2rem;

  font-size: 1rem;

  font-weight: 700;

  cursor: pointer;

  transition:
          transform 0.2s ease,
          box-shadow 0.2s ease,
          border-color 0.2s ease;
}

.modal-btn:hover {
  transform: translateY(-3px);

  border-color: var(--cyan);

  box-shadow:
          0 0 25px rgba(34, 211, 238, 0.4),
          0 5px 25px rgba(37, 99, 235, 0.4);
}

.modal-btn:active {
  transform: scale(0.98);
}

.modal-warning {
  margin-top: 1.5rem;

  color: var(--yellow);

  font-size: 0.85rem;

  font-style: italic;
}

/* =========================
   AUTH TABS
========================= */

.auth-tabs {
  display: flex;

  gap: 0.5rem;

  margin-bottom: 2rem;

  border-bottom:
          1px solid rgba(34, 211, 238, 0.2);

  padding-bottom: 0.5rem;
}

.auth-tab {
  flex: 1;

  background: transparent;

  border:
          none;

  color: var(--text-muted);

  font-size: 0.95rem;

  font-weight: 600;

  padding: 0.75rem 1rem;

  cursor: pointer;

  transition:
          color 0.3s ease,
          border-bottom 0.3s ease;

  border-bottom:
          2px solid transparent;
}

.auth-tab:hover {
  color: var(--cyan);
}

.auth-tab.active {
  color: var(--cyan);

  border-bottom:
          2px solid var(--cyan);
}

.auth-tab-content {
  display: none;

  animation: fadeIn 0.3s ease;
}

.auth-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}