@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background: #2F4F4F; /* DarkSlateGray de fondo */
    color: #e1e4e8; /* gris claro para texto */
}

/* Header */
header {
    background: #2F4F4F; /* DarkSlateGray */
    color: #f0f0f0;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 2rem;
    color: #d4d9b0; /* tono claro */
}

header p {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    color: #c3c9a8;
}

h1 {
    background: #2F4F4F;
    color: #d4d9b0;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Botones de cursos en grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1100px;
    margin: auto;
}

.course-btn {
    display: block;
    padding: 2rem;
    background: #2F4F4F; /* DarkSlateGray */
    color: LightSalmon; /* color de letra cambiado a LightSalmon */
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease-in-out;
}

.course-btn:hover {
    transform: translateY(-5px);
    background: #1e3333; /* más oscuro que DarkSlateGray */
    color: LightSalmon; /* hover con mismo color */
}

/* Contenedor del curso */
.course-container {
    max-width: 900px;
    margin: auto;
    background: #3b5a5a; /* tono medio similar a DarkSlateGray */
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    color: LightSalmon; /* color cambiado a LightSalmon */
}

.course-container h2 {
    color: LightSalmon; /* título del curso */
}

section {
    margin-bottom: 1.5rem;
}

/* Botón volver */
.back-btn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background: #2F4F4F;
    color: #f0f0f0;
    text-decoration: none;
    border-radius: 10px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #1e3333;
}

/* Quiz */
#quiz-form button {
    background: #1e3333; /* más oscuro que DarkSlateGray */
    color: #d4d9b0;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0.5rem;
}

#quiz-form button:hover {
    background: #152424; /* aún más oscuro */
}

.quiz-form {
    max-width: 400px;
    margin-top: 1rem;
}

.quiz-question {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #d4d9b0;
}

.quiz-option {
    display: flex;
    align-items: center;
    background: #2F4F4F;
    margin-bottom: 0.8rem;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    user-select: none;
    color: #e1e4e8;
}

.quiz-option:hover {
    background: #3b5a5a;
}

.quiz-option input[type="radio"] {
    margin-right: 12px;
    accent-color: #1e3333;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.quiz-submit {
    margin-top: 1rem;
    background: #1e3333;
    color: #d4d9b0;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.quiz-submit:hover {
    background: #152424;
}

.quiz-result {
    margin-top: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d4d9b0;
}

/* Iconos para resultado */
.quiz-result.correct::before {
    content: "✔️";
    font-size: 1.5rem;
    color: #1e3333;
}

.quiz-result.incorrect::before {
    content: "❌";
    font-size: 1.5rem;
    color: #a52a2a;
}

  h2 {
    margin-bottom: 1rem;
    text-align: center;
  }

  .progress-container {
    width: 100%;
    max-width: 700px;
    background-color: #555;
    border-radius: 20px;
    margin: 0 auto 3rem auto; /* Centrar y margen abajo */
    height: 25px;
    overflow: hidden;
  }

  .progress-bar {
    height: 100%;
    width: 0%;
    background-color: LightSalmon;
    border-radius: 20px 0 0 20px;
    transition: width 0.5s ease;
  }

  .courses {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto; /* Centrar */
  }

.course-btn {
  display: block;
  padding: 2rem;
  background: #3b5a5a;
  color: LightSalmon;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease-in-out;
  user-select: none;
}

.course-btn:hover {
  transform: translateY(-5px);
  background: #1e3333;
  color: LightSalmon;
}
      /* Estilos para el modal de login */
    .modal {
      display: block; /* Visible al inicio */
      position: fixed;
      z-index: 999;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.5);
      font-family: Arial, sans-serif;
    }
    .modal-content {
      background-color: #3b5a5a;
      margin: 10% auto;
      padding: 2rem;
      border-radius: 10px;
      width: 300px;
      color: #e1e4e8;
      box-shadow: 0 0 10px rgba(0,0,0,0.7);
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .modal-content h2 {
      margin-bottom: 1rem;
      text-align: center;
    }
    .modal-content label {
      font-weight: bold;
    }
    .modal-content input {
      padding: 0.5rem;
      border-radius: 5px;
      border: none;
      font-size: 1rem;
    }
    .modal-content button {
      margin-top: 1rem;
      padding: 0.7rem;
      border: none;
      border-radius: 10px;
      font-weight: bold;
      cursor: pointer;
      background-color: LightSalmon;
      color: #3b5a5a;
      font-size: 1rem;
      transition: background-color 0.3s ease;
    }
    .modal-content button:hover {
      background-color: salmon;
    }
    .error-msg {
      color: #ff6961;
      display: none;
      text-align: center;
      margin-top: 0.5rem;
    }

    .progress-container {
  width: 80%;
  max-width: 700px;
  background-color: #555;
  border-radius: 20px;
  margin: 1rem auto 2rem auto;
  height: 25px;
  overflow: hidden;
  box-shadow: inset 0 0 5px #000;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: LightSalmon;
  border-radius: 20px 0 0 20px;
  transition: width 0.5s ease;
}

.progress-bar {
    height: 25px;
    width: 0%;
    background-color: LightSalmon;
    border-radius: 20px 0 0 20px;
    transition: width 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #2F4F4F;
}

.docs-container {
  background: #181c29;
  border-radius: 16px;
  padding: 20px;
  margin-top: 15px;
  box-shadow: 0 0 20px #7f5af055;
}

.upload-area {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.file-input {
  flex: 1;
  padding: 10px;
  border: 2px dashed #7f5af0;
  border-radius: 10px;
  background: #0f1218;
  color: #cdd6f4;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.file-input:hover {
  border-color: #9f79ff;
  box-shadow: 0 0 10px #9f79ff55;
}

.btn-upload {
  background: linear-gradient(135deg, #5e4bff, #7f5af0);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}
.btn-upload:hover {
  background: linear-gradient(135deg, #9f79ff, #7f5af0);
  box-shadow: 0 0 12px #9f79ff88;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.file-list li {
  background: #22273e;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 10px #7f5af022;
}

.file-list a {
  text-decoration: none;
  color: #cdd6f4;
  font-weight: 500;
  transition: color 0.3s;
}
.file-list a:hover {
  color: #9f79ff;
}

.delete-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}
.delete-btn:hover {
  background: #c0392b;
  box-shadow: 0 0 8px #e74c3c88;
}


.docs-container .btn-upload {
  background: linear-gradient(135deg, #5e4bff, #7f5af0) !important;
  color: white !important;
  border: none !important;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  transition: all 0.3s !important;
}
.docs-container .btn-upload:hover {
  background: linear-gradient(135deg, #9f79ff, #7f5af0) !important;
  box-shadow: 0 0 12px #9f79ff88 !important;
}

.docs-container .file-input {
  flex: 1 !important;
  padding: 10px !important;
  border: 2px dashed #7f5af0 !important;
  border-radius: 10px !important;
  background: #0f1218 !important;
  color: #cdd6f4 !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
}
.docs-container .file-input:hover {
  border-color: #9f79ff !important;
  box-shadow: 0 0 10px #9f79ff55 !important;
}

.docs-container .delete-btn {
  background: #e74c3c !important;
  color: white !important;
  border: none !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: background 0.3s, box-shadow 0.3s !important;
}
.docs-container .delete-btn:hover {
  background: #c0392b !important;
  box-shadow: 0 0 8px #e74c3c88 !important;
}

.docs-title {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.docs-container {
  padding: 15px;
  background: #1e1e2f;
  border-radius: 12px;
}

.upload-area {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-upload {
  background: linear-gradient(135deg, #5e4bff, #7f5af0);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s;
}
.btn-upload:hover {
  background: linear-gradient(135deg, #9f79ff, #7f5af0);
}

.file-input {
  flex: 1;
  padding: 10px;
  border: 2px dashed #7f5af0;
  border-radius: 10px;
  background: #0f1218;
  color: #cdd6f4;
}

.file-list {
  list-style: none;
  padding: 0;
}
.file-list li {
  background: #2a2a3d;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.delete-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.delete-btn:hover {
  background: #c0392b;
}


.file-upload-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    background: #f9f9f9;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.file-upload-container h3 {
    margin-bottom: 10px;
    color: #333;
}

#drop-area {
    padding: 20px;
    border: 2px dashed #007BFF;
    border-radius: 10px;
    background-color: #eaf4ff;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
}

#drop-area:hover {
    background-color: #d6ecff;
}

.file-label {
    color: #007BFF;
    text-decoration: underline;
    cursor: pointer;
}

#file-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

#file-list li {
    background: #fff;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}


#file-list li button:hover {
    background: #d63c3c;
}


#documentos {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

#upload-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#upload-form input[type="file"] {
    flex: 1;
}

#upload-form button {
    background: #4cafef;
    border: none;
    padding: 8px 14px;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

#upload-form button:hover {
    background: #2196f3;
}

#file-list {
    list-style: none;
    padding: 0;
}

#file-list li {
    background: white;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#file-list a {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
}

#file-list a:hover {
    background: #218838;
}

#file-list li {
    background: white;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#file-list div {
    display: flex;
    gap: 8px;
}

.btn-descargar {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.btn-descargar:hover {
    background: #218838;
}

.btn-eliminar {
    background: #dc3545;
    color: white;
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-eliminar:hover {
    background: #c82333;
}

.file-label {
    background: linear-gradient(135deg, #6a0dad, #b19cd9); /* Morado a lila */
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 0 8px #b19cd9;
    transition: all 0.3s ease;
    display: inline-block;
}

.file-label:hover {
    background: linear-gradient(135deg, #b19cd9, #a020f0);
    box-shadow: 0 0 12px #a020f0, 0 0 20px #d8b4fe;
}

.btn-subir {
    background: #a020f0; /* Morado neón */
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px #a020f0;
}

.btn-subir:hover {
    background: #b19cd9;
    box-shadow: 0 0 12px #d8b4fe, 0 0 20px #a020f0;
}