* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #15171c;
  color: white;
  font-family: Arial, sans-serif;
}

button,
select {
  font: inherit;
}

.app {
  width: min(100%, 1050px);
  margin: auto;
  padding: 24px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 32px;
}

.top p {
  margin: 7px 0 0;
  color: #aeb4c0;
}

.settings {
  display: flex;
  gap: 12px;
}

.setting {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.setting label {
  color: #d7dae0;
  font-size: 14px;
}

select {
  min-width: 155px;
  padding: 11px 13px;
  border: 1px solid #474c58;
  border-radius: 10px;
  background: #292d36;
  color: white;
}

.import-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #3b404b;
  border-radius: 14px;
  background: #20242c;
}

.import-button,
.delete-images-button {
  min-height: 46px;
  padding: 10px 15px;
}

.import-button {
  background: #9b8cff;
  color: #100a31;
}

.delete-images-button {
  background: #4a2429;
  color: #ffb8be;
}

.import-message {
  flex-basis: 100%;
  margin: 0;
  color: #aeb4c0;
  font-size: 13px;
}

.practice {
  text-align: center;
}

.image-box {
  position: relative;
  width: 100%;
  height: 56vh;
  min-height: 360px;
  max-height: 680px;
  overflow: hidden;
  border-radius: 18px;
  background: #090a0d;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#category-name {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  font-size: 14px;
  backdrop-filter: blur(8px);
}

.favorite-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 58px;
  height: 58px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.favorite-button.active {
  background: #ffd166;
  color: #201800;
  border-color: #ffd166;
}

.empty-category {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px;
  background: #111318;
  color: #bdc3ce;
}

.empty-category h2 {
  margin: 12px 0 8px;
  color: white;
}

.empty-category p {
  max-width: 440px;
  margin: 0;
  line-height: 1.5;
}

.empty-category-icon {
  font-size: 60px;
}

.timer-area {
  width: min(100%, 600px);
  margin: 18px auto;
}

#timer {
  margin-bottom: 12px;
  font-size: 52px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #343945;
}

#progress {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #62a9ff;
  transition: width 0.25s linear;
}

.main-controls,
.pose-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 13px;
}

button {
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: #f1f3f7;
  color: #17191e;
  font-weight: bold;
  cursor: pointer;
  touch-action: manipulation;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

#start {
  background: #62a9ff;
  color: #08111c;
}

#pause {
  background: #ffd166;
  color: #211900;
}

#sound-toggle {
  background: #ff9f68;
  color: #2c1103;
}

#sound-toggle.sound-off {
  background: #454b57;
  color: #d2d6dd;
}

#fullscreen {
  background: #9b8cff;
  color: #100a31;
}

.statistics,
.favorite-counter-box,
.my-images-counter-box {
  display: inline-block;
  margin-top: 20px;
  margin-right: 7px;
  padding: 12px 18px;
  border: 1px solid #3b404b;
  border-radius: 12px;
  background: #22262e;
  color: #d7dae0;
}

#counter,
#favorite-counter,
#my-images-counter {
  margin-left: 5px;
  color: white;
  font-size: 21px;
}

.finish-button,
.history-button {
  display: block;
  width: min(100%, 420px);
  margin: 20px auto 0;
}

.finish-button {
  background: #55d98a;
  color: #082314;
  font-size: 18px;
}

.history-button {
  margin-top: 12px;
  background: #323844;
  color: white;
  border: 1px solid #4a5160;
}

.summary-screen {
  min-height: 75vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.summary-card {
  width: min(100%, 760px);
  padding: 30px;
  border: 1px solid #3b404b;
  border-radius: 22px;
  background: #20242c;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.celebration {
  font-size: 58px;
}

.summary-card h2 {
  margin: 10px 0;
  font-size: 34px;
}

.summary-message {
  margin-bottom: 25px;
  color: #bdc3ce;
}

.summary-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.summary-item {
  padding: 16px;
  border: 1px solid #3b404b;
  border-radius: 14px;
  background: #292e38;
}

.summary-item span,
.summary-item strong {
  display: block;
}

.summary-item span {
  margin-bottom: 8px;
  color: #bdc3ce;
  font-size: 14px;
}

.summary-item strong {
  font-size: 18px;
}

.practiced-images,
.history-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.practiced-image,
.history-image {
  position: relative;
  height: 145px;
  overflow: hidden;
  border-radius: 12px;
  background: #0d0f13;
}

.practiced-image img,
.history-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.practiced-image span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-width: 26px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 12px;
}

.empty-message {
  padding: 18px;
  border-radius: 12px;
  background: #292e38;
  color: #bdc3ce;
}

.new-session-button {
  width: min(100%, 420px);
  margin-top: 26px;
  background: #62a9ff;
  color: #08111c;
}

.history-screen {
  min-height: 75vh;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.history-header h2 {
  margin: 0;
}

.history-header p {
  margin: 7px 0 0;
  color: #aeb4c0;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.history-card {
  padding: 20px;
  border: 1px solid #3b404b;
  border-radius: 18px;
  background: #20242c;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;
}

.history-card h3 {
  margin: 0 0 7px;
}

.history-card-date {
  color: #aeb4c0;
  font-size: 14px;
}

.delete-session {
  min-height: 42px;
  padding: 8px 12px;
  background: #4a2429;
  color: #ffb8be;
}

.history-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.history-detail {
  padding: 9px 12px;
  border-radius: 999px;
  background: #2b303a;
  color: #d7dae0;
  font-size: 14px;
}

.history-images {
  grid-template-columns: repeat(6, 1fr);
}

.history-image {
  height: 105px;
}

.more-images {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 105px;
  border-radius: 12px;
  background: #303641;
  font-weight: bold;
}

.no-history {
  padding: 50px 20px;
  border: 1px dashed #4a5160;
  border-radius: 18px;
  text-align: center;
  color: #bdc3ce;
}

.no-history-icon {
  font-size: 55px;
}

.clear-history-button {
  display: block;
  margin: 26px auto 0;
  background: #57282d;
  color: #ffc1c6;
}

.hidden {
  display: none;
}

/* Pantalla completa */

body.fullscreen-mode {
  overflow: hidden;
}

body.fullscreen-mode .top,
body.fullscreen-mode .import-area,
body.fullscreen-mode .statistics,
body.fullscreen-mode .favorite-counter-box,
body.fullscreen-mode .my-images-counter-box,
body.fullscreen-mode .finish-button,
body.fullscreen-mode .history-button {
  display: none;
}

body.fullscreen-mode .app {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100svh;
  padding: 8px;
  padding-top: calc(8px + env(safe-area-inset-top));
  padding-right: calc(8px + env(safe-area-inset-right));
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  padding-left: calc(8px + env(safe-area-inset-left));
}

body.fullscreen-mode .practice {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.fullscreen-mode .image-box {
  flex: 1;
  height: auto;
  min-height: 0;
  max-height: none;
}

body.fullscreen-mode .timer-area {
  margin: 7px auto;
}

body.fullscreen-mode #timer {
  margin-bottom: 5px;
  font-size: 36px;
}

body.fullscreen-mode .progress-track {
  height: 8px;
}

body.fullscreen-mode .main-controls,
body.fullscreen-mode .pose-controls {
  margin-top: 6px;
}

body.fullscreen-mode button {
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
}

@media (max-width: 850px) {

  .top {
    flex-direction: column;
    align-items: stretch;
  }

  .settings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  select {
    width: 100%;
    min-width: 0;
  }

}

@media (max-width: 700px) {

  .app {
    padding: 14px;
  }

  .settings {
    grid-template-columns: 1fr 1fr;
  }

  .setting:first-child {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 27px;
  }

  .import-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .import-message {
    grid-column: 1 / -1;
  }

  .image-box {
    height: 53vh;
    height: 53svh;
    min-height: 330px;
  }

  #timer {
    font-size: 44px;
  }

  .main-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pose-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  button {
    padding: 11px 8px;
    font-size: 15px;
  }

  .statistics,
  .favorite-counter-box,
  .my-images-counter-box {
    display: block;
    width: min(100%, 280px);
    margin: 14px auto 0;
  }

  .summary-data {
    grid-template-columns: 1fr;
  }

  .practiced-images {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-header {
    flex-direction: column;
    align-items: stretch;
  }

  .history-images {
    grid-template-columns: repeat(3, 1fr);
  }

  body.fullscreen-mode .app {
    padding: 5px;
    padding-top: calc(5px + env(safe-area-inset-top));
    padding-right: calc(5px + env(safe-area-inset-right));
    padding-bottom: calc(5px + env(safe-area-inset-bottom));
    padding-left: calc(5px + env(safe-area-inset-left));
  }

  body.fullscreen-mode .main-controls {
    grid-template-columns: 1fr 1fr;
  }

  body.fullscreen-mode #timer {
    font-size: 30px;
  }

  body.fullscreen-mode button {
    min-height: 44px;
    font-size: 13px;
  }

}

@media (max-width: 480px) {

  .home-header {
    flex-wrap: wrap;
    row-gap: 16px;
  }

  .home-brand {
    min-width: 0;
    flex: 1 1 100%;
  }

  .home-header .account-button {
    flex: 0 1 auto;
    margin-left: auto;
  }

}
.account-button {
  min-height: 46px;
  padding: 10px 16px;
  background: #f1f3f7;
  color: #17191e;
  white-space: nowrap;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.account-card {
  position: relative;
  width: min(100%, 430px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid #474c58;
  border-radius: 20px;
  background: #20242c;
  color: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.account-card h2 {
  margin: 0 45px 8px 0;
  font-size: 28px;
}

.account-card p {
  color: #bdc3ce;
}

.close-account {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: #353b46;
  color: white;
  font-size: 20px;
}

#account-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

#account-form label {
  margin-top: 5px;
  color: #d7dae0;
  text-align: left;
  font-size: 14px;
}

#account-form input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #4a5160;
  border-radius: 11px;
  outline: none;
  background: #15181e;
  color: white;
  font: inherit;
}

#account-form input:focus {
  border-color: #62a9ff;
}

#sign-up-button {
  margin-top: 10px;
  background: #62a9ff;
  color: #08111c;
}

#sign-in-button {
  background: #9b8cff;
  color: #100a31;
}

#account-message {
  min-height: 22px;
  margin: 6px 0 0;
  text-align: center;
  line-height: 1.4;
}

#account-message.success {
  color: #72e6a1;
}

#account-message.error {
  color: #ff9ca5;
}

#logged-user {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #3b404b;
  border-radius: 14px;
  background: #292e38;
  text-align: center;
}

#user-email {
  display: block;
  margin: 8px 0 20px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

#sign-out-button {
  width: 100%;
  background: #57282d;
  color: #ffc1c6;
}

body.account-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

@media (max-width: 850px) {
  .account-button {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .account-card {
    padding: 24px 18px;
  }
}
 /* =================================
   NUEVA PANTALLA DE INICIO
================================= */

.home-screen {
  min-height: 100vh;
  min-height: 100svh;
  padding: 38px 28px 60px;
  background:
    radial-gradient(circle at top left, rgba(116, 93, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(62, 170, 255, 0.12), transparent 30%),
    #111318;
  color: white;
}

.home-header {
  width: min(1100px, 100%);
  margin: 0 auto 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.home-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 46px;
  background:
    linear-gradient(145deg, #7267ff, #4ba7ff);
  box-shadow:
    0 16px 34px rgba(77, 108, 255, 0.32);
}

.home-brand h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
}

.home-brand p {
  margin: 10px 0 0;
  color: #aab1c2;
  font-size: 18px;
}

.home-header .account-button {
  width: auto;
  max-width: 100%;
  flex-shrink: 0;
}

.home-introduction {
  width: min(1100px, 100%);
  margin: 0 auto 28px;
  text-align: center;
}

.home-introduction h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 40px);
}

.home-introduction p {
  margin: 12px 0 0;
  color: #aeb5c4;
  font-size: 18px;
}

.content-filters {
  width: min(1100px, 100%);
  margin: 0 auto 34px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.content-filter {
  min-width: 150px;
  padding: 14px 20px;
  border: 1px solid #363c49;
  border-radius: 14px;
  background: #20242d;
  color: #d8dce6;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.content-filter:hover {
  transform: translateY(-2px);
}

.content-filter.active {
  border-color: #6e8cff;
  background:
    linear-gradient(135deg, #526dff, #8a6cff);
  color: white;
  box-shadow:
    0 10px 24px rgba(91, 104, 255, 0.28);
}

.home-categories {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.home-category-card {
  position: relative;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #303641;
  border-radius: 22px;
  background: #1b1f27;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.home-category-card:hover {
  transform: translateY(-6px);
  border-color: #7770ff;
  box-shadow:
    0 24px 46px rgba(0, 0, 0, 0.4);
}

.home-category-card img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  display: block;
  object-fit: cover;
}

.home-category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.18) 48%,
      transparent 72%
    );
  pointer-events: none;
}

.home-category-card span {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: white;
  font-size: 24px;
  font-weight: 800;
  text-align: left;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 0.9);
}

.my-photos-card-icon {
  width: 100%;
  min-height: 330px;
  display: grid;
  place-items: center;
  font-size: 96px;
  background:
    radial-gradient(circle at center, rgba(136, 110, 255, 0.42), transparent 44%),
    linear-gradient(145deg, #252936, #171a21);
}

.trainer-area {
  min-height: 100vh;
  min-height: 100svh;
}

.back-home-button {
  margin-bottom: 12px;
  padding: 10px 16px;
  border: 1px solid #3b4250;
  border-radius: 12px;
  background: #252a34;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.back-home-button:hover {
  background: #323846;
}

/* =================================
   TABLET
================================= */

@media (max-width: 900px) {

  .home-screen {
    padding: 28px 20px 50px;
  }

  .home-categories {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .home-category-card,
  .home-category-card img,
  .my-photos-card-icon {
    min-height: 300px;
  }

}

/* =================================
   TELÉFONO
================================= */

@media (max-width: 600px) {

  .home-header {
    align-items: flex-start;
  }

  .home-logo {
    width: 62px;
    height: 62px;
    font-size: 34px;
  }

  .home-brand {
    gap: 12px;
  }

  .home-brand p {
    font-size: 14px;
  }

  .home-header .account-button {
    padding: 11px 13px;
    font-size: 14px;
  }

  .content-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content-filter {
    width: 100%;
  }

  .home-categories {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-category-card,
  .home-category-card img,
  .my-photos-card-icon {
    min-height: 270px;
  }

  .home-category-card span {
    font-size: 22px;
  }

}
/* =================================
   CARPETAS DE MIS FOTOS
================================= */

.folders-button {
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: #334155;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.folders-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
}

.folders-modal.hidden {
  display: none;
}

.folders-card {
  position: relative;
  width: min(520px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  border: 1px solid #414958;
  border-radius: 20px;
  background: #20242d;
  color: white;
}

.close-folders {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #343a46;
  color: white;
  font-size: 19px;
  cursor: pointer;
}

.new-folder-area {
  display: flex;
  gap: 10px;
  margin: 22px 0;
}

.new-folder-area input {
  flex: 1;
  min-width: 0;
  padding: 13px;
  border: 1px solid #4b5565;
  border-radius: 10px;
  background: #151820;
  color: white;
  font-size: 16px;
}

.new-folder-area button {
  padding: 13px 17px;
  border: 0;
  border-radius: 10px;
  background: #6d63ff;
  color: white;
  font-weight: 800;
}

.folders-list {
  display: grid;
  gap: 10px;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid #3d4553;
  border-radius: 12px;
  background: #181c24;
}

.folder-select {
  flex: 1;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: white;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
}

.folder-row.selected {
  border-color: #8177ff;
  background: #29264a;
}

.folder-action {
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: #343b48;
  color: white;
  cursor: pointer;
}

.folder-delete {
  background: #5c2730;
}
#admin-upload-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #3b404b;
  border-radius: 16px;
  background: #20242c;
}

#admin-upload-panel h2 {
  margin-top: 0;
}

#admin-upload-panel label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 700;
}

#admin-upload-panel select,
#admin-upload-panel input,
#admin-upload-panel button {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #4a5260;
}

#admin-upload-button {
  background: #62a9ff;
  color: #08111c;
  font-weight: 700;
  cursor: pointer;
}

#admin-upload-status {
  margin: 10px 0 0;
}
#admin-delete-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #3b404b;
  border-radius: 16px;
  background: #20242c;
}

.admin-delete-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  margin-bottom: 8px;
  background: #20242c;
}

#admin-delete-panel .admin-delete-header h2 {
  margin: 0;
}

#admin-delete-close {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #697485;
  border-radius: 10px;
  background: #303744;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

#admin-load-images {
  width: 100%;
  padding: 12px;
  border: 1px solid #4a5260;
  border-radius: 10px;
  background: #62a9ff;
  color: #08111c;
  font-weight: 700;
  cursor: pointer;
}

#admin-delete-status {
  margin: 12px 0;
}

#admin-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.admin-image-card {
  padding: 10px;
  border: 1px solid #434a56;
  border-radius: 12px;
  background: #171a20;
}

.admin-image-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-image-card p {
  margin: 8px 0;
  font-size: 13px;
  word-break: break-word;
}

.admin-delete-button {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #d94a4a;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
/* ===== BARRA PRINCIPAL ===== */

.main-nav {
  width: 100%;
  background: #101a2b;
  border-top: 1px solid #34405a;
  border-bottom: 1px solid #34405a;
  margin-bottom: 28px;
  position: relative;
  z-index: 100;
}

.main-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-item,
.nav-dropdown-button {
  background: transparent;
  border: 0;
  color: white;
  padding: 16px 14px;
  font-weight: 700;
  cursor: pointer;
}

.nav-item:hover,
.nav-dropdown-button:hover {
  background: #29344b;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #7fc0ff;
  outline-offset: 2px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: #182235;
  border: 1px solid #3d4960;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  z-index: 1000;
}

.nav-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
}

.nav-dropdown-menu button:hover {
  background: #29344b;
}

.nav-dropdown-menu button:disabled {
  color: #7f8a9d;
  cursor: not-allowed;
  opacity: 0.72;
}

.nav-dropdown-menu button:disabled:hover {
  background: transparent;
}

.nav-filter-label {
  display: block;
  padding: 10px 16px 5px;
  color: #8fb7e8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.mobile-menu-button {
  display: none;
}

.admin-nav-item {
  background: #7c3aed;
}

/* ===== iPAD / MÓVIL ===== */

@media (max-width: 850px) {

  .mobile-menu-button {
    display: block;
    width: 100%;
    padding: 15px;
    background: #101a2b;
    color: white;
    border: 0;
    font-weight: 700;
  }

  .main-nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav-links.menu-open {
    display: flex;
    max-height: calc(100svh - 52px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  .nav-item,
  .nav-dropdown-button {
    width: 100%;
    text-align: left;
  }

  .nav-dropdown-menu {
    position: static;
    border-radius: 0;
  }
}
/* OCULTAR LA PORTADA ANTIGUA */

.home-introduction,
.content-filter,
.category-grid,
#buscarOpenverse {
  display: none !important;
}
/* OCULTAR LA PORTADA ANTIGUA */

.home-introduction,
.home-introduction,
.content-filter,
.category-grid,
.categories-grid,
#buscarOpenverse {
  display: none !important;
}
/* =====================================================
   POSE TRAINER - NAVEGACIÓN PRINCIPAL V2
   ===================================================== */

.main-nav {
  width: 100%;
  background: #101b2d;
  border-top: 1px solid #33435d;
  border-bottom: 1px solid #33435d;
  position: relative;
  z-index: 500;
  margin: 0;
}

.main-nav-links {
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.main-nav .nav-item,
.main-nav .nav-dropdown-button {
  min-height: 52px;
  padding: 0 15px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
}

.main-nav .nav-item:hover,
.main-nav .nav-dropdown-button:hover {
  background: #273750;
}

.nav-dropdown {
  position: relative;
  display: flex;
}

.nav-dropdown[hidden] {
  display: none !important;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  min-width: 205px;
  padding: 5px 0;

  background: #ffffff;
  border: 1px solid #d7dce4;
  border-top: 3px solid #2f7bdc;
  border-radius: 0 0 6px 6px;

  box-shadow:
    0 10px 25px rgba(0,0,0,0.22);

  z-index: 1000;
}

.nav-dropdown-menu button {
  display: block;
  width: 100%;

  padding: 12px 16px;

  border: 0;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;

  background: #ffffff;
  color: #172235;

  font-size: 14px;
  font-weight: 600;
  text-align: left;

  cursor: pointer;
}

.nav-dropdown-menu button:last-child {
  border-bottom: 0;
}

.nav-dropdown-menu button:hover {
  background: #eef4fb;
  color: #1768c4;
}

/* Abrir desplegable con ratón */
@media (hover: hover) {
  .nav-dropdown:hover > .nav-dropdown-menu {
    display: block;
  }
}

/* ADMIN */

.admin-nav-item {
  background: #6034a7 !important;
}

.admin-nav-item:hover {
  background: #7446bf !important;
}

/* BOTÓN MÓVIL */

.mobile-menu-button {
  display: none;
  width: 100%;
  min-height: 52px;

  border: 0;

  background: #101b2d;
  color: white;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;
}

/* =====================================================
   TABLET / IPAD / MÓVIL
   ===================================================== */

@media (max-width: 1000px) {

  .mobile-menu-button {
    display: block;
  }

  .main-nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav-links.menu-open {
    display: flex;
  }

  .main-nav .nav-item,
  .main-nav .nav-dropdown-button {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;

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

    text-align: left;
  }

  .nav-dropdown {
    display: block;
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 0;

    border: 0;
    border-radius: 0;

    box-shadow: none;
  }

  .nav-dropdown-menu button {
    padding-left: 34px;
  }
}

/* MENUS ABIERTOS POR JAVASCRIPT */

.nav-dropdown-menu.menu-visible {
  display: block !important;
}

.main-nav,
.main-nav-links {
  overflow: visible !important;
}

@media (max-width: 1000px) {
  .main-nav-links.menu-open {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 420px) {
  .import-area {
    grid-template-columns: 1fr;
  }

  .import-message {
    grid-column: 1;
  }
}
  /* =====================================================
   ADMIN - PANELES OCULTOS
   ===================================================== */

#admin-upload-panel,
#admin-delete-panel {
  display: none !important;
}

#admin-upload-panel.admin-panel-visible,
#admin-delete-panel.admin-panel-visible {
  display: block !important;
}
  /* =====================================================
   POSE TRAINER - FREE / PREMIUM
   ===================================================== */

.free-ad-area {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 18px;
}

.ad-label {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #8b93a3;
  text-align: center;
}

.pose-trainer-ad {
  min-height: 90px;
  padding: 18px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  border: 1px solid #36445c;
  border-radius: 12px;

  background: #111b2c;
  color: #dce5f4;

  text-align: left;
}

.pose-trainer-ad p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #8f9aae;
}

.ad-placeholder-icon {
  min-width: 46px;
  height: 46px;

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

  border: 1px solid #4b5c77;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 800;
  color: #8491a6;
}


/* CUENTA */

.account-plan-box {
  margin: 22px 0;
  padding: 18px;

  border: 1px solid #3d4d67;
  border-radius: 12px;

  background: #111a2a;

  text-align: center;
}

.account-plan-label {
  display: block;

  margin-bottom: 6px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;

  color: #8e9bb0;
}

#account-plan-name {
  display: block;

  margin-bottom: 7px;

  font-size: 22px;
  color: #ffffff;
}

#account-plan-description {
  margin: 0 0 14px;

  font-size: 13px;
  color: #aab4c4;
}

#upgrade-premium-button {
  width: 100%;

  padding: 12px 15px;

  border: 0;
  border-radius: 9px;

  background: #7445c7;
  color: white;

  font-weight: 800;
  cursor: pointer;
}


/* PREMIUM */

body.pose-premium .free-ad-area {
  display: none !important;
}

body.pose-premium #account-plan-name {
  color: #d9b8ff;
}

body.pose-premium #upgrade-premium-button {
  display: none;
}
  /* =========================================
   POSE TRAINER - PUBLICIDAD FREE / PREMIUM
   ========================================= */

/* FREE: publicidad visible */
#free-ad-area {
  display: block;
}

/* PREMIUM: publicidad completamente oculta */
body.pose-premium #free-ad-area {
  display: none !important;
}
  /* =====================================================
   POSE TRAINER - PUBLICIDAD FREE
   DISEÑO FINAL
   ===================================================== */

#free-ad-area {
  width: calc(100% - 40px);
  max-width: 960px;
  margin: 28px auto 34px;
  padding: 0;
}

#free-ad-area .ad-label {
  margin: 0 0 7px;
  padding-left: 3px;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;

  color: #727d91;
  text-transform: uppercase;
}

#free-ad-area .pose-trainer-ad {
  min-height: 92px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  padding: 18px 22px;

  background:
    linear-gradient(
      135deg,
      #151e2e,
      #101722
    );

  border: 1px solid #303c50;
  border-radius: 14px;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18);

  color: #ffffff;
}

#free-ad-area .ad-placeholder-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;

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

  border-radius: 10px;

  background: #202b3d;
  border: 1px solid #3b4960;

  color: #909db1;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

#free-ad-area .pose-trainer-ad strong {
  display: block;

  margin-bottom: 5px;

  color: #f2f5fa;

  font-size: 15px;
  font-weight: 700;
}

#free-ad-area .pose-trainer-ad p {
  margin: 0;

  color: #909bad;

  font-size: 12px;
  line-height: 1.4;
}


/* PREMIUM: NO DEJA NI ESPACIO VACÍO */

body.pose-premium #free-ad-area {
  display: none !important;
}


/* IPAD / MÓVIL */

@media (max-width: 700px) {

  #free-ad-area {
    width: calc(100% - 24px);
    margin-top: 20px;
  }

  #free-ad-area .pose-trainer-ad {
    min-height: 80px;

    padding: 14px 16px;

    gap: 12px;
  }

  #free-ad-area .ad-placeholder-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

}
  /* Ocultar el botón original de Openverse.
   Ahora se accede desde ADMIN. */

#abrirOpenverse {
  display: none !important;
}
/* Fit the practice view on iPad even when native fullscreen is unavailable. */
body.fullscreen-mode #trainer-area {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #15171c;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: auto;
}
body.fullscreen-mode #practice-screen { flex: 1; min-height: 0; }
body.fullscreen-mode #trainer-area .image-box { min-height: 80px; }
body.fullscreen-mode #free-ad-area { display: none !important; }

.first-practice-entry { margin: 1rem 0; }

#first-practice-open {
  border: 1px solid #bfa373;
  background: #2b251e;
  color: #ffdfa9;
}

#first-practice {
  box-sizing: border-box;
  width: min(calc(100% - 2rem), 40rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.25rem;
  color: #f6f4ef;
  background: #191b24;
  border: 1px solid #606575;
  border-radius: 1rem;
}

#first-practice::backdrop { background: rgb(0 0 0 / 75%); }
#first-practice li + li { margin-top: .5rem; }

#first-practice button {
  padding: .55rem .85rem;
  min-height: 44px;
}

.first-practice-header,
.first-practice-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}

.first-practice-header h2 { margin: 0; }
#first-practice-instruction { line-height: 1.5; }
#first-practice-pose {
  display: block;
  width: 100%;
  height: min(48dvh, 30rem);
  object-fit: contain;
  background: #11131a;
  border-radius: .5rem;
}

.first-practice-controls { margin-top: .75rem; }
#first-practice-clock { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.art-card { background: radial-gradient(ellipse at 60% 35%, #4c4171, #1b2032 70%); }
.loomis-card { background: radial-gradient(ellipse at 60% 35%, #42646b, #192632 70%); }
#loomis-dialog {
  box-sizing: border-box;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(12px, 3vw, 24px);
  color: #edf0fa;
  background: #202532;
  border: 1px solid #50596d;
  border-radius: 16px;
}
#loomis-dialog::backdrop { background: #0a0d16cc; }
#loomis-dialog header, .loomis-stages, .loomis-views, .loomis-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
#loomis-dialog header { justify-content: space-between; }
#loomis-dialog h2 { margin: 0; }
.loomis-badge { color: #ffe294; white-space: nowrap; }
#loomis-dialog canvas {
  display: block; width: 100%; height: auto; max-height: 57dvh;
  object-fit: contain; background: #171c29; border-radius: 10px;

}
#loomis-dialog.loomis-premium canvas { touch-action: none; cursor: grab; }
#loomis-dialog.loomis-premium canvas:active { cursor: grabbing; }
.loomis-views, .loomis-controls { margin-top: 12px; }
#loomis-dialog label { display: flex; align-items: center; gap: 6px; }
#loomis-dialog button { min-height: 40px; }

.home-header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  margin-left: auto;
}

.home-language-picker {
  display: flex;
  gap: 6px;
}

.home-language-picker button {
  display: grid;
  place-items: center;
  width: 46px;
  min-height: 44px;
  padding: 5px;
  background: #202938;
  border: 2px solid transparent;
  border-radius: 8px;
}

.home-language-picker button[aria-pressed="true"] {
  border-color: #a8c8ff;
  background: #34496c;
}

.home-language-picker button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-language-picker svg {
  display: block;
  width: 30px;
  height: 20px;
  border-radius: 3px;
}

@media (max-width: 480px) {
  .home-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-header-actions {
    grid-row: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .home-language-picker {
    order: 1;
  }
}

#open-premium {
  display: block;
  min-height: 44px;
  margin: 0 auto 12px;
  padding-inline: 1rem;
  color: #182038;
  background: #ffe294;
}

.pose-premium #open-premium,
.pose-premium #account-premium-plans {
  display: none;
}

.premium-offer {
  width: min(34rem, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(16px, 4vw, 28px);
  color: #edf0fa;
  background: #202532;
  border: 1px solid #50596d;
  border-radius: 16px;
  text-align: left;
}

.premium-offer::backdrop {
  background: #0a0d16cc;
}

.premium-offer header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.premium-offer h2 {
  margin: 0;
}

.premium-offer button {
  min-height: 44px;
}

.premium-offer h4 {
  margin: 0;
  font-size: 1rem;
}

.premium-offer ul {
  display: grid;
  gap: 6px;
  padding-left: 1.2em;
  color: #e0e7f1;
}

#premium-plan-options {
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0;
}

#premium-plan-options legend {
  padding: 0 0 8px;
  font-weight: 700;
}

#premium-plan-options label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  margin: 0 0 6px;
  border: 1px solid #52617a;
  border-radius: 8px;
  cursor: pointer;
}

#premium-plan-options label:has(input:checked) {
  background: #233658;
  border-color: #a8c8ff;
}

#premium-plan-options input {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
}

#premium-plan-options strong {
  margin-left: auto;
}

#premium-plan-options small {
  font-weight: 400;
}

.pose-premium #premium-plan-options,
.pose-premium [data-premium-copy="renewal"] {
  display: none;
}

.first-practice-entry {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

#memory-practice-open { min-height: 44px; }
#memory-practice {
  width: min(42rem, calc(100% - 2rem));
  max-height: 92dvh;
  padding: 1rem;
  background: #191b24;
  color: #f4f6fc;
  border: 1px solid #606575;
  border-radius: 1rem;
}
#memory-practice::backdrop { background: rgb(0 0 0 / 75%); }
#memory-practice-pose:not([hidden]) {
  display: block;
  width: 100%;
  height: min(48dvh, 30rem);
  border-radius: .5rem;
  background: #11131a;
  object-fit: contain;
}
#memory-practice button { min-height: 44px; padding: .55rem .85rem; }
#memory-practice-clock { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.practice-settings,
.practice-setting:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.practice-settings {
  gap: .75rem 1.5rem;
  margin: .75rem 0;
}

.practice-setting {
  gap: .5rem .75rem;
}

.practice-setting select {
  width: auto;
  min-width: 0;
  min-height: 44px;
}

#practice-photo-progress:empty,
body.fullscreen-mode .practice-settings {
  display: none;
}

.loomis-stages {
  margin: 12px 0;
}
.loomis-stages button {
  flex: 1 1 10rem;
  min-height: 44px;
  background: #2b3549;
  color: #eef3ff;
  border: 1px solid #66748c;
}
.loomis-stages button[aria-pressed="true"] {
  color: #142039;
  background: #a8c8ff;
  border-color: #a8c8ff;
}
#loomis-stage-help {
  margin: 10px 0;
  color: #dce5f5;
}

#free-ad-area.hidden { display: none !important; }
