#mindmapCountContainer {
  display: none;
  justify-content: center;
  align-items: center;
}

.mindmap-count-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 20px;
  padding: 15px 25px;
  color: #333;
  margin-top: 50px;
}

.info-menu {
  position: fixed;
  bottom: 70px;
  right: 20px;
  background-color: var(--white);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  z-index: 1800;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translate(40px, 40px) scale(0.85) rotate(8deg);
  filter: blur(4px);
  transition:
    opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 250ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 300ms;
  pointer-events: none;
}

.info-menu.show {
  visibility: visible;
  opacity: 1;
  transform: translate(0, 0) scale(1) rotate(0deg);
  filter: blur(0px);
  pointer-events: auto;
}

.info-menu a {
   color: var(--text-color);
   text-decoration: none;
   padding: 8px 15px;
   border-radius: 12px;
   transition: background-color 0.3s ease;
   white-space: nowrap;
   display: flex;
   align-items: center;
}

/* iOS-like toggle styling for items inside the info menu (e.g. AI Features) */
.info-menu .toggle-switch {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 18px;
  margin-left: -2px;
}

.info-menu .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.info-menu .toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.info-menu .toggle-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 1.5px;
  top: 2px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.info-menu .toggle-switch input:checked + .toggle-slider {
  background: var(--secondary-color);
}

.info-menu .toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(12px);
}


.info-menu a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}


.progress-circle {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}


.progress-ring-track,
.progress-ring-progress {
  transition: stroke-dasharray 0.35s ease-out;
}

.progress-ring-track {
  stroke: #e0e0e0;
}

.progress-ring-progress {
  stroke: #68c76c;
}

.count-text {
  position: absolute;
  font-size: 1.8em;
  font-weight: bold;
  color: var(--text-color);
}

.count-label {
  font-size: 0.9em;
  color: var(--text-color);
  text-align: center;
  margin-top: 5px;
}

    .api-key-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }
    
    .api-key-popup-content {
        background: var(--card-background);
        border-radius: 25px;
        padding: 0;
        max-width: 480px;
        width: 90%;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
        animation: popupSlideIn 0.25s ease-out;
    }
    
    @keyframes popupSlideIn {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .popup-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 20px 0 20px;
        margin-bottom: 28px;
    }
    
    .popup-header h3 {
        margin: 0;
        color: var(--text-color);
        font-size: 1.4em;
        font-weight: 600;
        letter-spacing: -0.025em;
    }
    
    .popup-close {
        background-color: var(--background-color);
        border: none;
        color: var(--text-color);
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .popup-body {
        padding: 0 20px 20px 20px;
    }
    
    .popup-body > div {
        margin-bottom: 24px;
    }
    
    .popup-body > div:last-child {
        margin-bottom: 0;
    }
    
    .popup-body label {
        display: block;
        margin-bottom: 12px;
        font-weight: 500;
        color: var(--text-color);
        font-size: 1em;
    }
    
    .popup-body p {
        margin: 0 0 20px 0;
        color: var(--text-color);
        line-height: 1.6;
        font-size: 1em;
    }
    
    .popup-body p a {
        color: var(--primary-color);
        text-decoration: none;
    }
    
    .popup-body p a:hover {
        text-decoration: underline;
    }
    
    .popup-input {
        width: 100%;
        padding: 16px;
        border: 2px solid var(--light-grey);
        border-radius: 12px;
        background: var(--white);
        color: var(--text-color);
        font-size: 1em;
        transition: border-color 0.2s ease;
        box-sizing: border-box;
    }
    
    .popup-input:focus {
        outline: none;
        border-color: var(--primary-color);
    }
    
    .popup-save-btn {
        width: 100%;
        padding: 8px 20px;
        background: var(--text-color);
        color: var(--white);
        border: none;
        border-radius: 40px;
        cursor: pointer;
        font-size: 1em;
        font-weight: 500;
        transition: all 0.2s ease;
        font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif !important; 

    }
    
    .popup-save-btn:hover {
        background: var(--dark-grey);
    }
    
    .remove-btn {
        width: 100%;
        padding: 8px 20px;
        background: rgba(220, 20, 60, 0.09);
        color: crimson;
        border: none;
        border-radius: 50px;
        cursor: pointer;
        font-size: 0.95em;
        font-weight: 500;
        transition: all 0.2s ease;
        font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif !important; 

    }
    
    .remove-btn:hover {
        background: rgba(220, 20, 60, 0.15);
    }
    
    .model-selector-container {
        max-width: 600px;
        transform: translateX(40px);
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 14px;
        flex-wrap: wrap;
    }

    .model-selector-label {
        display: block;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-color);
        margin-bottom: 6px;
    }

    .model-dropdown-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .web-search-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        border-radius: 999px;
        color: var(--text-color);
        font-size: 0.8rem;
        font-weight: 500;
        font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif;
        white-space: nowrap;
    }

    .web-search-toggle .toggle-label {
        opacity: 0.85;
    }

    .web-search-toggle .toggle-switch {
        position: relative;
        display: inline-flex;
        width: 40px;
        height: 22px;
    }

    .web-search-toggle .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .web-search-toggle .toggle-slider {
        position: absolute;
        cursor: pointer;
        inset: 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 999px;
        transition: all 0.2s ease;
    }

    .web-search-toggle .toggle-slider::before {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        left: 3px;
        top: 3px;
        background: var(--white);
        border-radius: 50%;
        transition: transform 0.2s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }

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

    .web-search-toggle .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(18px);
    }
    
    .model-dropdown-btn {
        padding: 6px 12px;
        border: none;
        border-radius: 20px;
        background: transparent;
        color: var(--text-color);
        font-size: 0.875rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        transition: all 0.2s ease;
        text-align: left;
          font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif !important; 
    }

    
    .model-dropdown-btn:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(198, 103, 255, 0.1);
    }

    .current-model-name {
        font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif !important; 
    } 
    
    .dropdown-arrow {
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }
    
    .model-dropdown-btn.open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .model-dropdown {
        position: absolute;
        top: 100%;
        max-width: 350px;
        left: 0;
        background: var(--white);
        border: none;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all 0.2s ease;
        max-height: 300px;
        display: flex;
        flex-direction: column;
    }
    
    .model-dropdown.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .model-search-container {
        position: relative;
        padding: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    }
    
    .model-search-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--dark-grey);
        pointer-events: none;
    }
    
    .model-search-input {
        width: 100%;
        padding: 6px 8px 6px 32px;
        border: none;
        border-radius: 4px;
        background: var(--white);
        color: var(--text-color);
        font-size: 0.8rem;
        box-sizing: border-box;
        transition: all 0.2s ease;
        font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif;
    }
    
    .model-search-input:focus {
        outline: none;
        border-color: var(--primary-color);
    }
    
    .model-options {
        max-height: 240px;
        overflow-y: auto;
        padding: 4px 0;
    }
    
    .model-option {
        width: calc(100% - 8px);
        padding: 6px 12px;
        border: none;
        background: none;
        color: var(--text-color);
        font-size: 0.8rem;
        cursor: pointer;
        text-align: left;
        transition: background-color 0.2s ease;
        border-radius: 8px;
        margin: 0 4px;
        font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Avenir", "Montserrat", "Corbel", "URW Gothic", "Source Sans Pro", sans-serif;
    }
    
    .model-option:hover {
        background: var(--background-color);
    }
    
    .model-option.selected {
        background: rgba(198, 103, 255, 0.1);
        color: var(--primary-color);
    }

    .default-badge {
        color: #858585;
        font-size: 1em;
        margin-left: 8px;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }
    
    .model-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 16px;
        color: var(--dark-grey);
        font-size: 0.8rem;
    }
    
    .model-loading-spinner {
        width: 14px;
        height: 14px;
        border: 2px solid var(--light-grey);
        border-top: 2px solid var(--primary-color);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }


.upgrade-button {
  background-color: #ffd736;
  color: var(--text-color);
  padding: 8px 30px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1em;
  margin-top: 15px;
  font-weight: bold;
  margin-bottom: 0px;
  transition: background-color 0.2s ease;
  transition: all 0.3s ease;
}

@media (max-width: 800px) {
  .nav-links.nav-links.padding-right {
    padding-right: 60px !important;
  }
}

.clear-history-button:hover {
  background-color: rgba(255, 0, 51, 0.1) !important;
}

.clear-history-button {
  display: inline-flex;
  align-items: center;
  color: crimson !important;
  text-decoration: none;
  margin-top: -4px;
}


.keyboard-shortcuts-popup {
  position: fixed;
  background-color: var(--white);
  border-radius: 20px;
  border: none;
  padding: 32px;
  bottom: 160px;
  right: 180px;
  z-index: 3200;
  width: 380px;
  max-width: 90vw;
  transform: translateY(0);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 6px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.95);
  }

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

@keyframes dissolveIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.keyboard-shortcuts-popup::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 26px;
  z-index: -1;
}

@media (max-width: 800px) {
  .hotkeys-button {
    display: none !important;
  }
}

.info-button {
  position: fixed;
  bottom: 11px;
  right: 15px;
  display: flex;
  align-items: center;
  background-color: var(--background-color);
  border-radius: 25px;
  padding: 8px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  z-index: 2000;
  cursor: pointer;
}

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

@media (max-width: 640px),
(pointer: coarse) {
  .info-button {
    background-color: var(--white);
    padding: 10px;
  }

  .mm-toolbar {
    display: none !important;
  }
}

.mm-toolbar {
  position: fixed;
  bottom: 0px;
  right: 11px;
  background-color: var(--white) !important;
  border: none !important;
  border-radius: 20px 20px 0px 0px !important;
  display: flex;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  flex-direction: row;
  padding: 4px 52px 13px 3px !important;
  z-index: 1000;
  gap: 0px !important;
}

.mm-toolbar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 40px !important;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
  color: #555;
}

.mm-toolbar-item:hover {
  background-color: var(--white) !important;
  transform: translateY(0px) !important;
  color: var(--text-color);
}

.mm-toolbar-item.active {
  background-color: #d0d0d0;
  color: var(--text-color) !important;
}

.mm-toolbar-item svg {
  width: 20px;
  height: 20px;
  color: var(--text-color) !important;
}

.mm-toolbar-brand {
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  font-size: 15px;
  border-radius: 6px;
  transition: background-color 0.2s ease-in-out;
}

.mm-toolbar-brand:hover {
  background-color: #f0f0f0;
}

.mm-toolbar-brand:not(:first-child),
.mm-toolbar-item:not(:first-child) {
  margin-left: 0px !important;
}

#turnstile-container {
  margin-top: 10px;
  display: block;
  z-index: 1000;
  margin-left: auto;
  margin-right: auto;
  height: 50px;
}

#snackbar {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  font-size: 17px;
}

#snackbar.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }

  to {
    bottom: 30px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }

  to {
    bottom: 30px;
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }

  to {
    bottom: 0;
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }

  to {
    bottom: 0;
    opacity: 0;
  }
}

.captcha-container {
  display: none;
  inset: 0;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: auto;
}

.captcha-container>.captcha {
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

body *:not(.captcha-container):not(.captcha) {
  pointer-events: auto;
}

.captcha-container.show {
  display: flex;
}

.zoom-controls {
  position: fixed;
  bottom: 10px;
  right: 60px;
  display: flex;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  background-color: var(--background-color);
  border-radius: 80px;
}

.zoom-controls.show {
  opacity: 1;
  visibility: visible;
}

.zoom-button {
  width: 40px;
  height: 40px;
  border-radius: 80px;
  background-color: var(--background-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-button:hover {
  opacity: 0.6;
}

.zoom-button:active {
  transform: translateY(0);
}

.zoom-button svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px),
(pointer: coarse) {
  .zoom-controls {
    bottom: 80px;
  }
}

@media (max-width: 640px),
(pointer: coarse) {
  .zoom-controls {
    display: none !important;
  }
}


    .license-popup {
        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 ease, visibility 0.3s ease;
    }

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

    .license-popup-content {
        background-color: var(--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;
        max-height: 80vh;
        overflow-y: auto;
        position: relative;
        transform: scale(0.95);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .license-popup.show .license-popup-content {
        transform: scale(1);
    }

    .license-content {
        padding: 24px;
        line-height: 1.6;
        color: var(--text-color);
        margin-top: 20px;
    }

    .license-content h4 {
        margin: 20px 0 12px 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-color);
    }

    .license-content ul {
        margin: 12px 0;
        padding-left: 20px;
    }

    .license-content li {
        margin: 8px 0;
        line-height: 1.5;
    }

    .license-content .license-footer {
        margin-top: 20px;
        font-size: 0.9rem;
        color: var(--dark-grey);
        text-align: center;
    }

    .license-content .license-footer a {
        color: var(--primary-color);
        text-decoration: none;
    }

    .license-content .license-footer a:hover {
        text-decoration: underline;
    }
    
    @media (max-width: 640px) {
        .model-dropdown {
            max-height: 250px;
        }
    
        .model-options {
            max-height: 200px;
        }

        .model-selector-container {
            transform: none;
            gap: 10px;
        }
    }
    
.node-expand-loader {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    min-width: 200px;
}

.node-expand-loader.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.expand-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--light-grey);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
