button#keyBtn,
.keyBtn,
.titleBtn {
  border: 1px solid rgb(0, 0, 0);
  border-radius: 10px;
  color: rgb(255 255 255);
  background-color: #222222;
  box-shadow: 1px 1px 3px #939393;
  transition: background 0.1s;
  width: 100%;
  font-size: 16px;
  position: relative;
  height: 35px;
  text-align: left;
  padding-left: 30px;
  padding-top: 1px;
  white-space: nowrap;
}

button#keyBtn img,
.keyBtn img,
.titleBtn img {
  width: 25px;
  vertical-align: middle;
  position: absolute;
  left: 5px;
  top: 1px;
  /* animation: shakeIcon 1s ease 0s 1 normal both; */
}
button#keyBtn:hover {
  background-color: rgb(0, 0, 0);
  box-shadow: 0px 0px 5px #7f7f7f;
}
#keyChatGptBtn:hover,
#titleBtn:hover {
  background-color: #78ad9f;
  box-shadow: 0px 0px 5px #7f7f7f;
  border-color: #4d7a6e;
}

#keyBardBtn:hover,
#titleBardBtn:hover {
  background-color: #9f78ad;
  box-shadow: 0px 0px 5px #7f7f7f;
  border-color: #61496a;
}

#titleBtnContain {
  display: grid;
  column-gap: 4px;
  row-gap: 4px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0px;
}

#btnContain {
  display: grid;
  column-gap: 4px;
  row-gap: 4px;
  grid-template-columns: 1fr 1fr;
}

#btnContain > button > span,
#titleBtnContain > button > span {
  padding-left: 5px;
}

#keyBtn,
.keyBtn {
  height: 35px !important;
  line-height: 1 !important;
}

#keyUniqueBtn {
  background: white;
  color: #222222;
}

/* button#keyBtn:hover > img {
} */

textarea#content-keywords-ui-textarea {
  height: 300px !important;
  font-size: 16px !important;
}

textarea[data-t="asset-title-content-tagger"] {
  height: 125px !important;
  font-size: 16px !important;
}

@keyframes shakeIcon {
  0%,
  100% {
    transform: translateX(0%);
    transform-origin: 50% 50%;
  }

  15% {
    transform: translateX(-8px) rotate(-6deg);
  }

  30% {
    transform: translateX(5px) rotate(6deg);
  }

  45% {
    transform: translateX(-5px) rotate(-3.6deg);
  }

  60% {
    transform: translateX(2.5px) rotate(2.4deg);
  }

  75% {
    transform: translateX(-3px) rotate(-1.2deg);
  }
}

.uploads-page {
  height: 100vh !important;
  max-height: none !important;
}

#extensionIframe {
  grid-column-start: 1;
  grid-column-end: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 45px;
  overflow: hidden;
  border: none;
}

.upload-tile {
  border: 1px solid #fefefe !important;
}

.upload-statusbar__wrapper {
  width: 182px !important;
}

.icon-radio-active:before {
  font-size: 15px !important;
}

.loadingThumbnail {
  border: 1px solid transparent !important;
}

.uploadingThumbnail {
  border: 1px solid rgba(4, 178, 11, 0.5) !important;
  animation: blink 0.5s step-end infinite alternate;
}

.uploadingThumbnail .upload-tile__wrapper::after {
  content: "";
  position: relative;
  display: block;
  width: 180px;
  height: 180px;
  border: 10px solid rgba(4, 178, 10, 0.863) !important ;
}

.completedThumbnail {
  border: 1px solid rgba(4, 178, 11, 0.5) !important;
  border-image: none !important;
}

.failThumbnail {
  border: 1px solid rgba(178, 4, 4, 0.5) !important;
  border-image: none !important;
}

.loadingThumbnail::before,
.uploadingThumbnail::before,
.completedThumbnail::before,
.failThumbnail::before {
  background-size: contain;
  background-repeat: no-repeat;
  width: 30px;
  height: 30px;
  margin: 5px;
  z-index: 1;
  position: absolute;
  right: 0;
  content: "";
}

/* .loadingThumbnail::before {
  background-image: url("chrome-extension://__MSG_@@extension_id__/images/loader_blue.svg");
  filter: opacity(1);
  animation: rotate-bg-loading 3s infinite linear;
} */
.uploadingThumbnail::before {
  background-image: url("chrome-extension://__MSG_@@extension_id__/images/upload_green.svg");
  filter: opacity(1);
  animation: rotate-bg-uploading 0.5s infinite linear;
}
.completedThumbnail::before {
  background-image: url("chrome-extension://__MSG_@@extension_id__/images/circle-check_green.svg");
  filter: opacity(1);
  animation: rotate-bg-completed 1s infinite linear;
}
.failThumbnail::before {
  background-image: url("chrome-extension://__MSG_@@extension_id__/images/alert-circle_red.svg");
  filter: opacity(1);
}

@keyframes rotate-bg-loading {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes rotate-bg-uploading {
  to {
    transform: rotate(360deg);
  }
}


@keyframes rotate-bg-completed {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}


/* New Styles for Blur and Floating Controls - Minimalist */
.blur-grid {
  filter: blur(5px) saturate(0.5);
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.floating-trigger {
  position: fixed;
  bottom: 24px;
  left: calc(50% - 150px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  border: none;
  color: white;
  cursor: pointer;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 600px) {
  .floating-trigger {
    left: 20px; /* On mobile, move to the left side */
    bottom: 20px;
  }
  .floating-controls {
    bottom: 80px; /* Move up so it doesn't overlap the trigger */
    left: 20px;
    transform: none;
    flex-wrap: wrap;
    width: calc(100% - 40px);
    border-radius: 20px;
    justify-content: center;
  }
  .floating-controls.collapsed {
    transform: translateY(20px) scale(0.9);
  }
}

.floating-trigger:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.floating-trigger.active {
  display: none;
}

.floating-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999999;
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  padding: 6px 12px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
}

.floating-controls.collapsed {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(40px) scale(0.8);
  pointer-events: none;
}

.floating-close-btn {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 12px !important;
  opacity: 0.6;
  transition: all 0.2s;
}

.floating-close-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.floating-close-btn svg {
  width: 18px;
  height: 18px;
}

.floating-controls .keyBtn {
  width: auto !important;
  min-width: unset !important;
  padding: 0 16px !important;
  border-radius: 30px !important;
  margin: 0 !important;
  height: 34px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: none !important;
  box-shadow: none !important;
}

.floating-controls .keyBtn img,
.floating-controls .keyBtn svg {
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

.floating-controls .auto-status {
  font-size: 12px;
  color: #b2bec3;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: none; /* Hidden by default */
  white-space: nowrap;
}

.floating-controls.running .auto-status {
  display: block;
}
.generation-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000000;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 10px; /* Thinner bezel */
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  width: auto;
  min-width: 220px;
}

.generation-overlay.active {
  display: flex;
  animation: overlayFadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.overlay-thumb-container {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: visible; /* Allow robot to overflow slightly */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.overlay-robot {
  position: absolute;
  bottom: -30px; /* Break the bezel slightly less */
  right: -30px;
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,0.3));
  z-index: 10;
  pointer-events: none;
}

.overlay-status {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 10px 0 5px 0; /* Thinner bottom bezel */
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.overlay-progress-dots::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
  display: inline-block;
  width: 1.5em;
  text-align: left;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80% { content: '...'; }
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(225, 112, 85, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(225, 112, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 112, 85, 0); }
}

.floating-controls.running #localAutoBtn {
  animation: pulse-red 2s infinite;
}

/* Duplicate file indicator */
.duplicateThumbnail {
  position: relative;
}

.duplicateThumbnail::after {
  content: 'DUPLICATE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(214, 48, 49, 0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
}

.duplicateThumbnail .upload-tile__wrapper {
  opacity: 0.35 !important;
  border: 2px solid #d63031 !important;
  border-radius: 4px;
}
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-panel {
  background: rgba(30, 30, 47, 0.85); /* Semi-transparent */
  backdrop-filter: blur(20px) saturate(1.8); /* Glass effect */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 420px;
  max-width: 90%;
  padding: 24px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.modal-icon {
  background: rgba(108, 92, 231, 0.2);
  color: #a29bfe;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  margin-bottom: 24px;
}

.modal-desc {
  font-size: 14px;
  color: #b2bec3;
  line-height: 1.5;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 12px;
  color: #636e72;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.input-group input {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.input-group input:focus {
  border-color: #6c5ce7;
  background: rgba(108, 92, 231, 0.05);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.modal-btn.primary {
  background: #6c5ce7;
  color: #fff;
}

.modal-btn.primary:hover {
  background: #5b4bc4;
  transform: translateY(-1px);
}

.modal-btn.cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border: none;
}

.modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}
