@keyframes themeChange {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

body {
  animation: themeChange 0.5s ease-in-out;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  background: var(--primary);
  margin: 0;
  height: 100vh;
  width: 100vw;
  -webkit-transition: width 500ms cubic-bezier(0.23, 1, 0.32, 1);
  -o-transition: width 500ms cubic-bezier(0.23, 1, 0.32, 1);
  transition: all 500ms cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
  transition: all var(--transition-duration) var(--transition-timing-function);
}

.container {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding-left: 5%;
  padding-right: 5%;
}

.page {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 10px 1fr 10px 1fr 10px 1fr 10px 1fr;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 5%;
}

.image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  background-color: var(--bBackground-color);
  border: 1px solid var(--border-color);
}

.dialog-main-bg {
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(200, 200, 210, 0.09) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.33);
  box-shadow: 0 1.5px 24px rgba(0, 0, 0, 0.18), inset 0 1.5px 8px rgba(255, 255, 255, 0.10);
}

@keyframes fadeOut {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

@keyframes fadeIn {
  to { opacity: 1; visibility: visible; }
  from { opacity: 0; visibility: hidden; }
}

.copied-animation {
  -webkit-animation: fadeInOut 1s ease-in-out;
  animation: fadeInOut 1s ease-in-out;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

#share-btn { padding: 3%; border-radius: var(--border-radius); }
.disabled { pointer-events: none; opacity: 0.5; }
.enabled { pointer-events: visible; opacity: 1; }
#svg-icon { width: 20px; fill: #CFD8DC; }
.collapsed { visibility: visible; }
.expanded { visibility: visible; }
.collapsed2 { visibility: visible; }
.expanded2 { visibility: hidden; }

.bounce-click {
  -webkit-transition: -webkit-transform 0.1s ease-in-out;
  transition: -webkit-transform 0.1s ease-in-out;
  -o-transition: transform 0.1s ease-in-out;
  transition: transform 0.1s ease-in-out;
  transition: transform 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out;
}

.bounce-click:active {
  -webkit-transform: scale(0.9);
  -ms-transform: scale(0.9);
  transform: scale(0.9);
}

#search-input {
  -webkit-transition: all 0.1s ease-in-out;
  -o-transition: all 0.1s ease-in-out;
  transition: all 0.1s ease-in-out;
  border-color: var(--input-border);
}

input[disabled] {
  background-color: #f2f2f2;
  color: #999;
  cursor: not-allowed;
}

#dialog-tittle, #dialog-tittle-pp, #dialog-tittle-p { visibility: hidden; }

.slide-top { animation: slide-top 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; }
@keyframes slide-top {
  0% { -webkit-transform: translateY(50px); transform: translateY(50px); opacity: 0; }
  100% { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; visibility: visible; }
}

.slide-bottom { animation: slide-bottom 0.2s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; }
@keyframes slide-bottom {
  0% { -webkit-transform: translateY(0); transform: translateY(0); visibility: visible; opacity: 1; }
  100% { -webkit-transform: translateY(50px); transform: translateY(50px); opacity: 0; visibility: hidden; }
}

#settings-bg { visibility: hidden; background: black; }
.settings-scrollable-content { max-height: calc(100vh - 70px); overflow-y: auto; padding-right: 8px; scroll-behavior: smooth; }
#google-lens-btn { padding: 3%; border-radius: var(--border-radius); }

#container-dialog {
  border-radius: 18px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.17);
  background: rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

#mainnnnn-bg {
  width: 100%;
  height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  z-index: 3;
  background: rgba(30, 30, 30, 0.5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- ESTILOS PARA FAVORITOS --- */
.fav-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  transition: transform 0.2s, background-color 0.2s;
}

.fav-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
}

/* --- NUEVO: ESTILOS PARA BOTON COPIAR --- */
.copy-btn {
  position: absolute;
  top: 5px;
  right: 40px; /* Desplazado a la izquierda del fav-btn */
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  transition: transform 0.2s, background-color 0.2s;
  color: white;
}

.copy-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
}

.figure-container {
  position: relative; /* Importante para que los botones se posicionen dentro */
}