:root {
  --primary-color: #c667ff;
  --secondary-color: #9d34d4;
  --background-color: #f7fafc;
  --text-color: #1e293b;
  --light-grey: #e8ecef;
  --soft-grey: rgb(239, 241, 244);
  --light-grey-dark: #dbe2ea;
  --dark-grey: #717b83;

  --card-background: #ffffff;
  --left-sidebar-width: 300px;

  --white: #ffffff;
  --white-dark: #f8f8f8;
  --red: #dc3545;
  --red-dark: #B12836;

  --button-color: var(--text-color);
  --button--hover-color: #000;

  --mindmap-item-bg: var(--white);
  --mindmap-item-hover-bg: #f5f5f7;
  --dot-color: #e5e7eb;
}


@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #59008e;
    --secondary-color: #7723a4;
    --background-color: #131515;
    --text-color: #CCC7C1;
    --light-grey: #232627;
    --light-grey-dark: #282b2d;
    --dark-grey: #85919b;
    --soft-grey: #151515;
    --card-background: #181a1b;

    --white: #181A1B;
    --white-dark: #1C1E1F;
    --red: #a51d2a;
    --red-dark: #8e202b;

    --button-color: var(--primary-color);
    --button--hover-color: var(--secondary-color);

    --mindmap-item-bg: var(--white);
    --mindmap-item-hover-bg: #1E2021;
    --dot-color: #222;
  }
}


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

body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--background-color);
  color: var(--text-color);
  position: relative;
  overflow-x: hidden;
}

.feedback-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 10px;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 1000;
  width: 45px;
  overflow: hidden;
}

.feedback-button:hover {
  width: 130px;
}

.feedback-button img {
  width: 25px;
  height: 25px;
  margin-right: 10px;
}

.feedback-button span {
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feedback-button:hover span {
  opacity: 1;
}

.clear-history-button .delete-icon {
  margin-right: 5px;
}

.clear-history-button .delete-icon path {
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.clear-history-button:hover .delete-icon path:nth-child(1),
.clear-history-button:hover .delete-icon path:nth-child(2) {
  transform: rotate(26deg) translateX(-5px) translateY(-1px);
}

#mindmap {
  position: relative;
  margin: 0;
  height: 100vh;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  background: #f8fafc;
  display: none;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#svg-output > svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}


#mindmap svg path,
#mindmap>svg>g>g>line,
.mm-link,
.mm-link-straight {
  stroke-opacity: 1 !important;
  fill-opacity: 1 !important;
  transition: d 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              x1 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              y1 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              x2 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              y2 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.3s ease,
              stroke-width 0.3s ease,
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}

#loading-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  background-color: var(--background-color);
  border-radius: 10px;
  width: 100vw !important;
  height: 100vh !important;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  background-color: transparent;
  height: 60px;
  z-index: 1000;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none; 
}

.navbar * {
  pointer-events: auto;
}


.text-logo {
  display: flex !important;
  align-items: center !important;
  margin-left: 0;
}

.logo {
  margin-right: 10px;
  height: 40px;
  width: auto;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-text {
  font-size: 1.8em;
  font-weight: 800;
  width: calc(100vw - 400px);
  color: var(--text-color);
  margin-left: 0;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 730px) {
  .logo-text {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav-links svg {
    display: none;
  }
}

.outage-notification {
  display: none;
}

.nav-links {
  margin-left: auto;
  margin-right: 5px;
  display: flex;
  align-items: center;
}

#app {
  margin: 100px 0 40px 0; 
  padding: 0 20px;
  position: relative;
  z-index: 100;
  pointer-events: none;
  border-radius: 20px;
  height: calc(100vh - 240px);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#app .input-wrapper,
#app .recent-list,
#app .recent-mindmaps,
#app .youtube-popup,
#app .youtube-popup-content,
#app a,
#app button,
#app input {
  pointer-events: auto;
}

.header {
  position: relative;
  text-align: center;
  align-items: center;
  margin-top: 20vh;
  margin-bottom: 30px;
  z-index: 100;
  padding: 0px 0px 10px 0px;
  border-radius: 20px;
  backdrop-filter: blur(80px);
  display: block;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

@media (max-width: 750px) {
  .header {
    margin-top: 20vh;
  }
}

#header.header-hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#header.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header h1 {
  font-size: 3rem;
  color: var(--text-color);
  margin: 0 auto 30px;
  line-height: 1.2;
  font-weight: 800;
  width: 100%;
  max-width: 550px;
}

.header-title-highlight {
  color: var(--primary-color);
}

@media (prefers-color-scheme: dark) {
  .header-title-highlight {
    color: var(--text-color);
  }
}

@media (max-width: 750px) {
  .header h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
    padding: 0 10px;
    color: var(--text-color);
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
  }

  .input-wrapper {
    margin-top: 30px !important;
    height: auto !important;
    font-size: 0.85rem !important;
    min-height: 50px !important;
  }

  .input {
    padding-left: 20px !important;
    font-size: 1.1rem;
  }
}

@media (max-width: 425px) {
  .header h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 375px) {
  .header h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    width: 100%;
    max-width: 500px;
  }
}

.input-wrapper {
  width: 100%;
  max-width: 550px;
  min-height: 60px;
  height: auto;
  border-radius: 32px;
  padding: 0;
  border: 2.5px solid var(--white);
  font-size: 1.1rem;
  resize: vertical;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  background-color: var(--white);
  transition: border-color 0.3s ease;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding-bottom: 0px;
}

.input-wrapper:focus-within {
  outline: none;
  border-color: var(--primary-color);
}

.input {
  flex-grow: 1;
  height: auto;
  min-height: 50px;
  max-height: 160px;
  border: none;
  outline: none;
  padding: 14px 0 14px 20px;
  padding-right: 50px;
  background-color: var(--white);
  color: var(--text-color);
  font-size: 1.15rem;
  border-radius: 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
  resize: none;
  overflow-y: hidden;
  line-height: 1.5;
  box-sizing: border-box;
  margin: 0;
  display: block;
  transition: height 0.2s ease-out;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.input::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

.input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #292524 inset;
  -webkit-text-fill-color: #ffffff;
}

.send-prompt-btn {
  height: 48px;
  width: 48px;
  background-color: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: rgb(0, 0, 0);
  cursor: pointer !important;
  font-weight: 500;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 4px;
  right: 4px;
  transition: all 0.3s;
  margin: 0;
  z-index: 10;
}

.input-wrapper:active .icon {
  transform: scale(1.3);
}

.send-prompt-btn:hover {
  color: white;
}

.send-prompt-btn:hover .arrow {
  margin-right: 0;
  animation: jello-vertical 0.9s both;
  transform-origin: right;
}

@keyframes jello-vertical {
  0% {
    transform: scale3d(1, 1, 1);
  }

  30% {
    transform: scale3d(0.75, 1.25, 1);
  }

  40% {
    transform: scale3d(1.25, 0.75, 1);
  }

  50% {
    transform: scale3d(0.85, 1.15, 1);
  }

  65% {
    transform: scale3d(1.05, 0.95, 1);
  }

  75% {
    transform: scale3d(0.95, 1.05, 1);
  }

  100% {
    transform: scale3d(1, 1, 1);
  }
}

.send-prompt-btn:active {
  transform: scale(0.9);
}

.centered-div {
  justify-content: center;
  align-items: flex-start;
  height: auto;
}

.send-icon {
  margin: 3px;
}

.banner-outage {
  display: none;
}

.cf-turnstile {
  margin-top: 10px;
}

.ai-content-disclaimer {
  position: fixed;
  bottom: 10px;
  left: 10px;
  margin-right: 15px !important;
  z-index: 100;
  background-color: var(--background-color);
  padding: 5px 10px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  color: var(--text-color);
  display: none;
  opacity: 0.6;
}

.back-arrow {
  position: relative;
  top: 3px;
  border: 0;
  height: 20px;
  width: 20px;
  margin-left: 5px;
}

.legals-disclaimer {
  position: fixed;
  bottom: 10px;
  left: 0;
  text-align: center;
  z-index: 1000;
  background-color: var(--background-color);
  padding: 5px 10px;
  border-radius: 4px;
  backdrop-filter: blur(5px);
  color: #333333;
  margin: 0 auto;
  display: none;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dialog-button {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.dialog-button.cancel {
  background-color: var(--light-grey);
  color: var(--text-color);
}

.dialog-button.cancel:hover {
  background-color: var(--light-grey-dark);
}

.dialog-button.confirm {
  background-color: var(--primary-color);
  color: white;
}

.dialog-button.confirm:hover {
  background-color: var(--secondary-color);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  display: none;
  z-index: 3200;
}

.sign-in-button {
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 6px 25px;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 40px;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
}

.sign-in-button:hover {
  background-color: var(--white);
}

.sign-up-button {
  background-color: var(--text-color);
  color: var(--white);
  padding: 6px 25px;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 40px;
  border: 2px solid var(--text-color);
  align-items: center;
  position: relative;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.sign-up-button:hover {
  background-color: var(--white);
  color: var(--text-color);
}

@media (max-width: 435px) {
  .sign-in-button {
    display: none;
  }
}

.youtube-button-container {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.youtube-btn {
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: #1e293b;
  border: 2px solid var(--light-grey);
  border-radius: 40px;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 500;
  cursor: not-allowed;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: none;
}

.youtube-btn:hover {
  background-color: #f8f8f8;
}

.youtube-icon {
  margin-right: 10px;
  color: #ff3130;
}

.title-youtube-icon {
  color: #ff3130;
}

.youtube-popup {
  display: none;
  position: fixed;
  z-index: 9999 !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.32);
  justify-content: center;
  align-items: center;
}

.youtube-popup-content {
  background-color: white;
  border-radius: 28px;
  box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
    0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  padding: 24px;
  position: relative;
}

.youtube-close-button {
  background: transparent;
  border: none;
  padding: 8px;
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  transition: background-color 0.2s;
}

.popup-header {
  padding: 0px;
}

.youtube-description {
  margin: 15px 0;
  color: var(--text-color);
  font-size: 1rem;
}

.youtube-input-wrapper {
  width: 100%;
  height: 55px;
  border-radius: 40px;
  padding: 0;
  border: 2px solid var(--light-grey);
  font-size: 1.1rem;
  box-sizing: content-box;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  transition: border-color 0.3s ease;
  position: relative;
  margin: 30px auto 0;
}

.youtube-input-wrapper:focus-within {
  outline: none;
  border-color: #ff3130;
}

.youtube-input {
  flex-grow: 1;
  height: 94%;
  border: none;
  outline: none;
  padding-left: 15px;
  background-color: #ffffff;
  color: black;
  font-size: 1.2rem;
  border-radius: 40px;
  width: calc(100% - 60px);
}

.youtube-send-btn {
  height: 47px;
  width: 47px;
  background-color: #ff3130;
  border: none;
  border-radius: 40px;
  color: white;
  cursor: pointer;
  font-weight: 500;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 4.5px;
  right: 5px;
  transition: all 0.3s;
}

.youtube-send-btn:hover {
  background-color: #c50000;
}

.youtube-send-btn:active {
  transform: scale(0.9);
}

.youtube-send-btn .send-icon {
  margin: 0;
  width: 24px;
  height: 24px;
  color: white;
}

.manual-button-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.manual-btn,
.upload-pdf-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background-color: var(--white);
  color: var(--text-color);
  border: none;
  border-radius: 40px;
  padding: 8px 18px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
}


.pdf-upload-zone,
.header.drag-over {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drag-drop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff67;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  display: flex;
  border: 3px solid #fd2f2f;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
  box-sizing: border-box;
  margin: 0;
}

.drag-drop-overlay.active {
  opacity: 1;
  visibility: visible;
  width: calc(100vw - 12px);
  margin: 6px;
  height: calc(100vw - 12px);
}

.drag-drop-content {
  text-align: center;
  color: var(--text-color);
  max-width: 500px;
  padding: 40px;
}

.drag-drop-icon {
  margin-bottom: 24px;
}

.drag-drop-icon svg {
  width: 64px;
  height: 64px;
  stroke: #fd2f2f;
  stroke-width: 1.5;
}

.drag-drop-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text-color);
  font-family: "SF Pro Display", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.drag-drop-content p {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 400;
}

.manual-btn:hover,
.upload-pdf-button:hover {
  background-color: var(--white-dark);
}

.manual-icon,
.upload-pdf-button svg {
  color: var(--text-color);
  margin-right: 10px;
}

.manual-icon .rotatable-group {
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.manual-btn:hover .manual-icon .rotatable-group {
  transform: rotate(7deg);
}

.download-options-popup {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.32);
  z-index: 3200;
  justify-content: center;
  align-items: center;
}

.download-options-popup.show {
  opacity: 1;
  visibility: visible;
}

.download-options-popup-content {
  background-color: var(--white);
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -45%) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 28px;
  box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
    0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 460px;
  padding: 24px;
}

.download-options-popup.show .download-options-popup-content {
  transform: translate(-50%, -50%) scale(1);
}

.download-options-popup-content .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 !important;
}

.popup-header h2 {
  color: var(--text-color);
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0;
}

.close-button {
  background: transparent;
  border: none;
  float: right;
  padding: 8px;
  position: relative;
  margin-top: 0px;
  right: 0px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  transition: background-color 0.2s;
}

.close-button:hover,
.youtube-close-button:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.close-button svg {
  fill: var(--text-color);
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.popup-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.popup-buttons button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.download-options-popup-content .popup-buttons button {
  flex: none !important;
}


.format-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.format-selector label {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
}

.material-dropdown {
  width: 100%;
  padding: 12px 16px;
  border-radius: 40px;
  border: 2px solid var(--light-grey) !important;
  background-color: var(--white);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%209%206%206%206-6%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  margin-top: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.download-options-popup .material-dropdown {
  margin-top: 0px !important;
}

@media (prefers-color-scheme: dark) {
  .material-dropdown {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%209%206%206%206-6%22%2F%3E%3C%2Fsvg%3E");
  }
}

.material-dropdown:hover {
  border-color: var(--text-color);
}

.material-dropdown:focus {
  outline: none;
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 24px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.download-button {
  background-color: var(--primary-color);
  color: white;
  font-size: 1rem;
}

.download-button:hover {
  background-color: var(--secondary-color);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.print-button {
  background-color: var(--light-grey);
  color: var(--text-color);
  font-size: 1rem;
  border: 2px solid var(--light-grey);
  transition: all 0.2s ease;
  border-radius: 50%;
  height: 44px;
  width: 44px;
}

.print-button:hover {
  background-color: var(--light-grey-dark);
  border-color: var(--light-grey-dark);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.divider {
  height: 1px;
  background-color: var(--light-grey);
  margin: 8px 0;
}

@media (max-width: 480px) {
  .download-options-popup-content {
    margin: 0px;
    padding: 16px;
  }
}

h2 {
  margin: 0;
  color: var(--text-color);
  font-size: 24px;
}

.share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 3199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.share-overlay.show {
  opacity: 1;
  visibility: visible;
}

.share-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) scale(0.95);
  background: var(--white);
  padding: 1.5rem;
  border-radius: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 90%;
  height: 480px;
  max-width: 400px;
  z-index: 3200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.share-dialog.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--white-dark);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  corner-shape: round !important;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

.share-loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  pad: 0px 20px;
}

.share-upload-loader {
  display: block;
  --height-of-loader: 4px;
  --loader-color: var(--primary-color);
  width: 100%;
  height: var(--height-of-loader);
  border-radius: 30px;
  background-color: rgba(0, 0, 0, 0.2);
  position: relative;
  margin: 20px auto;
}

.share-upload-loader::before {
  content: "";
  position: absolute;
  background: var(--loader-color);
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  border-radius: 30px;
  animation: share-upload-moving 1s ease-in-out infinite;
}

@keyframes share-upload-moving {
  50% {
    width: 100%;
  }
  100% {
    width: 0;
    right: 0;
    left: unset;
  }
}


@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.share-dialog p {
  text-align: left;
  margin: 10px 0;
  color: var(--text-color);
}

.share-dialog h3 {
  font-weight: 600;
}

.share-link-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 1rem;
}

.share-link {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  border: 2px solid var(--primary-color);
  color: var(--text-color);
  border-radius: 30px;
  font-size: 1rem;
  background: var(--white-dark);
  padding-right: 3rem;
}

.share-link:focus, .share-link:active {
  outline: none;
  border-color: var(--secondary-color);
}

.copy-link-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 85px;
  transition: background-color 0.2s, color 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
  background-color: var(--primary-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.copy-link-btn:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

.copy-link-btn svg {
  width: 17px;
  height: 17px;
}

.qr-code-container {
  display: block;
  margin: 0rem auto 1.5rem auto;
  text-align: center;
  background-color: #fff;
  border-radius: 10px;
}

.qr-code-container canvas {
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.qr-code-container:hover canvas {
  transform: scale(1.05);
}

.qr-code-container-hr {
  display: block;
}

/* QR Code Fullscreen Overlay */
.qr-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: background-color 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.qr-fullscreen-overlay.show {
  background-color: rgba(0, 0, 0, 0.85);
  opacity: 1;
  visibility: visible;
}

.qr-fullscreen-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.5);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.qr-fullscreen-overlay.show .qr-fullscreen-container {
  transform: scale(1);
  opacity: 1;
}

.qr-fullscreen-close {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.qr-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.qr-fullscreen-close svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2;
}

.qr-fullscreen-canvas {
  border-radius: 20px;
  background: white;
  padding: 20px;
}

.qr-fullscreen-canvas canvas {
  display: block;
  border-radius: 10px;
}

.share-mm-button img {
  display: block;
  margin: 0;
}

.share-mm-button:hover {
  background-color: var(--background-color) !important;
}

.visibility-control {
    text-align: left;
    margin: 15px 0 20px 0;
    padding: 0 5px;
    display: flex;
    align-items: center;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-label-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.info-icon-wrapper {
    position: relative;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.info-icon:hover {
    opacity: 0.6;
}

.custom-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 140%; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    width: 200px;
    line-height: 1.4;
    z-index: 10000;
    transition: opacity 0.2s;
    pointer-events: none; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.custom-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.custom-tooltip.show {
    visibility: visible;
    opacity: 1;
}

#user-button {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 3000;
}

.button-container {
  position: fixed;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  z-index: 1000;
  background: var(--white);
  border: none;
  border-radius: 50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: none;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 800px) {
  .button-container {
    top: 0;
    right: 0;
    border-radius: 0 0 0 30px;
    transform: none;
    z-index: 1000;
  }

  #user-button {
    top: 20px;
    right: 17px;
    z-index: 3001;
  }

  .button-container-app {
    padding-top: 60px;
  }
}

.download-mindmap-btn,
.edit-mode-button,
.regenerate-button,
.share-mm-button,
.customize-mode-button,
.chat-toggle-button {
  position: static;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 47px;
  width: 47px;
  padding: 0;
  background: var(--white);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: none;
  color: var(--text-color) !important;
  transition: all 0.3s ease;
  overflow: hidden;
}
.regenerate-button {
  display: none !important;
}

.download-mindmap-btn svg,
.fit-button svg,
.chat-toggle-button svg,
.regenerate-button svg,
.share-mm-button svg,
.customize-mode-button svg {
  display: block;
  height: 20px;
  width: 20px;
}

.edit-mode-button svg {
  display: block;
  height: 21px;
  width: 21px;
}

.upload-pdf-button svg {
  margin-top: 3px;
  display: block;
  height: 22px;
  width: 22px
}

.share-mm-button svg polyline,
.upload-pdf-button svg polyline {
  transition: transform 0.2s ease;
}

.share-mm-button:hover svg polyline,
.upload-pdf-button:hover svg polyline {
  transform: translateY(-1px);
}

.edit-mode-button:hover svg path:nth-child(1),
.customize-mode-button:hover svg path:nth-child(1) {
  transform-origin: center center;
  transition: transform 320ms ease;
}

.edit-mode-button:hover svg path:nth-child(1),
.customize-mode-button:hover svg path:nth-child(1) {
  transform: rotate(15deg);
  transition: transform 320ms ease;
}

.download-mindmap-btn svg polyline {
  transition: transform 0.2s ease;
}

.download-mindmap-btn:hover svg polyline {
  transform: translateY(1.5px);
}

.fit-button svg path {
  transition: transform 0.2s ease;
}

.fit-button:hover svg path:nth-child(1) {
  transform: translate(1px, 1px);
}

.fit-button:hover svg path:nth-child(2) {
  transform: translate(-1px, 1px);
}

.fit-button:hover svg path:nth-child(3) {
  transform: translate(1px, -1px);
}

.fit-button:hover svg path:nth-child(4) {
  transform: translate(-1px, -1px);
}

.regenerate-button svg {
  transition: transform 0.2s ease-in-out;
  transform-origin: center center;
}

.regenerate-button:hover svg {
  transform: rotate(-20deg);
}

.chat-toggle-button svg {
  transition: transform 0.2s ease-in-out;
  transform-origin: center center;
}

.chat-toggle-button:hover svg {
  transform: rotate(-90deg);
}

.download-mindmap-btn:hover,
.edit-mode-button:hover,
.regenerate-button:hover,
.share-mm-button:hover,
.customize-mode-button:hover,
.chat-toggle-button:hover {
  background-color: var(--background-color) !important;
}

.regenerate-button:hover {
  background: var(--background-color);
}

@keyframes spin-counterclockwise {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

.regenerate-button.rotating svg {
  animation: spin-counterclockwise 1s linear infinite;
  color: var(--text-color);
}

.edit-mode-button:hover {
  background: #f5f5f5;
}

.download-mindmap-btn:hover {
  background: #f5f5f5;
}

.help-mm-button {
  position: static;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 47px;
  width: 47px;
  padding: 0;
  background: var(--white);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: none;
  color: var(--text-color) !important;
  transition: all 0.3s ease;
  overflow: hidden;
}

.help-mm-button svg {
  display: block;
  height: 20px;
  width: 20px;
  transition: all 0.3s ease;
}

.help-mm-button:hover {
  background-color: var(--background-color) !important;
}

.context-menu {
  background-color: var(--white);
  border: none;
  border-radius: 20px;
  z-index: 1000;
  position: absolute;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transform-origin: top left;
  animation: contextMenuScaleIn 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  will-change: transform, opacity;
  width: max-content;
  corner-shape: round;
}

@keyframes contextMenuScaleIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

#svg-output svg.appearing .mm-stage {
  transform-origin: 50% 50%;
  animation: mmwPopIn 0.4s cubic-bezier(0.1, 0.1, 0.2, 1) both;
  will-change: transform, opacity;
}

#svg-output {
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.pop-anim {
  animation: mmwPopIn 0.4s cubic-bezier(0.1, 0.1, 0.2, 1) both;
}

#svg-output,
#mindmap {
  overflow: hidden;
}

@keyframes mmwPopIn {
  0% {
    transform: translate(-40%, -40%) scale(0.0005);
    opacity: 0;
  }

  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}


@media (prefers-reduced-motion: reduce) {
  .context-menu {
    animation: none !important;
  }

  #svg-output svg.appearing .mm-stage {
    animation: none !important;
  }
}

#svg-output {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background-color: var(--editor-bg);
    background-image: radial-gradient(circle, var(--dot-color) 5%, transparent 5.5%);
    background-size: 20px 20px;
    border-radius: 0px !important;
  }

.context-menu-buttons-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 10px;
  gap: 4px;
}

.context-menu-button {
  font-family: "SF Pro Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
  color: var(--text-color);
  padding: 8px 16px 8px 12px;
  font-size: 1rem;
  font-weight: 400;
  width: 100%;
  border: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  corner-shape: round;
}

.context-menu-button svg {
  color: var(--text-color);
}

.context-menu-button:hover {
  background-color: var(--background-color);
}

.delete-node-button .delete-node-icon path {
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.delete-node-button:hover .delete-node-icon path:nth-child(1),
.delete-node-button:hover .delete-node-icon path:nth-child(2) {
  transform: rotate(26deg) translateX(-5px) translateY(-1px);
}

.delete-node-button:hover {
  background-color: rgba(255, 0, 51, 0.1);
  color: crimson;
}

.delete-node-button:hover svg {
  color: crimson;
}

.delete-node-button svg {
  margin-right: -7px;
  margin-left: -4px;
}

.delete-node-button {
  max-height: 35.2px !important;
  gap: 20px !important;
}

.editor-toolbar {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 9999;
  background-color: var(--white);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 20px;
  padding: 8px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 6px;
}

@media (max-width: 800px) {
  @media (hover: none) and (pointer: coarse) {
    .editor-toolbar {
      display: none;
    }
  }

}

.editor-toolbar>div>button {
  transition: all 0.3s ease !important;
  font-weight: 500;
  font-size: 0.9rem;
  gap: 2px;
}

.editor-toolbar>div>button:hover {
  background-color: var(--mindmap-item-hover-bg) !important;
}

@keyframes blurin {
  0% {
    transform: translateX(-50%) scale(0.9);
    filter: blur(10px);
    opacity: 0;
  }

  100% {
    transform: translateX(-50%) scale(1);
    filter: blur(0px);
    opacity: 1;
  }
}

.editor-toolbar {
  animation-name: blurin;
  animation-duration: 0.2s;
  animation-timing-function: ease-out;
}

.editor-overlay.show {
  opacity: 1;
  visibility: visible;
}

.editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 3200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mm-customization-panel {
  opacity: 0;
  visibility: hidden;
  position: relative;
  transform: translateX(30px) scale(0.95);
  width: 100%;
  max-width: 900px;
  z-index: 3201;
  background-color: var(--white);
  color: var(--text-color);
  border-radius: 30px;
  box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
    0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
  padding: 24px 0 24px 24px;
  transition: all 0.3s ease;
}

@media (max-width: 590px) {
  .mm-customization-panel {
    border-radius: 30px;
    transform: translateX(0) translateY(20px) scale(1);
  }
  .mm-customization-panel.show {
    border-radius: 0px;
  }
}

.mm-customization-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) translateY(0) scale(1);
}

.mm-customization-panel h3 {
  font-size: 1.8rem;
}

.mm-customization-panel .field-group {
  margin-top: 30px;
  margin-bottom: 30px;
}

.mm-customization-panel .segmented {
  background-color: var(--mindmap-item-hover-bg);
  height: 35px;
  border-radius: 60px;
  margin-top: 8px;
  margin-bottom: 20px;
  gap: 6px;
  transition: all 0.3s ease;
}

@media (max-width: 880px) {
  .customization-preview {
    display: none !important;
  }

  .mm-customization-panel {
    max-width: 600px;
    padding: 24px;
  }

  .editor-buttons {
    margin-right: 0 !important;
  }
}

.customization-preview {
  width: 425px;
  height: 480px;
  max-width: 425px;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: none;
  overflow: hidden;
  box-sizing: border-box;
}

.customization-preview #svg-preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-image: radial-gradient(circle, var(--light-grey) 6%, transparent 10%);
  background-size: 30px 30px;
  overflow: hidden;
}

.customization-preview #preview-svg {
  transform-origin: 0px 0px;
  flex-shrink: 0;
}

.customization-preview #preview-svg svg {
  font-display: swap;
}

.mm-preview-node {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.seg-btn {
  padding: 3px 8px;
  height: 35px;
  border-radius: 60px;
  border: none;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.seg-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--text-color);
  border-radius: 60px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.seg-slider.right {
  transform: translateX(100%);
}

.mm-customization-panel .card {
  border-radius: 20px;
  padding: 25px;
  background-color: var(--mindmap-item-hover-bg);
}

.mm-customization-panel .card div {
  margin-bottom: 16px;
}

.mm-customization-panel .card div:last-child {
  margin-bottom: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--light-grey);
  transition: .4s;
  border-radius: 34px;
  corner-shape: round !important;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: none;
}

input:checked+.slider {
  background-color: var(--primary-color);
}

input:checked+.slider:before {
  transform: translateX(13.5px);
}

.download-options-selectors {
  background-color: var(--background-color);
  padding: 24px;
  border-radius: 18px;
  height: 175px;
}

.download-options-popup-content input[type="range"]{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--light-grey);
  margin: 0;
}

.download-options-popup-content input[type="range"]::-webkit-slider-runnable-track{
  height: 6px;
  background: transparent;
  border-radius: 40px;
}

.download-options-popup-content input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: calc((6px - 20px)/2);
}

.download-options-popup-content input[type="range"]::-moz-range-track{
  height: 6px;
  background: var(--light-grey);
  border-radius: 40px;
}
.download-options-popup-content input[type="range"]::-moz-range-thumb{
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

}

.download-options-popup-content input[type="range"]::-moz-range-progress{
  height: 6px;
  background: var(--primary-color);
  border-radius: 40px;
}

.download-options-popup-content input[type="range"]{
  background:
    linear-gradient(
      to right,
      var(--primary-color) 0%,
      var(--primary-color) var(--percent, 50%),
      var(--light-grey) var(--percent, 50%),
      var(--light-grey) 100%
    );
}

.download-options-popup-content input[type="range"]:focus{ outline: none; }



.style-selector-btn {
  border: 2.5px solid transparent !important;
  box-sizing: border-box !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.style-selector-btn.active {
  border: 2.5px solid var(--text-color) !important;
  background-color: var(--mindmap-item-hover-bg);
  box-sizing: border-box !important;
}

.style-selector-btn.active:hover {
  background-color: var(--light-grey-dark);
}

.mm-customization-panel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--light-grey);
  margin: 0;
  border-radius: 40px;
  background: linear-gradient(
    to right,
    var(--primary-color) 0%,
    var(--primary-color) var(--percent, 50%),
    var(--light-grey) var(--percent, 50%),
    var(--light-grey) 100%
  );
}

.mm-customization-panel input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
  border-radius: 40px;
}

.mm-customization-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  margin-top: calc((6px - 20px)/2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.mm-customization-panel input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent; 
  border-radius: 40px;
}

.mm-customization-panel input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.mm-customization-panel input[type="range"]:focus {
  outline: none;
}

datalist {
  display: flex;
  justify-content: space-between;
  color: black;
}

option {
  color: black;
}

.editor-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 0;
  margin-right: 24px;
}

.editor-button {
  width: 110px;
  padding: 8px 26px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
  font-weight: 500;
}

.save-button {
  background-color: var(--button-color);
  color: white;
}

.save-button:hover {
  background-color: var(--button--hover-color);
}

.cancel-button {
  background-color: var(--light-grey);
  color: var(--text-color);
}

.cancel-button:hover {
  background-color: var(--light-grey-dark);
}


@media (prefers-color-scheme: dark) {
  .markdown-disclaimer {
    display: none !important;
  }
}

.delete-popup {
  background-color: rgba(0, 0, 0, 0.32);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-popup-content {
  text-align: center;
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  padding: 24px;
  z-index: 3201;
  position: relative;
  animation: popupPopIn 0.2s ease;
}

@keyframes popupPopIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.delete-popup-content h3 {
  margin-top: 0;
  color: var(--text-color);
  font-size: 1.5em;
  margin-bottom: 15px;
}

.delete-popup-content p {
  color: var(--dark-grey);
  line-height: 1.5;
  margin-bottom: 25px;
}

.dialog-buttons {
  display: flex;
  justify-content: right;
  gap: 15px;
  margin-top: 40px;
}

.dialog-button {
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
}

.dialog-button.delete {
  background-color: var(--red);
  color: var(--white);
}

.dialog-button.delete:hover {
  background-color: var(--red-dark);
}

.dialog-button.danger {
  background-color: rgba(220, 20, 60, 0.09);
  color: var(--red);
}

@media (prefers-color-scheme: dark) {
  .dialog-button.danger {
    color: var(--text-color);
  }
}

.dialog-button.danger:hover {
  background-color: rgba(220, 20, 60, 0.15);
}

.dialog-button.danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.recent-mindmaps {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  margin-top: 100px;
  display: none;
}

.recent-mindmaps h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-color);
  position: relative;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-item-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.02);
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px;
  flex-grow: 1;
  background-color: transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-color);
}

.recent-item-container:hover {
  transform: translateY(-1px);
}

.recent-item-title {
  font-weight: 500;
  flex-grow: 1;
}

.recent-item-time {
  font-size: 0.9em;
  color: #64748b;
  margin-left: 16px;
}

.no-recent {
  text-align: center;
  color: #64748b;
  padding: 20px;
}

.view-history-link {
  text-decoration: none;
  color: #1e293b;
  display: inline-block;
  margin-top: 10px;
  font-size: 15px;
  border-radius: 10px;
  padding: 5px 10px;
}

.view-history-link:hover {
  background-color: rgba(0, 0, 0, 0.032);
  border-radius: 10px;
  padding: 5px 10px;
}

.help-link {
  padding: 5px;
  border-radius: 10px;
  background-color: #f0f0f0;
  border: 1px solid #f0f0f0;
  text-decoration: none;
}

.help-link:hover {
  border: 1px solid #ddd;
}

#ratingPopup {
  display: none;
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background-color: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  text-align: center;
  opacity: 0;
}

#ratingPopup.show {
  display: block;
  bottom: 20px;
  opacity: 1;
}

.rating {
  display: inline-block;
}

.rating input {
  display: none;
}

.rating label {
  float: right;
  cursor: pointer;
  color: #ccc;
  transition: color 0.3s;
}

.rating label:before {
  content: "\2605";
  font-size: 24px;
  padding: 0 2px;
}

.rating input:checked~label,
.rating label:hover,
.rating label:hover~label {
  color: #ffd700;
  transform: scale(1.1);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(30, 41, 59, 0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

.left-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(-100%);
  width: var(--left-sidebar-width);
  height: 100vh;
  background-color: var(--white);
  z-index: 1002;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.left-sidebar-header {
  position: relative;
  top: 49px;
  background-color: transparent;
  z-index: 1003;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  height: 0px;
}

.left-sidebar-header::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 25px;
  background: linear-gradient(to bottom, var(--white) 3px, rgba(13, 13, 13, 0));
  pointer-events: none;
}

.left-sidebar-content {
  overflow-y: auto;
  margin-top: 50px;
  padding-top: 0px;
  padding-left: 8px;
  padding-right: 8px;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sync-progress-banner {
  margin: 10px 10px 4px;
  padding: 10px 12px;
  background: var(--background-color);
  border-radius: 20px;
}

.sync-progress-text {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-color);
}

.sync-progress-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.sync-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.sync-progress-count {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--text-color);
  opacity: 0.6;
}

.left-sidebar-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.left-sidebar-content {
  -webkit-overflow-scrolling: touch;
}

.left-sidebar.open {
  transform: translateX(0);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

#app,
#mindmap {
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  position: relative;
  will-change: width, margin-left, margin-right, opacity;
}

#mindmap>svg {
  font-family: 300 16px/20px BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif !important;
  font-weight: 300;
}
#mindmap>svg>g>g>line {
  stroke-linecap: round;
}

#app.left-sidebar-open,
#mindmap.left-sidebar-open {
  width: calc(100% - var(--left-sidebar-width));
  margin-left: var(--left-sidebar-width);
  opacity: 0.98;
}

html.left-sidebar-open #app,
html.left-sidebar-open #mindmap {
  width: calc(100% - var(--left-sidebar-width));
  margin-left: var(--left-sidebar-width);
  opacity: 0.98;
}

.menubar {
  position: fixed;
  top: 10px;
  left: 15px;
  width: 120px;
  height: 40px;
  background-color: var(--background-color);
  z-index: 1200;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.menubar.sidebar-open {
  background-color: var(--white) !important;
}

.left-sidebar-toggle {
  border: none;
  background-color: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1202 !important;
  transition: transform 0.1s ease;
}

.new-mind-map-button {
  position: fixed;
  top: 10px;
  left: 55px;
  z-index: 1402 !important;
  margin-right: 10px;
  box-shadow: none;
  transition: all 0.1s ease;
  width: 40px;
  height: 40px;
  border: none;
  background-color: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1402 !important;
  transition: transform 0.1s ease;
}

.search-mind-maps-button {
  position: fixed;
  top: 10px;
  left: 95px;
  z-index: 1302;
  background-color: transparent;
  margin-right: 10px;
  box-shadow: none;
  transition: all 0.1s ease;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1402 !important;
  transition: transform 0.2s ease;
}

.search-mind-maps-button svg {
  color: var(--text-color);
}

.new-mind-map-button:hover,
.navbar-toggle:hover,
.search-mind-maps-button:hover {
  background-color: var(--background-color);
  border-radius: 10px;
}

.navbar-toggle {
  position: fixed;
  top: 10px;
  left: 15px;
  z-index: 1402 !important;
  margin-right: 10px;
  width: 40px;
  height: 40px;
  box-shadow: none;
  transition: all 0.1s ease;
}

.left-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.left-sidebar-overlay.open {
  display: block;
  opacity: 1;
}

@media (max-width: 770px) {
  .left-sidebar {
    width: 280px;
  }

  #app.left-sidebar-open,
  #mindmap.left-sidebar-open {
    width: 100%;
    margin-left: 0;
  }

  html.left-sidebar-open #app,
  html.left-sidebar-open #mindmap {
    width: 100%;
    margin-left: 0;
  }
}

#app,
#mindmap {
  background-color: var(--background-color);
}

#app.sidebar-open,
#mindmap.sidebar-open {
  width: calc(100% - 300px);
  margin-right: 300px;
  opacity: 0.98;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--light-grey);
  position: sticky;
  top: 0;
  background-color: var(--card-background);
  z-index: 2;
}

.sidebar-title {
  font-family: "Open Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.sidebar-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-toggle:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
}

.sidebar-toggle.open {
  transform: rotate(180deg);
}

.sidebar-mindmap-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 50px;
  margin-bottom: 30px;
}

.sidebar-mindmap-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.sidebar-mindmap-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sidebar-mindmap-date {
  color: #636363;
  font-size: 0.75rem;
}

.mindmap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: var(--mindmap-item-bg);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  overflow: hidden;
}

.mindmap-item:hover,
.mindmap-item.active {
  background-color: var(--mindmap-item-hover-bg);
}



@media ( (hover: none) and (pointer: coarse) ) or (max-width: 720px) {
  .mindmap-item .mindmap-actions {
    transform: translateX(0) !important;
    background-color: var(--white);
    transition: background-color 0.2s;
  }
  .mindmap-item:hover .mindmap-actions, .mindmap-item.active .mindmap-actions {
    transform: translateX(0) !important;
    background-color: var(--mindmap-item-hover-bg);
  }

  
}

.mindmap-item-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-color);
  border-top-color: transparent;
  border-radius: 50% !important;
  corner-shape: round !important;
  animation: mm-spinner-rotate 0.8s linear infinite;
  margin-left: 8px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: margin-right 0.2s;
}

.mindmap-item:hover .mindmap-item-loading-spinner {
  margin-right: 40px;
}

@keyframes mm-spinner-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mindmap-info {
  flex: 1;
  overflow: hidden;
}

.mindmap-title {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-color);
}

.mindmap-date {
  font-size: 0.8rem;
  color: var(--dark-grey);
  font-weight: 500;
}

.mindmap-actions {
  display: flex;
  gap: 4px;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.2s ease-in-out;
  align-items: center;
  padding-right: 15px;
  background-color: var(--mindmap-item-bg);
}

.mindmap-item:hover .mindmap-actions {
  transform: translateX(0);
  background-color: var(--mindmap-item-hover-bg);
}

.mindmap-actions .fade-overlay {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  right: 100%;
  top: 0;
  width: 30px;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      var(--mindmap-item-bg) 100%);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: -1;
}

.mindmap-item:hover .mindmap-actions .fade-overlay {
  opacity: 1;
}

.mindmap-item:hover .mindmap-actions .fade-overlay {
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      var(--mindmap-item-hover-bg) 100%);
}

.rename-btn,
.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 1;
}

.delete-btn {
  padding: 6px !important;
}

.rename-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.delete-btn:hover {
  background-color: rgba(255, 0, 51, 0.1);
}

.delete-btn:hover svg {
  stroke: var(--red);
}

/* Folder styles */
.sidebar-folder {
  margin-bottom: 4px;
}

.sidebar-folder-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  gap: 10px;
  user-select: none;
  position: relative;
}

.sidebar-folder-header:hover {
  background-color: var(--mindmap-item-hover-bg);
}

.sidebar-folder-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-color);
  opacity: 0.7;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-folder-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  transition: opacity 0.2s ease;
}

.sidebar-folder-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.sidebar-folder-items {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 12px;
}

.sidebar-folder-items-inner {
  overflow: hidden;
}

.sidebar-folder-items .mindmap-item {
  border-radius: 10px;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-folder-items.open .mindmap-item {
  transform: translateY(0);
  opacity: 1;
}

.sidebar-folder-items.open .sidebar-folder-items-inner .mindmap-item:nth-child(1) { transition-delay: 0.02s; }
.sidebar-folder-items.open .sidebar-folder-items-inner .mindmap-item:nth-child(2) { transition-delay: 0.04s; }
.sidebar-folder-items.open .sidebar-folder-items-inner .mindmap-item:nth-child(3) { transition-delay: 0.06s; }
.sidebar-folder-items.open .sidebar-folder-items-inner .mindmap-item:nth-child(4) { transition-delay: 0.08s; }
.sidebar-folder-items.open .sidebar-folder-items-inner .mindmap-item:nth-child(5) { transition-delay: 0.1s; }
.sidebar-folder-items.open .sidebar-folder-items-inner .mindmap-item:nth-child(n+6) { transition-delay: 0.12s; }

.sidebar-folder-items.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.sidebar-folder-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0;
  flex-shrink: 0;
  color: var(--text-color);
}

.sidebar-folder-header:hover .sidebar-folder-delete-btn {
  opacity: 1;
}

.sidebar-folder-delete-btn:hover {
  background-color: rgba(255, 0, 51, 0.1);
  color: var(--red);
}

.sidebar-folder-delete-btn svg {
  width: 16px;
  height: 16px;
}

/* Drag and drop */
.mindmap-item.dragging {
  opacity: 0.4;
  background-color: var(--mindmap-item-hover-bg);
}

.sidebar-folder-header.drag-over-folder {
  background-color: var(--mindmap-item-hover-bg);
  box-shadow: inset 0 0 0 2px var(--primary-color);
  border-radius: 12px;
}

/* VS Code-like drag-over opacity on list containers */
#leftSidebarMindmapList.drag-over-list > .mindmap-item:not(.dragging),
.sidebar-folder-items.drag-over-list .mindmap-item:not(.dragging) {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

#leftSidebarMindmapList.drag-over-list,
.sidebar-folder-items.drag-over-list {
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.02);
  transition: background-color 0.15s ease;
}

/* 3-dot menu button on mindmap items */
.mindmap-dots-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 1;
  flex-shrink: 0;
  color: var(--text-color);
}

.mindmap-dots-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.mindmap-dots-btn svg {
  width: 18px;
  height: 18px;
}

/* Dots tooltip menu */
.dots-menu {
  position: fixed;
  z-index: 9999;
  background-color: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 180px;
  animation: contextMenuScaleIn 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dots-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: background-color 0.15s;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  position: relative;
  white-space: nowrap;
}

.dots-menu-item:hover {
  background-color: var(--mindmap-item-hover-bg);
}

.dots-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dots-menu-item.delete-item:hover {
  background-color: rgba(255, 0, 51, 0.08);
  color: var(--red);
}

.dots-menu-item.delete-item:hover svg {
  stroke: var(--red);
}

.dots-menu-item .submenu-arrow {
  margin-left: auto;
  opacity: 0.5;
}

/* Submenu (for folder selection) */
.dots-submenu {
  position: fixed;
  z-index: 10000;
  background-color: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 170px;
  animation: contextMenuScaleIn 100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dots-submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: background-color 0.15s;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  white-space: nowrap;
}

.dots-submenu-item:hover {
  background-color: var(--mindmap-item-hover-bg);
}

.dots-submenu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.dots-submenu-divider {
  height: 1px;
  background-color: var(--light-grey);
  margin: 4px 6px;
}

.dots-submenu-item.new-folder-item svg {
  opacity: 1;
}

.no-mindmaps {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--dark-grey);
  line-height: 1.5;
  font-weight: 600;
}

@media (max-width: 770px) {
  .right-sidebar {
    width: 280px;
    right: -280px;
  }

  #app.sidebar-open,
  #mindmap.sidebar-open {
    width: calc(100% - 280px);
    margin-right: 280px;
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-popup {
  background-color: var(--card-background);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 400px;
  padding: 0;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  overflow: hidden;
}

.popup-overlay.active .custom-popup {
  transform: scale(1);
  opacity: 1;
}

.popup-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popup-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.popup-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.popup-content {
  padding: 20px;
}

.popup-message {
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

.rename-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--light-grey);
  border-radius: 30px;
  font-size: 1rem;
  margin-bottom: 20px;
  transition: border-color 0.2s;
  outline: none;
  color: var(--text-color);
  background-color: var(--white);
}

.rename-input:focus {
  border-color: var(--primary-color);
}

.popup-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  width: 50%;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.delete-popup-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  width: 46%;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.delete-popup-buttons .confirm-delete {
  background-color: var(--red);
  color: white;
}

.delete-popup-buttons .confirm-delete:hover {
  background-color: var(--red-dark);
}

.popup-btn-cancel {
  background-color: var(--light-grey);
  color: var(--text-color);
}

.popup-btn-cancel:hover {
  background-color: var(--light-grey-dark);
}

.popup-btn-confirm {
  background-color: var(--primary-color);
  color: white;
}

.popup-btn-confirm:hover {
  background-color: var(--secondary-color);
}

.popup-btn-delete {
  background-color: var(--red);
  color: white;
}

.popup-btn-delete:hover {
  background-color: var(--red-dark);
}

.modal-enter-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.42;
  pointer-events: none;
}

.modal-enter-shortcut svg {
  width: 15px;
  height: 15px;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popupFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.popup-fadeIn {
  animation: popupFadeIn 0.3s forwards;
}

.popup-fadeOut {
  animation: popupFadeOut 0.3s forwards;
}

.input-wrapper-boxlet {
  width: 95%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 100px;
  border-radius: 5px;
}

.sidebar-boxlet {
  width: 95%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 100px;
  border-radius: 5px;
}

.search-mindmaps-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3200;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.search-mindmaps-popup-overlay.active {
  display: flex;
  opacity: 1;
}

.search-mindmaps-popup {
  background-color: var(--white);
  border-radius: 20px;
  box-shadow: 0 8px 62px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 600px;
  border: none;
  height: 40vh;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px) scale(0.9);
  opacity: 0;
  transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.search-mindmaps-popup-overlay.active .search-mindmaps-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.search-mindmaps-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--background-color);
  margin: 6px;
  border-radius: 20px;
}

.search-mindmaps-popup .popup-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.2em;
}

.search-mindmaps-popup .popup-close {
  background: none;
  top: 14px;
  right: 16px;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-top: 0px;
  border-radius: 8px 40% 8px 8px;
  color: var(--secondary-text-color);
  transition: background-color 0.2s ease;
}

.search-mindmaps-popup .popup-close:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.search-mindmaps-popup .popup-close svg {
  width: 20px;
  height: 20px;
  display: block;
}

.search-mindmaps-popup .popup-content {
  padding: 15px 20px 20px 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.version-history-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.version-history-popup-overlay.active {
  display: flex;
  opacity: 1;
}

.version-history-popup {
  width: min(1180px, calc(100vw - 36px));
  height: min(760px, calc(100vh - 48px));
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  color: var(--text-color);
  border: 1px solid rgba(113, 123, 131, 0.16);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.version-history-popup-overlay.active .version-history-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.version-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  margin: 8px;
  border-radius: 16px;
  background-color: var(--background-color);
}

.version-history-header h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-color);
}

.version-history-header p {
  margin: 4px 0 0;
  color: var(--dark-grey);
  font-size: 0.92rem;
  line-height: 1.35;
}

.version-history-close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text-color);
  background: var(--background-color);
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.version-history-close:hover {
  background: var(--light-grey);
  transform: scale(1.03);
}

.version-history-disclaimer {
  margin: 10px 0 0;
  padding: 12px;
  color: var(--dark-grey);
  background: rgba(113, 123, 131, 0.08);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.version-history-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.version-history-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}

.version-history-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 8px;
  color: var(--dark-grey);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
}

.version-history-list {
  min-height: 0;
  overflow-y: auto;
  padding: 6px 10px 14px;
}

.version-history-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  margin: 0 0 8px;
  border: none;
  padding: 12px;
  text-align: left;
  color: var(--text-color);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.version-history-item:hover,
.version-history-item:focus-visible {
  outline: none;
}

.version-history-item.active {
  background: var(--light-grey);
}

.version-history-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
}

.version-history-item-time {
  color: var(--dark-grey);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.version-history-item-stats {
  grid-column: 1 / -1;
  color: var(--dark-grey);
  font-size: 0.78rem;
  line-height: 1.35;
}

.version-history-preview-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.version-history-preview-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.version-history-preview-header h4 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.25;
}

.version-history-preview-header p {
  margin: 4px 0 0;
  color: var(--dark-grey);
  font-size: 0.84rem;
  line-height: 1.35;
}

.version-history-preview-header > div:first-child {
  min-width: 0;
}

.version-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.version-history-action-btn {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.version-history-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.version-history-action-secondary {
  color: var(--text-color);
  background: var(--light-grey);
}

.version-history-action-secondary:hover:not(:disabled) {
  background: var(--light-grey-dark);
}

.version-history-action-primary {
  color: #fff;
  background: var(--primary-color);
}

.version-history-action-primary:hover:not(:disabled) {
  background: var(--secondary-color);
}

.version-history-preview {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
}

.version-history-rendered-map {
  width: 100%;
  min-width: 720px;
  height: 100%;
  min-height: 500px;
  padding: 26px;
  pointer-events: none;
}

.version-history-rendered-map > svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.version-history-empty-state,
.version-history-loading-state,
.version-history-error-state {
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--dark-grey);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
}

.version-history-error-state {
  color: var(--red);
}

.version-history-markdown-fallback {
  min-height: 100%;
  margin: 0;
  padding: 22px;
  color: var(--text-color);
  background: var(--white);
  border-radius: 8px;
  font: 0.9rem/1.55 "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .version-history-popup-overlay {
    padding: 10px;
  }

  .version-history-popup {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    min-height: 0;
    border-radius: 16px;
  }

  .version-history-header {
    padding: 14px 14px 10px;
  }

  .version-history-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(170px, 34vh) minmax(0, 1fr);
  }

  .version-history-sidebar {
    border-right: 0;
  }

  .version-history-preview-header {
    min-height: 66px;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }

  .version-history-actions {
    width: 100%;
    justify-content: stretch;
  }

  .version-history-action-btn {
    flex: 1;
    min-width: 0;
    white-space: normal;
  }

  .version-history-rendered-map {
    min-width: 620px;
    min-height: 420px;
    padding: 18px;
  }
}

.search-input-container {
  position: relative;
  margin-bottom: 15px;
}

.search-input-container input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 2px solid var(--light-grey);
  border-radius: 40px;  font-size: 1.05rem;
  color: var(--text-color);
  background-color: var(--input-bg-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.search-input-container input::placeholder {
  color: var(--secondary-text-color);
}

.search-input-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
  transition: all 0.3s ease;
}

.search-input-container .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-text-color);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-results-list .mindmap-item:first-child {
  border-top: 1px solid var(--white);
}

.search-results-list .mindmap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  background-color: var(--card-bg-color);
  border: none;
  cursor: pointer;
  border-radius: 0px;
  border-top: 1px solid var(--light-grey);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.search-results-list .mindmap-item:hover {
  border-radius: 12px;
  border-top: 1px solid var(--white);  background-color: var(--mindmap-item-hover-bg);
}

.search-results-list .mindmap-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.3);
}

.search-results-list .mindmap-item .mindmap-info {
  flex-grow: 1;
  overflow: hidden;
  margin-right: 10px;
}

.search-results-list .mindmap-item .mindmap-title {
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results-list .mindmap-item .mindmap-date {
  font-size: 0.85em;
  color: var(--secondary-text-color);
  margin-top: 5px;
}

mark.search-highlight {
  background-color: var(--light-grey);
  border-radius: 4px;
}

.search-content-snippet {
  font-size: 0.85em;
  opacity: 0.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.search-results-list .no-results-message {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px 20px;
  color: var(--secondary-text-color);
}

.search-results-list .no-results-message h3 {
  margin-top: 15px;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 600;
}

.search-results-list .mindmap-actions {
  display: flex;
  gap: 5px;
  position: relative;
}

.search-results-list .fade-overlay {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 25px;
  background: linear-gradient(to left,
      var(--card-bg-color) 0%,
      transparent 100%);
  pointer-events: none;
}

.search-results-list .mindmap-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  color: var(--secondary-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  z-index: 1;
}

.keyboard-shortcuts-popup h3 {
  margin: 0 0 28px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  background-clip: text;
  text-align: left;
  letter-spacing: -0.5px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  margin: 0 0 18px 0;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.shortcut-item:last-child {
  margin-bottom: 0;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  font-weight: 700;
  font-size: 1rem;
  background-color: var(--light-grey-dark);
  border-radius: 12px;
  margin-right: 16px;
  color: var(--text-color);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.shortcut-description {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  flex: 1;
}

.subscription-error-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 4200;
  display: none;
}

#subscription-error-popup {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--background-color);
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 4201;
  width: 100%;
  max-width: 550px;
  text-align: left;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: fit-content;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.subscription-error-popup-title {
  color: #1e293b;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text-color);
  background-clip: text;
}

p {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 0.95em;
}

.modal-upgrade-button {
  background-color: #ffd736;
  color: #1e293b;
  padding: 12px 25px;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  margin-top: 30px !important;
  font-size: 1.1em;
  font-weight: 600;
  transition: background-color 0.2s ease;
  margin: 0 auto;
  transition: all 0.2s ease-in-out;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
  text-decoration: none;
  margin-top: 10px;
}

.modal-upgrade-button svg {
  height: 1.1em;
  width: auto;
  margin-left: 5px;
  vertical-align: middle;
}

.modal-upgrade-button:hover {
  transform: scale(1.05);
}

strong {
  color: var(--text-color);
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 600px) {
  #subscription-error-popup {
    padding: 30px;
  }

  .subscription-error-popup-title {
    font-size: 1.3em;
  }
}

.snackbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  min-width: 280px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.snackbar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.snackbar.hide {
  transform: translateX(-50%) translateY(-100px);
  opacity: 0;
}

.snackbar-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #007aff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.snackbar-icon::after {
  content: "";
  width: 20px;
  height: 20px;
  display: block;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-info-icon lucide-info'><path d='M12 16v-4' /><path d='M12 8h.01' /></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.snackbar-message {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  flex: 1;
}

.snackbar-close {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.snackbar-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.upgrade-button:hover {
  transform: scale(1.1);
}

.modal {
  display: none;
  position: fixed;
  z-index: 3300;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.32);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--background-color);
  margin: auto;
  padding: 40px;
  border-radius: 30px;
  width: 90%;
  gap: 10px;
  z-index: 3301;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  flex-direction: column;
  font-size: 1.1rem;
  align-items: flex-start;
}

/* Split Modal for sign-in with content + video layout */
.split-modal .split-modal-content {
  background-color: var(--background-color);
  margin: auto;
  border-radius: 30px;
  width: 90%;
  gap: 10px;
  z-index: 3301;
  max-width: 900px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: row;
  font-size: 1.1rem;
  align-items: stretch;
}

/* Ensure left content container is relative for absolute positioning */
.split-modal .split-modal-content > div:first-child {
  position: relative;
}

/* Video container styling */
.split-modal .split-modal-content .video-container {
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--light-grey);;
}

.split-modal .split-modal-content .video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive design for split modal */
@media (max-width: 770px) {
  .split-modal .split-modal-content {
    flex-direction: column;
    max-width: 500px;
  }
  
  .split-modal .split-modal-content .video-container {
    margin-top: 20px;
  }
}

@media (max-width: 450px) {
  .modal-content {
    width: 100%;
  }
}

.close-button {
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
}

.modal {
  display: flex;
  visibility: hidden;
  opacity: 0;
  transition: opacity 260ms ease, visibility 260ms;
  pointer-events: none;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 300ms ease;
}

.modal.is-open .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal {
  background-color: rgba(0, 0, 0, 0);
}

.modal.is-open {
  background-color: rgba(0, 0, 0, 0.32);
}


.close-button:hover,
.close-button:focus {
  color: var(te);
  text-decoration: none;
  cursor: pointer;
}

/* Hide original close button for split modal */
.split-modal .close-button {
  display: none;
}

/* Secondary close button styling */
.split-modal .secondary-close-button {
  background-color: var(--light-grey);
  border: none;
  color: var(--text-color);
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
}

.split-modal .secondary-close-button:hover {
  background-color: var(--light-grey-dark);
  border-color: var(--text-color);
}


.modal-content h2 {
  margin-bottom: 8px;
}


.handwritten-upgrade-tip {
  position: fixed;
  right: 35px;
  top: 60px;
  z-index: 3200;
  width: 230px;
  display: none;
}

@media (max-width: 1280px) {
  .handwritten-upgrade-tip {
    width: 200px !important;
  }
}

@media (max-width: 688px) {
  .handwritten-upgrade-tip {
    display: none !important;
  }
}

.error-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--white);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.error-popup #retryBtn {
  background-color: var(--text-color);
  color: white;
  border: 2px solid var(--text-color);
  padding: 10px 30px;
  border-radius: 40px;
  cursor: pointer;
  margin-top: 10px;
  width: 49%;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
}

.error-popup #closeErrorPopupBtn {
  background-color: var(--light-grey);
  color: var(--text-color);
  border: 2px solid var(--light-grey);
  padding: 10px 30px;
  border-radius: 40px;
  cursor: pointer;
  margin-top: 10px;
  width: 49%;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic",
    "Source Sans Pro", sans-serif;
  font-weight: 500;
}

.custom-html-error-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.32);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4200;
}

.custom-html-error-popup {
  position: relative;
  background-color: #fff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 80%;
  height: 80%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.custom-html-error-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.custom-html-error-popup-iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1 1 auto;
  background: white;
}

.pack-container:nth-child(2) {
  border: 3px solid #3466f0;
  transform: scale(1.05);
}

.pack-container:nth-child(2) .button-container a {
  background-color: var(--text-color);
  color: #fff;
}

.pack-container:nth-child(2) .button-container a:hover {
  background-color: transparent;
  color: var(--text-color);
}

.pack-container {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background-color: var(--light-grey);
  padding: 1.6rem;
  color: var(--text-color);
  transition: all 0.3s ease;
  flex: 1;
  min-width: 250px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.price-container {
  margin: 1rem 0;
}

.price-container p {
  margin: 0;
  line-height: 1.4;
}

.original-price {
  color: #989898;
  font-size: 0.6em;
  position: relative;
  display: inline-block;
  font-weight: 400;
  font-family: "SF Pro Rounded", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.billing-info {
  font-size: 1rem !important;
  color: #888 !important;
  font-weight: 400 !important;
  margin-top: 0px !important;
}

.price-container p {
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  gap: 4px;
  font-size: 2.7em;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-color);
  font-family: "SF Pro Display", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.price-container p {
  margin: 0;
  line-height: 1.4;
}

.original-price {
  color: #989898;
  font-size: 0.6em;
  position: relative;
  display: inline-block;
  font-weight: 400;
  font-family: "SF Pro Rounded", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.original-price::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 1px;
  right: -2px;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 5px;
  transform: translateY(-20%);
  transform-origin: center;
}

.discounted-price {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.1em;
}

.pricing-stacked .original-price {
  display: none;
  margin-bottom: 2px;
}

.pack-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pricing-header {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  text-align: left;
  margin-bottom: 0px;
}

.title {
  display: block;
  font-size: 1.3rem;
  line-height: 1.25rem;
  color: var(--text-color);
  font-weight: 600;
  margin-top: 0px;
}

.billing-info {
  font-size: 1rem !important;
  color: #888 !important;
  font-weight: 400 !important;
  margin-top: -30px !important;
}

.price-container p {
  margin-top: 10px;
  display: flex;
  gap: 4px;
  font-size: 2.7em;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-color);
  font-family: "SF Pro Display", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pack-features {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.lists {
  display: flex;
  flex-direction: column;
  gap: 0px;
  padding: 0px;
  list-style: none;
}

.list {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}

.list p {
  display: block;
  margin: 5px 0px;
  font-size: 1rem;
  font-family: "SF Pro Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
}

.button-container a {
  display: block;
  width: calc(100%-3.2rem);
  text-align: center;
  text-decoration: none;
  background-color: transparent;
  border: 2px solid var(--text-color);
  padding: 9px 20px;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-color);
  outline: 0;
  border-radius: 30px;
  transition: 0.3s all ease;
}

.button-container a:hover {
  background-color: var(--text-color);
  color: white;
  border-radius: 40px;
}

.active-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #10b981;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  justify-content: center;
}

.active-badge svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 770px) {
  .pricing-cards-wrapper {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
    align-items: center;
  }

  .pack-container {
    margin-bottom: 20px;
  }

  .pack-content {
    flex-direction: column;
  }

  .pricing-header {
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 2.3rem;
  }

  .lists {
    flex-direction: column;
    gap: 0px;
  }

  .list {
    flex: none;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .pricing-section {
    padding: 10px;
  }

  .pack-container {
    padding: 1.2rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .price-container p {
    font-size: 2.2em;
  }

  .recommended-badge {
    margin-top: -34px;
  }
}

html.left-sidebar-open #app,
html.left-sidebar-open #mindmap {
  width: calc(100% - var(--left-sidebar-width)) !important;
  margin-left: var(--left-sidebar-width) !important;
}

@media (max-width: 770px) {

  html.left-sidebar-open #app,
  html.left-sidebar-open #mindmap {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

.md-bold {
  font-weight: 700 !important;
}

.md-italic {
  font-style: italic;
}

.md-strike {
  text-decoration: line-through;
}

.md-link {
  text-decoration: underline;
  color: var(--text-color);
  cursor: pointer;
}

.help-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.help-popup.show {
  background-color: rgba(0, 0, 0, 0.32);
}

.help-popup-content {
  background-color: var(--white);
  border-radius: 35px;
  box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
    0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  padding: 24px;
  position: relative;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s ease;
}

.help-popup.show .help-popup-content {
  opacity: 1;
  transform: translateY(0px) scale(1);
}

.help-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.help-item {
  display: flex;
  flex-direction: column;
  align-items: left;
  text-align: left;
}

.help-image-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: none;
  margin-bottom: 15px;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-color);
}

.help-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 700px) {
  .help-image-container {
    display: none !important;
  }

  .help-item {
    padding: 16px;
    background-color: var(--background-color);
    border-radius: 12px;
    margin-bottom: -3px;
  }

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

.help-item h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
}

.help-item p {
  font-size: 0.9rem;
  color: var(--dark-grey);
  line-height: 1.4;
}

.style-selector-segmented {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.style-selector-btn {
  flex: 1;
  height: 45px;
  border-radius: 12px;
  border: none;
  background-color: var(--mindmap-item-hover-bg);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 1rem;
}

.style-selector-btn:hover {
  background-color: var(--light-grey-dark);
}

.style-selector-btn.active {
  border: 2.5px solid var(--text-color) !important;
  background-color: var(--mindmap-item-hover-bg);
  box-sizing: border-box;
}

.style-selector-btn svg {
  width: 22px;
  height: 22px;
}

#chat-drawer {
    position: fixed;
    top: 0;
    right: -400px; 
    width: 380px;
    height: 100vh;
    box-shadow: none;
    background: var(--card-background);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#chat-drawer.open {
    right: 0;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
}

.chat-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.chat-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 475px) {
  .chat-message.system span svg {
    margin-top: 10px !important;
  }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--card-background);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: var(--card-background);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--light-grey);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--light-grey-dark);
}

.chat-message {
    padding: 12px 16px;
    border-radius: 22px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
    animation: chat-message-fade-in 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes chat-message-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-end;
    background: var(--light-grey);
    color: var(--text-color);
}

.chat-message.bot {
    align-self: flex-start;
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 16px 0px;
}

.chat-message.bot.loading {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-width: 50px;
    height: 36px;
    margin-bottom: 5px;
}

.chat-message.system {
    align-self: center;
    background: transparent;
    color: var(--dark-grey);
    font-size: 0.85rem;
    text-align: center;
    max-width: 100%;
}

.chat-message.system.error {
    color: var(--red);
}

.chat-input-area {
    padding: 0px 20px 20px 20px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

#chat-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px; 
    border: 2px solid var(--white);
    border-radius: 24px;
    font-size: 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: var(--white);
    color: var(--text-color);
    resize: none;
    height: auto;
    min-height: 48px;
    max-height: 160px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: border-color 0.2s;
    overflow-y: hidden;
}

#chat-input:focus {
    border-color: var(--primary-color);
}

#chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
    position: absolute;
    right: 4px;
    bottom: 4px;
}

#chat-send-btn:hover {
    background: var(--secondary-color);
}

#chat-send-btn:disabled {
    background: var(--dark-grey);
    cursor: not-allowed;
    transform: none;
}

.chat-loading {
    display: none;
    align-self: flex-start;
    margin-bottom: 10px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dark-grey);
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px 20px;
}

.chat-suggestion {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.chat-suggestion:hover {
    background: var(--light-grey-dark);
    border-color: var(--dark-grey);
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    #chat-drawer {
        width: 100%;
        right: -100%;
    }
}

/* Wide screen sidebar behavior */
@media (min-width: 1000px) {
    body.chat-open #mindmap,
    body.chat-open #app {
        width: calc(100% - 380px);
    }
    
    body.chat-open .navbar {
        right: 380px;
    }
    
    body.chat-open #button-container.button-container {
        right: 395px; /* 15 + 380 */
    }
    
    body.chat-open #zoom-controls.zoom-controls {
        right: 394px; /* 14 + 380 */
    }

    body.chat-open #infoButton.info-button {
        right: 390px;
    }

    #chat-drawer {
        box-shadow: none;
    }
    
    #chat-drawer.open {
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
    }
}

.one-year-sale-badge-container {
    display: flex;
    justify-content: center;
    transform: translateX(-35vw);
    border-radius: 50%;
    padding: 0;
    position: absolute; 
    top: 50vh;
    left: calc(75px + 5vw);
    transform: translate(-50%, 0) rotate(-10deg); 
    transition: all 0.2s ease;
}

.one-year-sale-badge-container:hover {
    transform: translate(-50%, 0) rotate(-15deg) scale(1.05);
}

.one-year-sale-badge-container img {
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.075);
    background-color: #fff;
}

@media (max-width: 1130px) {
    .one-year-sale-badge-container {
        transform:  translate(-50%, 0) rotate(-10deg) scale(0.8);
        left: calc(50px + 5vw);
    }
}

@media (max-width: 950px) {
    .one-year-sale-badge-container {
        display: none;
    }
}

.sign-in-modal-content {
  overflow: hidden;
}

.sign-in-modal-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding-bottom: 80px;
  height: 100%;
  position: relative;
}

.sign-in-modal-left h2 {
  font-size: 1.6rem;
  line-height: 1.4;
  text-align: left;
}


.sign-in-modal-actions {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-start;
}

.sign-in-modal-login-btn {
  margin-top: 0 !important;
  background-color: #7c6cfc;
  color: #fff;
  padding: 8px 22px;
  font-size: 1rem;
  height: 36px;
}

.sign-in-modal-close-btn {
  background-color: var(--light-grey);
  border: none;
  color: var(--text-color);
  padding: 6px 22px;
  height: 36px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
}

.sign-in-modal-video {
  flex: 1;
  position: relative;
  border-radius: 0px !important;
}

.sign-in-modal-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 770px) {
  .sign-in-modal-video {
    display: none;
  }
  .sign-in-modal-left h2 {
    margin-bottom: 60px;
  }
  .sign-in-modal-arrow {
    display: none;
  }
}
