/* ====================
   RESETEO GENERAL
==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 10px;
    font-family: 'Share Tech Mono', monospace, 'Poppins', sans-serif;
}

/* ====================
   HEADER GENERAL
==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background-color: #2a2142;
    color: #d1c4e9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.8em;
    margin-left: 20px;
}

.btn-volver {
    padding: 10px 20px;
    background-color: #3e2757;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    border: 2px solid white;
}

.btn-volver:hover {
    background-color: #552a70;
}

/* ====================
   FORMULARIOS (Login / Registro)
==================== */
.form {
    max-width: 40rem;
    padding: 5rem;
    margin: 8rem auto;
    background: rgba(18, 4, 36, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(178, 102, 255, 0.3);
    box-shadow: 0 20px 40px rgba(10, 0, 30, 0.45);
}

.form_title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff7bff;
}

.form_input {
    margin: 2rem 0;
    position: relative;
}

.form_input input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1rem;
    font-size: 1.6rem;
    border: 1px solid rgba(178, 102, 255, 0.4);
    border-radius: 12px;
    background: rgba(9, 0, 25, 0.75);
    color: #f5eaff;
}

.form_input input::placeholder {
    color: rgba(245, 234, 255, 0.5);
}

.form_switch {
    font-size: 1.5rem;
    color: #a1a1a1;
    margin-top: 1.5rem;
}

.form_switch a {
    color: #5500ff;
    text-decoration: none;
}

.form_switch a:hover {
    text-decoration: underline;
}

/* ====================
   CONTRASEÑA - Ojo
==================== */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.eye-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.7;
}

.eye-icon:hover {
    opacity: 1;
}

/* ====================
   MENSAJES
==================== */
.mensaje-error {
    color: red;
    font-weight: bold;
    margin-top: 10px;
}

.mensaje-exito {
    color: lightgreen;
    font-weight: bold;
    margin-top: 10px;
}

/* ====================
   DASHBOARD HEADER
==================== */
.dashboard-header {
    background-color: rgba(18, 4, 36, 0.92);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.dashboard-welcome {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ====================
   MENÚ LATERAL
==================== */
.menu-btn {
    font-size: 2.4rem;
    background: transparent;
    border: none;
    color: #ff7bff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.menu-btn:hover {
    transform: translateY(-1px);
}

/* ====================
   CONTENIDO DEL DASHBOARD
==================== */
main.dashboard-main {
    padding: 28px 16px 20px;
}

/* Imagen de perfil en header */
.dashboard-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 123, 255, 0.7);
}

main {
    padding-top: 60px; /* Espacio superior para que el contenido no quede pegado al header */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-buttons a {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 25px;
    border-radius: 12px;
    background: linear-gradient(135deg, #b266ff, #ff7bff);
    color: #070013;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(178, 102, 255, 0.35);
}

/* Fondo exclusivo para index, login y signup */
.glitch-background {
    background: radial-gradient(circle at 20% 20%, rgba(178,102,255,0.18), transparent 55%),
                radial-gradient(circle at 80% 0%, rgba(255,123,255,0.12), transparent 40%),
                #080012;
}

/* Barra superior */
header,
.dashboard-header {
    background: linear-gradient(135deg, #32105f, #130021);
    color: #f5eaff;
}

/* Botones */
.nav-buttons a,
.btn-volver {
    border: none;
    color: #080012;
    background: linear-gradient(135deg, #b266ff, #ff7bff);
    box-shadow: 0 8px 18px rgba(178,102,255,0.35);
}

/* Botones generales (navbar, formularios, acciones) */
button,
.nav-buttons a,
.form_button,
.btn-volver {
    background: linear-gradient(135deg, #b266ff, #ff7bff);
    color: #080012;
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(178,102,255,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form_button {
    width: 100%;
    margin-top: 2rem;
    font-size: 1.8rem;
}

/* Hover para todos los botones */
button:hover,
.nav-buttons a:hover,
.form_button:hover,
.btn-volver:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(255, 123, 255, 0.35);
}

/* Fondo layout2 y estilo para formularios oscuros */
.layout2-bg {
    background: radial-gradient(circle at 15% 15%, rgba(178,102,255,0.22), transparent 55%),
                radial-gradient(circle at 85% 0%, rgba(255,123,255,0.15), transparent 45%),
                #080012;
    color: #f5eaff;
}

/* Tarjetas internas */
.dashboard-content {
    background: rgba(18, 4, 36, 0.92);
    border: 1px solid rgba(178, 102, 255, 0.3);
    border-radius: 16px;
    padding: 1.6rem;
    color: #f6f4ff;
    box-shadow: 0 18px 34px rgba(10, 0, 30, 0.4);
}

body {
  font-size: 1.6rem;
  text-align: center;
  background: radial-gradient(circle at 20% 20%, rgba(178,102,255,0.18), transparent 60%),
              radial-gradient(circle at 80% 0%, rgba(255,123,255,0.12), transparent 55%),
              #080012;
  color: #f0e8ff;
  min-height: 100vh;
  padding-top: 80px;
}

#matrix-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -2;
  opacity: 0.7;
}

.dashboard-header {
  background-color: rgba(18, 4, 36, 0.92);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

.menu-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

.ctf-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

.tarjeta-titulo {
  font-size: 2rem;
  color: white;
  margin: 2rem auto 1rem;
  background-color: #3a0a6d;
  border-radius: 8px;
  padding: 1rem 2rem;
  width: 95%;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(110, 51, 164, 0.3);
}

.ctf-card {
  display: flex;
  background: rgba(18, 4, 36, 0.92);
  border: 1px solid rgba(178, 102, 255, 0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 38px rgba(10, 0, 30, 0.35);
  color: #f6f4ff;
  width: 95%;
  margin: 1.8rem auto;
}

.ctf-image {
  flex: 1;
  min-height: 180px;
  display: flex;
  align-items: stretch;
}

.ctf-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ctf-info {
  flex: 2;
  padding: 2rem;
}

.ctf-title {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
  color: #ff7bff;
}

.ctf-meta {
  font-size: 1.2rem;
  margin: 0.2rem 0;
  color: rgba(246, 244, 255, 0.8);
}

.ctf-btn {
  margin-top: 1.5rem;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, #b266ff, #ff7bff);
  color: #080012;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ctf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(178, 102, 255, 0.35);
}

.progress-bar {
  background-color: rgba(70, 30, 120, 0.6);
  border-radius: 8px;
  overflow: hidden;
  height: 14px;
  margin-top: 1rem;
  width: 100%;
}

.progress {
  height: 100%;
  background: linear-gradient(135deg, #b266ff, #ff7bff);
  width: 0;
  transition: width 0.3s ease;
}

.dashboard-placeholder {
  font-size: 1.5rem;
  color: rgba(246, 244, 255, 0.7);
}

.course-coming-soon {
  margin-top: 1rem;
  color: #ccc;
}

.module-section {
  margin-top: 2rem;
}

.module-section-title {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.module-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
  background: rgba(44, 0, 69, 0.8);
  border: 1px solid rgba(110, 51, 164, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 200px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.module-card--locked {
  background: rgba(44, 0, 69, 0.45);
}

.module-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #bfa2ff;
}

.module-card__status {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.module-card__status--open {
  background: rgba(124, 189, 104, 0.2);
  color: #8fe28f;
}

.module-card__status--soon {
  background: rgba(255, 193, 7, 0.2);
  color: #ffca7a;
}

.module-card__title {
  color: #fff;
  font-size: 1.3rem;
  margin: 0;
  line-height: 1.4;
}

.module-card__summary {
  color: #d9c7f7;
  font-size: 0.95rem;
  flex: 1;
}

.module-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7f63d3, #a86bd7);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(132, 99, 211, 0.4);
}

.module-card__cta--disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .module-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.module-detail {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.module-detail__intro {
  background: rgba(44, 0, 69, 0.65);
  border: 1px solid rgba(110, 51, 164, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  color: #d9c7f7;
}

.module-detail__summary {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  text-align: justify;
}

.module-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #8fe28f;
  text-decoration: none;
  font-weight: 600;
}

.module-detail__resources,
.module-detail__assignment {
  background: rgba(28, 10, 46, 0.85);
  border-radius: 12px;
  padding: 1.8rem;
  border: 1px solid rgba(130, 88, 190, 0.35);
}

.module-detail__resources h2,
.module-detail__assignment h2 {
  margin: 0 0 1rem 0;
  color: #fff;
  font-size: 1.4rem;
}

.module-detail__resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.module-detail__resource-list li {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: #d9c7f7;
}

.module-detail__resource-list a {
  color: #8fe28f;
  font-weight: 600;
  text-decoration: none;
}

.module-detail__sections {
  display: grid;
  gap: 1.6rem;
}

.module-detail__section {
  background: rgba(28, 10, 46, 0.85);
  border-radius: 12px;
  padding: 1.6rem;
  border: 1px solid rgba(130, 88, 190, 0.35);
  text-align: left;
  box-shadow: 0 18px 36px rgba(12, 4, 26, 0.45);
}

.module-detail__section h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  color: #fff;
}

.module-detail__section-body p {
  text-align: justify;
  color: #dcd1f8;
}

.module-detail__section-body ul {
  margin: 0.6rem 0 0.6rem 1.2rem;
  padding: 0;
  color: #dcd1f8;
}

.module-detail__section-body li {
  margin-bottom: 0.3rem;
}

.module-detail__assignment-hint {
  color: #cfd2ff;
  margin-bottom: 1rem;
}

.task-upload-form {
  display: grid;
  gap: 1rem;
  max-width: 400px;
}

.task-upload-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: #e0d4ff;
}

.task-upload-form__field input[type="file"] {
  border: 1px dashed rgba(111, 73, 168, 0.6);
  border-radius: 8px;
  padding: 0.7rem;
  background: rgba(14, 6, 28, 0.6);
  color: #fff;
}

.task-upload-form__submit {
  background: linear-gradient(135deg, #6c4bc0, #a86bd7);
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.task-upload-form__submit:hover {
  box-shadow: 0 8px 18px rgba(135, 95, 210, 0.35);
}

.task-upload-feedback {
  min-height: 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.task-upload-feedback--ok {
  color: #8fe28f;
}

.task-upload-feedback--error {
  color: #ff8686;
}

.ranking-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  vertical-align: middle;
  object-fit: cover;
  margin-right: 0.5rem;
}

.password-policy {
  font-size: 1.3rem;
  color: #ccc;
  margin-top: -10px;
  text-align: left;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: rgba(18, 4, 36, 0.92);
  transition: right 0.3s ease;
  z-index: 1000;
  padding-top: 0; /* <-- Cambiado de 60px a 0 */
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.4);
}

.sidebar.active {
  right: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li a {
  display: block;
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


/* ====================
   PÁGINAS DE DESAFÍO
==================== */
body.challenge-page {
    background: url("/resources/layout2.png") center center / cover no-repeat fixed;
    font-family: 'Share Tech Mono', monospace, 'Poppins', sans-serif;
    color: #fff;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.challenge-box {
    background: rgba(27, 0, 51, 0.82);
    padding: 1.8rem;
    width: 100%;
    max-width: 640px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(94, 42, 132, 0.55);
}

.challenge-box--wide {
    max-width: 700px;
}

.challenge-box--solid {
    background: rgba(27, 0, 51, 0.9);
}

.challenge-title {
    text-align: center;
    margin-bottom: 1.4rem;
    font-size: 2rem;
    letter-spacing: 0.2px;
}

.challenge-instructions {
    font-size: 1.25rem;
    line-height: 1.75;
    margin-bottom: 1.8rem;
    white-space: pre-wrap;
}

.challenge-instructions a {
    color: #9ad8ff;
    font-weight: 600;
    text-decoration: underline;
}

.challenge-form {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
}

.challenge-form input[type="text"],
.challenge-form input[type="password"],
.challenge-form input[type="email"] {
    flex: 1;
    padding: 0.9rem;
    font-size: 1.2rem;
    border-radius: 6px;
    border: none;
}

.challenge-form button {
    padding: 0.95rem 2.4rem;
    background: #7e52ff;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
}

.challenge-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.challenge-feedback {
    margin-top: 1.2rem;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
}

.challenge-page .btn-volver {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #6a1b9a;
    color: #fff;
    padding: 0.9rem 2.4rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: background 0.2s ease;
}

.challenge-page .btn-volver:hover {
    background: #8454dd;
}

@media (max-width: 620px) {
    .challenge-form {
        flex-direction: column;
    }

    .challenge-form button {
        width: 100%;
    }
}

/* ====================
   OSINT – LISTA DE DESAFÍOS
==================== */
body.page-osint-desafios {
    margin: 0;
    color: #fff;
    font-family: 'Share Tech Mono', monospace, system-ui, -apple-system, 'Poppins', Segoe UI, Roboto, Arial, sans-serif;
    background: url("/resources/layout2.png") center/cover no-repeat fixed, #1a093d;
    min-height: 100vh;
    padding: 120px 16px 48px;
}

.osint-desafios-header {
    text-align: center;
    margin-bottom: 48px;
}

.osint-desafios-header h1 {
    margin: 0 0 10px 0;
    font-size: clamp(2rem, 2.6vw, 2.2rem);
    letter-spacing: 0.4px;
}

.osint-desafios-header .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    border: 1px solid #a589ff;
    color: #e9e6ff;
    background: transparent;
    text-decoration: none;
}

.osint-desafios-header .btn-secondary:hover {
    background: rgba(165, 137, 255, 0.12);
}

.osint-desafios-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.osint-desafios-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
}

.osint-desafios-card {
    background: rgba(44, 0, 69, 0.9);
    border: 1px solid rgba(110, 51, 164, 0.45);
    border-radius: 16px;
    box-shadow: 0 0 24px rgba(110, 51, 164, 0.35);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 240px;
}

.osint-desafios-card .title {
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.4px;
}

.osint-desafios-card .desc {
    color: #f5e9ff;
    font-size: 1.4rem;
    line-height: 1.75;
    flex: 1;
}

.osint-desafios-card .btn-row {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.osint-desafios-card .btn {
    flex: 1;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 600;
    border: 1px solid #7a5ee6;
    background: #6a00b5;
    color: #fff;
    transition: filter 0.2s ease;
}

.osint-desafios-card .btn:hover {
    filter: brightness(1.05);
}

.osint-desafios-card .btn.disabled {
    pointer-events: none;
    opacity: 0.5;
    background: #3a2c66;
    border-color: #4a3d83;
    color: #bbb;
}

@media (max-width: 600px) {
    .osint-desafios-header {
        margin-bottom: 24px;
    }

    .osint-desafios-header h1 {
        font-size: 2.2rem;
    }
}

/* ====================
   OSINT – RANKING
==================== */
body.page-osint-ranking {
    margin: 0;
    background: url("/resources/layout2.png") center center / cover fixed no-repeat, #140022;
    color: #ffffff;
    font-family: 'Share Tech Mono', monospace, system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
}

.osint-ranking-header {
    padding: 2rem 1rem;
    text-align: center;
}

.osint-ranking-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(2rem, 2.6vw, 2.2rem);
}

.osint-ranking-sub {
    color: #b9b9b9;
    font-size: 1.4rem;
}

.osint-ranking-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.osint-ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.osint-ranking-table thead th {
    background: #300045;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.osint-ranking-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #3a2b4e;
    text-align: center;
}

.osint-ranking-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.osint-ranking-table tbody tr.me {
    background: rgba(126, 82, 255, 0.15);
}

.osint-ranking-alias {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
}

.osint-ranking-alias img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.osint-ranking-progress {
    background: #4d4d4d;
    height: 18px;
    border-radius: 12px;
    overflow: hidden;
}

.osint-ranking-progress span {
    display: block;
    height: 100%;
    background: #7e52ff;
    width: 0;
    transition: width 0.3s ease;
}

.osint-ranking-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.2rem;
    flex-wrap: wrap;
}

.osint-ranking-actions .btn {
    display: inline-block;
    background: #7e52ff;
    color: #fff;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.osint-ranking-actions .btn.secondary {
    background: transparent;
    border: 1px solid #6f6f6f;
    color: #ddd;
}

.osint-ranking-hint {
    color: #b9b9b9;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.4rem;
}

/* ====================
   PERFIL DE USUARIO
==================== */
body.page-profile {
    background: url("/resources/layout2.png") center center / cover fixed;
    font-family: 'Share Tech Mono', monospace, 'Poppins', sans-serif;
    color: #fff;
    margin: 0;
}

.perfil-form {
    background-color: rgba(58, 10, 109, 0.92);
    border: 1px solid #6e33a4;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 0 20px rgba(110, 51, 164, 0.3);
    max-width: 800px;
    margin: 4rem auto;
}

.perfil-form .form_button {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: #6c4bc0;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.6rem;
    cursor: pointer;
}

.perfil-form .form_button:hover {
    background: #7f63d3;
}

.mensaje-info {
    color: lightgreen;
    font-weight: bold;
    margin: 1rem 0;
    text-align: center;
}

.mensaje-error {
    color: #ff6666;
    font-weight: bold;
    margin: 1rem 0;
    text-align: center;
}

.sidebar-menu li a.active {
    background: rgba(85, 0, 255, 0.3);
}

/* ====================
   Semana de Ingenierías – Ranking
==================== */
body.page-seming-ranking {
    background: url("/resources/layout2.png") center center / cover fixed no-repeat, #140022;
    color: #ffffff;
    font-family: 'Share Tech Mono', monospace, 'Poppins', sans-serif;
    margin: 0;
    padding: 2rem 1rem;
}

.seming-ranking-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    letter-spacing: 0.4px;
}

.seming-ranking-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 3rem;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(34, 0, 61, 0.75);
}

.seming-ranking-table th,
.seming-ranking-table td {
    padding: 1rem;
    border-bottom: 1px solid #444;
    text-align: center;
}

.seming-ranking-table th {
    background: #300045;
}

.seming-day-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.seming-day-btn {
    display: inline-block;
    background: #6a00b5;
    color: white;
    border: none;
    padding: 1rem 2.4rem;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.seming-day-btn:hover {
    background: #7e52ff;
}

.seming-back-link {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.seming-back-link a {
    color: #aaa;
    text-decoration: none;
    font-size: 1.4rem;
}

.seming-back-link a:hover {
    color: #fff;
}

/* ====================
   Semana de Ingenierías – Día 1 (Carrusel)
==================== */
body.page-sem-day1 {
    --sem-primary: #6a1b9a;
    --sem-accent: #ab47bc;
    --sem-background: #1a093d;
    --sem-card-width: 280px;
    --sem-card-height: 400px;
    --sem-carousel-radius: 340px;
    font-family: 'Share Tech Mono', monospace, 'Poppins', sans-serif;
    background: url("/resources/layout2.png") center center / cover no-repeat fixed, var(--sem-background);
    color: #fff;
    margin: 0;
    overflow: hidden;
}

.page-sem-day1 .btn-volver {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--sem-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    z-index: 999;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.page-sem-day1 .btn-volver:hover {
    background: var(--sem-accent);
}

.sem-day1-carousel-container {
    width: 100%;
    height: 100vh;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
}

.sem-day1-carousel {
    position: relative;
    width: var(--sem-carousel-radius);
    height: var(--sem-carousel-radius);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.sem-day1-card {
    position: absolute;
    width: var(--sem-card-width);
    height: var(--sem-card-height);
    left: 50%;
    top: 50%;
    margin-left: calc(var(--sem-card-width) / -2);
    margin-top: calc(var(--sem-card-height) / -2);
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    background: #2c0045;
    border: 1px solid #6e33a4;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(110, 51, 164, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: auto;
}

.sem-day1-card-title {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: #fff;
    pointer-events: none;
}

.sem-day1-card-text {
    font-size: 1.2rem;
    color: #cfcfcf;
    pointer-events: none;
    flex: 1;
}

.sem-day1-button {
    margin-top: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(to right, #5500ff, #7a00ff);
    border: none;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

.sem-day1-button:hover {
    background: linear-gradient(to left, #5500ff, #7a00ff);
}

@media (max-width: 768px) {
    body.page-sem-day1 {
        --sem-card-width: 220px;
        --sem-card-height: 320px;
        --sem-carousel-radius: 240px;
    }
}

/* ====================
   Página Bloqueada (r/s/blocked.php)
==================== */
body.page-blocked {
    font-family: 'Courier New', monospace;
    background: #000 url("/r/s/fondo.jpg") center center / cover no-repeat fixed;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

.blocked-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.blocked-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1));
    background-size: 20px 20px;
    opacity: 0.3;
}

.blocked-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.blocked-header {
    margin-bottom: 30px;
}

.blocked-badge {
    width: 150px;
    height: 200px;
    margin: 0 auto 20px;
    position: relative;
}

.blocked-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blocked-title {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    padding: 15px 20px;
    border: 2px solid #fff;
    display: inline-block;
    background: rgba(0, 0, 0, 0.7);
}

.blocked-message {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-left: 4px solid #ff4d4d;
    border-right: 4px solid #ff4d4d;
}

.blocked-legal {
    font-size: 0.9rem;
    line-height: 1.8;
    text-align: left;
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
}

.blocked-legal h3 {
    margin-bottom: 15px;
    color: #ff4d4d;
    font-size: 1.2rem;
}

.blocked-footer {
    margin-top: 40px;
    font-size: 0.8rem;
    color: #aaa;
    opacity: 0.8;
}

.blocked-hidden {
    opacity: 0;
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
    white-space: pre;
    color: lime;
}

@media (max-width: 768px) {
    .blocked-title { font-size: 1.8rem; padding: 10px 15px; }
    .blocked-badge { width: 100px; height: 100px; }
    .blocked-message { font-size: 0.9rem; padding: 15px 10px; }
    .blocked-legal { font-size: 0.8rem; padding: 15px 10px; }
}

/* ====================
   BLOG STYLES
==================== */
.blog-body {
  background: #070013;
  color: #f6f4ff;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

.blog-header {
  background: rgba(12, 2, 35, 0.95);
  border-bottom: 1px solid rgba(127, 94, 255, 0.25);
  position: sticky;
  top: 0;
  z-index: 10;
}

.blog-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
}

.blog-logo {
  color: #d8c9ff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.2rem;
}

.blog-nav {
  display: flex;
  gap: 1.1rem;
}

.blog-nav a {
  color: rgba(246, 244, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.blog-nav a:hover,
.blog-nav a.active {
  color: #ff90ff;
}

.blog-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.blog-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.blog-hero h1 {
  margin: 0;
  font-size: 2.4rem;
}

.blog-hero p {
  color: rgba(246, 244, 255, 0.7);
  margin-top: 0.8rem;
}

.blog-empty {
  text-align: center;
  color: rgba(246, 244, 255, 0.65);
  font-size: 1.1rem;
}

.blog-grid {
  display: grid;
  gap: 2rem;
}


.blog-card {
  background: rgba(18, 4, 36, 0.92);
  border-radius: 18px;
  border: 1px solid rgba(127, 94, 255, 0.25);
  box-shadow: 0 18px 38px rgba(10, 0, 30, 0.4);
  padding: 1.6rem;
  display: grid;
  gap: 0.9rem;
}

.blog-card__image {
  background-size: cover;
  background-position: center;
  height: 220px;
}

.blog-card__content {
  padding: 1.6rem;
  display: grid;
  gap: 0.9rem;
}

.blog-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: rgba(246, 244, 255, 0.65);
  font-size: 0.9rem;
}

.blog-card__tags,
.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-card__tags span,
.blog-post__tags span {
  background: rgba(130, 80, 200, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.blog-card__link {
  color: #ff90ff;
  text-decoration: none;
  font-weight: 600;
}

.blog-card__link:hover {
  text-decoration: underline;
}

.blog-page__header {
  padding: 0 0 1.5rem;
}

.blog-page__header h2 {
  font-size: 2rem;
  margin: 0;
  color: #f6f4ff;
}

.blog-page {
  display: grid;
  gap: 1.8rem;
}

.blog-card {
  background: rgba(18, 4, 36, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(127, 94, 255, 0.2);
  box-shadow: 0 18px 32px rgba(10, 0, 30, 0.35);
  padding: 1.5rem 1.8rem;
  display: grid;
  gap: 1rem;
  max-width: 1120px;
  justify-self: center;
}

.blog-card__title {
  margin: 0;
  font-size: 1.8rem;
  color: #f6f4ff;
}

.blog-card__date {
  color: rgba(246, 244, 255, 0.65);
  font-size: 1.2rem;
}

.blog-card__content {
  margin: 0;
  color: rgba(246, 244, 255, 0.85);
  font-size: 1.35rem;
  text-align: left;
}

.blog-post {
  background: rgba(18, 4, 36, 0.92);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(127, 94, 255, 0.25);
  box-shadow: 0 18px 38px rgba(10, 0, 30, 0.4);
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.blog-post__meta {
  color: rgba(246, 244, 255, 0.65);
  font-size: 0.9rem;
}

.blog-post__image img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.blog-post__content {
  line-height: 1.7;
  color: rgba(246, 244, 255, 0.9);
}

.blog-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(246, 244, 255, 0.55);
  border-top: 1px solid rgba(127, 94, 255, 0.2);
}

@media (max-width: 720px) {
  .blog-header__inner {
    flex-direction: column;
    gap: 1rem;
  }

  .blog-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .blog-post {
    padding: 1.5rem;
  }
}

.tag {
  display: inline-block;
  background: rgba(130, 80, 200, 0.25);
  color: #e8dbff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 1.2rem;
  margin-right: 0.3rem;
}

.admin-form-inline {
  display: inline;
}

.admin-blog-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.admin-btn--danger {
  background: linear-gradient(135deg, #ff4f6d, #ff7a97);
  color: #2a0011;
}

.admin-btn--danger:hover {
  box-shadow: 0 12px 24px rgba(255, 79, 109, 0.35);
}
