/* =========================================================
   RESET
========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(168, 85, 247, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(0, 251, 255, 0.08),
      transparent 30%
    ),
    linear-gradient(135deg, #08080d, #101018 50%, #08080d);
  color: #fff;
  font-family: "Poppins", Arial, sans-serif;
  overflow-x: hidden;
}

/* =========================================================
   FONDO
========================================================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.82), rgba(10, 10, 18, 0.72)),
    url("https://i.imgur.com/z4guq1U.jpeg") center / cover no-repeat;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 20%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* =========================================================
   HEADER
========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 14px 20px;

  background: rgba(10, 10, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.header-container {
  width: 100%;
  max-width: 1150px;
  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* =========================================================
   LOGO / MARCA
========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;

  color: #fff;
  text-decoration: none;

  font-size: 20px;
  font-weight: 700;

  transition: 0.3s ease;
}

.brand img {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: #fff;

  background: linear-gradient(135deg, #a855f7, #7c3aed);

  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);

  font-size: 19px;
}

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

.brand:hover i {
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.55);
}

/* =========================================================
   BOTÓN ABOUT DEL HEADER
========================================================= */

.about-header-btn {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 17px;

  border: 1px solid rgba(168, 85, 247, 0.6);
  border-radius: 10px;

  background: rgba(168, 85, 247, 0.08);

  color: #fff;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.about-header-btn i {
  color: #c084fc;
}

.about-header-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;

  transform: translateY(-2px);

  box-shadow: 0 5px 20px rgba(168, 85, 247, 0.2);
}

/* =========================================================
   MAIN
========================================================= */

.main {
  width: 100%;
  padding: 55px 20px 20px;
}

.container {
  width: 100%;
  max-width: 650px;
  margin: auto;
}

/* =========================================================
   TÍTULO
========================================================= */

.page-title {
  text-align: center;
  margin-bottom: 35px;
}

.title-icon {
  width: 70px;
  height: 70px;

  margin: 0 auto 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 20px;

  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.25),
    rgba(0, 251, 255, 0.12)
  );

  border: 1px solid rgba(168, 85, 247, 0.35);

  box-shadow: 0 0 35px rgba(168, 85, 247, 0.15);
}

.title-icon i {
  font-size: 32px;

  background: linear-gradient(135deg, #c084fc, #00fbff);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-title h1 {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-title p {
  margin-top: 8px;

  color: #aaa;

  font-size: 14px;
}

/* =========================================================
   TARJETA DEL GENERADOR
========================================================= */

.generator-card {
  width: 100%;

  padding: 30px;

  background: linear-gradient(
    145deg,
    rgba(28, 28, 39, 0.88),
    rgba(14, 14, 22, 0.9)
  );

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 22px;

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);

  position: relative;
  overflow: hidden;
}

.generator-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 10%;
  right: 10%;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.8),
    rgba(0, 251, 255, 0.5),
    transparent
  );
}

/* =========================================================
   FORMULARIOS
========================================================= */

.form-group {
  width: 100%;
  margin-bottom: 22px;
}

.form-group > label {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 9px;

  color: #ddd;

  font-size: 14px;
  font-weight: 600;
}

.form-group > label i {
  color: #a855f7;
}

/* =========================================================
   INPUT PRINCIPAL
========================================================= */

.inputBox {
  position: relative;
  width: 100%;
  margin: 20px 0;
}

.inputBox input {
  width: 100%;

  padding: 15px 15px;

  background: rgba(0, 0, 0, 0.25);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  outline: none;

  color: #fff;

  font-family: inherit;
  font-size: 14px;

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.inputBox input:focus {
  border-color: #a855f7;

  background: rgba(168, 85, 247, 0.05);

  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.inputBox span {
  position: absolute;

  left: 14px;
  top: 50%;

  transform: translateY(-50%);

  padding: 0 5px;

  color: #888;

  background: #191922;

  pointer-events: none;

  font-size: 13px;

  transition: 0.25s ease;
}

.inputBox input:focus ~ span,
.inputBox input:valid ~ span {
  top: 0;

  color: #c084fc;

  font-size: 11px;
}

/* =========================================================
   SELECT
========================================================= */

select {
  width: 100%;

  padding: 13px 15px;

  background: rgba(0, 0, 0, 0.3);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  outline: none;

  color: #fff;

  font-family: inherit;
  font-size: 14px;

  cursor: pointer;

  transition: 0.3s ease;
}

select:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

select:focus {
  border-color: #a855f7;

  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

select option {
  background: #181820;
  color: #fff;
}

/* =========================================================
   COLOR
========================================================= */

.color-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="color"] {
  width: 55px;
  height: 42px;

  padding: 3px;

  border: 1px solid rgba(255, 255, 255, 0.15);

  border-radius: 10px;

  background: rgba(0, 0, 0, 0.3);

  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 7px;
}

/* =========================================================
   CHECKBOX
========================================================= */

.checkboxBox {
  display: flex;

  align-items: center;

  gap: 10px;

  margin: 15px 0;

  cursor: pointer;

  color: #bbb;

  font-size: 14px;

  user-select: none;
}

.checkboxBox input {
  appearance: none;

  width: 20px;
  height: 20px;

  flex-shrink: 0;

  border: 1px solid #555;

  border-radius: 6px;

  background: rgba(0, 0, 0, 0.35);

  cursor: pointer;

  position: relative;

  transition: 0.25s ease;
}

.checkboxBox input:checked {
  background: linear-gradient(135deg, #a855f7, #7c3aed);

  border-color: #a855f7;

  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.checkboxBox input:checked::after {
  content: "✓";

  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -52%);

  color: white;

  font-size: 12px;
  font-weight: bold;
}

.checkboxBox span {
  color: #bbb;

  transition: 0.25s ease;
}

.checkboxBox input:checked ~ span {
  color: #c084fc;

  text-shadow: 0 0 8px rgba(192, 132, 252, 0.25);
}

/* =========================================================
   UPLOAD
========================================================= */

.uploadContainer {
  width: 100%;
  margin-top: 15px;
}

.uploadArea {
  width: 100%;

  min-height: 150px;

  padding: 25px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 9px;

  border: 1px dashed rgba(168, 85, 247, 0.6);

  border-radius: 15px;

  background: rgba(168, 85, 247, 0.04);

  cursor: pointer;

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.uploadArea:hover {
  background: rgba(168, 85, 247, 0.09);

  border-color: #a855f7;

  transform: translateY(-2px);

  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.08);
}

.uploadArea.drag {
  border-color: #00fbff;

  background: rgba(0, 251, 255, 0.06);

  box-shadow: 0 0 25px rgba(0, 251, 255, 0.12);
}

.uploadArea i {
  font-size: 38px;

  color: #a855f7;
}

.uploadArea p {
  color: #ddd;

  font-size: 14px;
  font-weight: 600;
}

.uploadArea span {
  color: #777;

  font-size: 12px;
}

/* =========================================================
   PREVISUALIZACIÓN DEL LOGO
========================================================= */

.previewBox {
  margin-top: 15px;

  padding: 12px;

  background: rgba(0, 0, 0, 0.2);

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 14px;
}

.previewBox img {
  display: block;

  width: 100%;
  max-height: 220px;

  object-fit: contain;

  border-radius: 10px;

  background: rgba(0, 0, 0, 0.25);
}

.fileInfo {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  margin-top: 10px;
}

#fileName {
  margin: 0;

  color: #aaa;

  font-size: 12px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

#removeFile {
  padding: 7px 11px;

  border: 1px solid rgba(255, 0, 60, 0.4);

  border-radius: 8px;

  background: rgba(255, 0, 60, 0.08);

  color: #ff5275;

  font-family: inherit;

  font-size: 11px;
  font-weight: 600;

  cursor: pointer;

  transition: 0.3s ease;
}

#removeFile:hover {
  background: rgba(255, 0, 60, 0.18);

  border-color: #ff003c;
}

/* =========================================================
   BOTONES
========================================================= */

.actions {
  display: flex;

  gap: 12px;

  margin-top: 25px;
}

.primary-btn,
.secondary-btn {
  flex: 1;

  min-height: 48px;

  border-radius: 12px;

  font-family: inherit;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.primary-btn {
  border: none;

  color: #fff;

  background: linear-gradient(135deg, #a855f7, #7c3aed);

  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.18);
}

.primary-btn:hover {
  transform: translateY(-2px);

  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.3);
}

.secondary-btn {
  border: 1px solid rgba(0, 251, 255, 0.4);

  color: #00fbff;

  background: rgba(0, 251, 255, 0.05);
}

.secondary-btn:hover {
  background: rgba(0, 251, 255, 0.12);

  border-color: #00fbff;

  transform: translateY(-2px);

  box-shadow: 0 10px 25px rgba(0, 251, 255, 0.1);
}

.primary-btn:active,
.secondary-btn:active {
  transform: translateY(0);
}

/* =========================================================
   RESULTADO QR
========================================================= */

.qr-result {
  margin-top: 30px;

  padding-top: 25px;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  text-align: center;
}

.qr-result h2 {
  margin-bottom: 15px;

  color: #ddd;

  font-size: 17px;
}

.canvas-container {
  display: flex;

  justify-content: center;
  align-items: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.25);

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 16px;
}

#canvas {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  transition: 0.3s ease;
}

#canvas:not([width="0"]) {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-top: 20px;
}

/* =========================================================
   ABOUT MODAL
========================================================= */

.about-panel {
  position: fixed;

  inset: 0;

  z-index: 2000;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.about-panel.active {
  opacity: 1;

  visibility: visible;

  pointer-events: auto;
}

/* =========================================================
   ABOUT CONTENT
========================================================= */

.about-content {
  position: relative;

  width: 100%;
  max-width: 560px;

  max-height: 85vh;

  overflow-y: auto;

  padding: 30px;

  border-radius: 22px;

  background: linear-gradient(
    145deg,
    rgba(30, 30, 42, 0.97),
    rgba(14, 14, 21, 0.98)
  );

  border: 1px solid rgba(168, 85, 247, 0.3);

  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);

  transform: translateY(20px) scale(0.97);

  transition: 0.3s ease;
}

.about-panel.active .about-content {
  transform: translateY(0) scale(1);
}

.about-content::-webkit-scrollbar {
  width: 4px;
}

.about-content::-webkit-scrollbar-thumb {
  background: #a855f7;

  border-radius: 10px;
}

/* =========================================================
   BOTÓN CERRAR ABOUT
========================================================= */

.about-close {
  position: absolute;

  top: 15px;
  right: 15px;

  width: 38px;
  height: 38px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.05);

  color: #aaa;

  font-size: 18px;

  cursor: pointer;

  transition: 0.3s ease;
}

.about-close:hover {
  color: #fff;

  background: rgba(255, 0, 60, 0.12);

  border-color: rgba(255, 0, 60, 0.4);

  transform: rotate(90deg);
}

/* =========================================================
   ABOUT HEADER
========================================================= */

.about-header {
  text-align: center;

  margin-bottom: 25px;
}

.about-icon {
  width: 60px;
  height: 60px;

  margin: 0 auto 12px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 17px;

  background: linear-gradient(135deg, #a855f7, #7c3aed);

  box-shadow: 0 0 25px rgba(168, 85, 247, 0.25);
}

.about-icon i {
  color: #fff;

  font-size: 25px;
}

.about-header h2 {
  color: #fff;

  font-size: 24px;
}

.about-header p {
  margin-top: 5px;

  color: #999;

  font-size: 13px;
}

/* =========================================================
   ABOUT SECCIONES
========================================================= */

.about-section {
  margin-top: 24px;
}

.about-section h3 {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 8px;

  margin-bottom: 14px;

  color: #c084fc;

  font-size: 15px;
}

.about-section h3 i {
  font-size: 13px;
}

.about-section hr {
  border: none;

  height: 1px;

  margin: 22px 0;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

/* =========================================================
   ENLACES
========================================================= */

.links {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 10px;
}

.links a {
  position: relative;

  width: 45px;
  height: 45px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.04);

  color: #bbb;

  text-decoration: none;

  font-size: 17px;

  transition:
    transform 0.25s ease,
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.links a:hover {
  color: #fff;

  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.25),
    rgba(124, 58, 237, 0.18)
  );

  border-color: rgba(168, 85, 247, 0.6);

  transform: translateY(-3px);

  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.15);
}

.links a::after {
  content: attr(title);

  position: absolute;

  left: 50%;
  bottom: calc(100% + 9px);

  transform: translateX(-50%) translateY(5px);

  padding: 6px 9px;

  border: 1px solid rgba(168, 85, 247, 0.35);

  border-radius: 7px;

  background: #111118;

  color: #ddd;

  font-size: 10px;

  white-space: nowrap;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition: 0.2s ease;

  z-index: 10;
}

.links a:hover::after {
  opacity: 1;

  visibility: visible;

  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
  width: 100%;

  margin-top: 40px;

  padding: 30px 20px;

  text-align: center;

  border-top: 1px solid rgba(255, 255, 255, 0.06);

  background: rgba(0, 0, 0, 0.18);
}

.footer p {
  color: #777;

  font-size: 12px;
}

.footer a {
  color: #a855f7;

  text-decoration: none;

  transition: 0.3s ease;
}

.footer a:hover {
  color: #c084fc;
}

/* =========================================================
   ANIMACIONES
========================================================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.generator-card {
  animation: fadeIn 0.5s ease;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {
  .header {
    padding: 11px 14px;
  }

  .header-container {
    gap: 10px;
  }

  .brand {
    font-size: 17px;
  }

  .brand i {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    font-size: 17px;
  }

  .about-header-btn {
    padding: 9px 12px;

    font-size: 13px;
  }

  .main {
    padding: 35px 14px 15px;
  }

  .page-title {
    margin-bottom: 25px;
  }

  .title-icon {
    width: 58px;
    height: 58px;

    border-radius: 16px;
  }

  .title-icon i {
    font-size: 26px;
  }

  .page-title h1 {
    font-size: 27px;
  }

  .page-title p {
    font-size: 12px;
  }

  .generator-card {
    padding: 20px;

    border-radius: 18px;
  }

  .actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .about-content {
    max-height: 90vh;

    padding: 24px 18px;

    border-radius: 18px;
  }

  .about-header h2 {
    font-size: 21px;
  }

  .links a {
    width: 43px;
    height: 43px;
  }
}

@media (max-width: 420px) {
  .brand span {
    display: none;
  }

  .about-header-btn span {
    display: none;
  }

  .about-header-btn {
    width: 40px;
    height: 40px;

    padding: 0;

    justify-content: center;
  }

  .main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .generator-card {
    padding: 16px;
  }

  .page-title h1 {
    font-size: 24px;
  }

  .inputBox input,
  select {
    font-size: 13px;
  }

  .canvas-container {
    padding: 12px;
  }
}

/* =========================================================
   REDUCIR ANIMACIONES
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.clear-btn {
  background: rgba(255, 60, 100, 0.12);
  color: #ff4f7b;
  border: 1px solid rgba(255, 60, 100, 0.5);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
}

.clear-btn:hover {
  background: #ff4f7b;
  color: white;
  border-color: #ff4f7b;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 60, 100, 0.25);
}

.clear-btn i {
  margin-right: 6px;
}

@media (max-width: 700px) {
  body::before {
    background:
      radial-gradient(
        circle at 20% 10%,
        rgba(168, 85, 247, 0.16),
        transparent 35%
      ),
      radial-gradient(
        circle at 80% 90%,
        rgba(0, 251, 255, 0.08),
        transparent 35%
      ),
      linear-gradient(180deg, #0b0712 0%, #120b1f 50%, #0b0712 100%);
  }

  body::after {
    background: radial-gradient(
      circle at center,
      transparent 20%,
      rgba(0, 0, 0, 0.35) 100%
    );
  }
}
