:root {
  --background-start-rgb: 18, 18, 18;
  --background-end-rgb: 29, 29, 29;
  --surface-color: #212121;
  --surface-border: rgba(255, 255, 255, 0.08);
  --primary-color: #a78bfa;
  /* Lighter Purple */
  --primary-glow: rgba(167, 139, 250, 0.4);
  --secondary-color: #34d399;
  /* Emerald Green */
  --on-background-color: #e2e8f0;
  /* Lighter gray */
  --on-surface-color: #ffffff;
  --user-message-bg: #374151;
  /* Cooler gray */
  --bot-message-bg: #2a2a2f;
  --input-bg: #1c1c1e;
  --input-border-active: var(--primary-color);
  --highlight-bg: rgba(254, 243, 199, 0.3);
  /* #fef3c7 at 30% opacity */
  --error-bg: #450a0a;
  /* Dark Red */
  --error-border: #ef4444;
  /* Bright Red */
  --font-family-sans: 'Inter', sans-serif;
  --font-family-mono: 'Roboto Mono', monospace;
  --font-family-brand: 'Russo One', sans-serif;
  --border-radius: 12px;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --drawer-width: 50%;
  --z-drawer: 1000;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family-sans);
  background: linear-gradient(135deg, rgb(var(--background-start-rgb)), rgb(var(--background-end-rgb)));
  color: var(--on-background-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

body.modal-is-open {
  overflow: hidden;
}

#mock-mode-banner {
  background-color: #2563eb;
  color: white;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  height: 95vh;
  display: flex;
  flex-direction: column;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--surface-border);
  overflow: hidden;
  margin-top: 38px;
  /* Room for mock banner */
}

body:not(:has(#mock-mode-banner[style*="display: block"])) .container {
  margin-top: 0;
}


header {
  padding: 0.75rem 1.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--surface-border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: start;
}

.header-right {
  justify-self: end;
}

.brand-title {
  font-family: var(--font-family-brand);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
  justify-self: center;
  background: linear-gradient(90deg, #a78bfa, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hamburger {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, opacity 0.3s ease-in-out;
  z-index: calc(var(--z-drawer) + 1);
}

body.modal-is-open .hamburger {
  opacity: 0;
  pointer-events: none;
}

.hamburger:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.header-right .header-action-btn {
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.header-right .header-action-btn:hover {
  background-color: var(--user-message-bg);
  color: var(--primary-color);
}

.header-right .header-action-btn.active {
  background-color: rgba(167, 139, 250, 0.1);
  color: var(--primary-color);
}

#auth-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 12px;
  border-radius: 20px;
  min-width: auto;
}

#auth-btn-text {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #auth-btn-text {
    display: none;
  }

  #auth-btn {
    padding: 6px;
    border-radius: 50%;
  }
}

.open-icon {
  transition: transform .3s ease;
  color: var(--on-background-color);
}

.hamburger:hover .open-icon {
  color: var(--primary-color);
}

.open-icon path {
  transition: all .3s ease-in-out;
  transform-origin: center;
  transform-box: fill-box;
  /* Helps stabilize transform-origin calculation */
}

/* State when menu is open (X shape) */
.open-icon.open .top {
  transform: translateY(6px) rotate(45deg);
}

.open-icon.open .mid {
  opacity: 0;
  transform: scaleX(0);
}

.open-icon.open .bot {
  transform: translateY(-6px) rotate(-45deg);
}


.app-layout {
  flex-grow: 1;
  overflow: hidden;
}

.chat-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rate-limit-banner {
  display: none;
  /* Hidden by default */
  padding: 0.75rem 1.5rem;
  background-color: var(--error-bg);
  border-bottom: 1px solid var(--error-border);
  color: var(--on-surface-color);
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.rate-limit-banner p {
  font-size: 0.9rem;
  font-weight: 500;
}

#rate-limit-retry-btn {
  background-color: transparent;
  border: 1px solid var(--error-border);
  color: var(--on-surface-color);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#rate-limit-retry-btn:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.message {
  max-width: 80%;
  padding: 0;
  /* Remove padding from the main container */
  border-radius: var(--border-radius);
  animation: fadeIn 0.3s ease-in-out;
  line-height: 1.6;
  position: relative;
  transition: background-color 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  background-color: var(--user-message-bg);
  color: var(--on-surface-color);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.user .message-content {
  padding: 0.75rem 1.25rem;
}

.message.bot {
  background-color: transparent;
  /* Boxless design */
  border: none;
  /* Boxless design */
  color: var(--on-background-color);
  align-self: flex-start;
  width: fit-content;
  /* Ensure wrapper only takes needed width */
  min-width: 200px;
  transition: all 0.2s ease-in-out;
}

/* Wrapper for bot messages and their actions */
.message-wrapper.bot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  align-self: flex-start;
  position: relative;
  padding: 0.5rem 0;
}

.message.message-highlighted {
  border-left: 3px solid var(--primary-color);
  padding-left: 1rem;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.05), transparent);
}

.message-content {
  padding: 0;
}

.message.bot strong {
  color: var(--on-surface-color);
}

.message.bot h1,
.message.bot h2,
.message.bot h3 {
  color: var(--on-surface-color);
  margin-top: 1em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.message.bot h1 {
  font-size: 1.5em;
}

.message.bot h2 {
  font-size: 1.25em;
}

.message.bot h3 {
  font-size: 1.1em;
}


.message.bot ul,
.message.bot ol {
  padding-left: 1.5rem;
}

.message.bot li {
  margin-bottom: 0.5rem;
}

.message.bot pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  font-family: var(--font-family-mono);
  border: 1px solid var(--surface-border);
}

.message.bot code {
  font-family: var(--font-family-mono);
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Web Search Sources */
.sources-container {
  padding: 12px 0;
  /* Adjusted padding */
  border-top: 1px solid var(--surface-border);
  margin-top: 1rem;
}

.sources-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a0aec0;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.source-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.source-index {
  font-size: 0.8rem;
  color: #718096;
  background-color: var(--user-message-bg);
  border-radius: 4px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.source-link {
  font-size: 0.85rem;
  color: var(--on-background-color);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
  word-break: break-all;
}

.source-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-body p {
  font-size: 0.9rem;
  color: #a0aec0;
  /* Lighter text for secondary info */
  line-height: 1.5;
}

.prompt-display-wrapper {
  position: relative;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.prompt-display-wrapper.visible {
  max-height: 500px;
  opacity: 1;
}

#system-prompt-display {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
  transition: all 0.3s ease;
}

#system-prompt-display::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  margin: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

#system-prompt-display.updated {
  animation: pulse 0.6s ease;
}

#reset-prompt-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--surface-border);
  color: var(--on-background-color);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-family-sans);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.6;
  transition: all 0.2s;
}

#reset-prompt-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.settings-group {
  padding: 0.75rem 0;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
  margin-top: 1rem;
  transition: opacity 0.3s;
}

.settings-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--on-surface-color);
  margin-bottom: 0.75rem;
  display: block;
}

.mode-selector {
  display: flex;
  background-color: var(--bot-message-bg);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--surface-border);
  transition: opacity 0.3s;
}

.mode-selector input[type="radio"] {
  display: none;
}

.mode-btn {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 500;
  color: var(--on-background-color);
  transition: all 0.3s ease;
}

.mode-selector input[type="radio"]:checked+.mode-btn {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#mode-default:checked+.mode-btn {
  background-color: #ffffff;
  color: var(--surface-color);
}

#mode-casual:checked+.mode-btn {
  background-color: #facc15;
  /* yellow-400 */
  color: #422006;
}

#mode-expert:checked+.mode-btn {
  background-color: var(--secondary-color);
  color: #064e3b;
}


.instruction-toggle-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-border);
  transition: opacity 0.3s;
}

.toggle-label-text {
  font-weight: 500;
  color: var(--on-surface-color);
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #4a5568;
  transition: .4s;
  border-radius: 34px;
}

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

input:checked+.slider {
  background-color: #22c55e;
}

input:focus+.slider {
  box-shadow: 0 0 1px #22c55e;
}

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

/* "ON" / "OFF" text inside the switch */
.slider:after {
  content: 'OFF';
  color: white;
  display: block;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 70%;
  font-size: 10px;
  font-family: var(--font-family-sans);
  font-weight: 600;
}

input:checked+.slider:after {
  content: 'ON';
  left: 30%;
}

.mini-chatbot-container {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 200ms ease-in-out;
}

.mini-chatbot-container.active {
  grid-template-rows: 1fr;
  margin-top: 0.75rem;
}

.mini-chatbot-inner {
  overflow: hidden;
}

#mini-chatbot-input {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bot-message-bg);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--on-surface-color);
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, opacity 0.3s;
}

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

#mini-chatbot-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--primary-glow);
  }

  50% {
    transform: scale(1.01);
    box-shadow: 0 0 15px 5px var(--primary-glow);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--primary-glow);
  }
}

.chat-form {
  position: relative;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-top: 1px solid var(--surface-border);
  background-color: var(--surface-color);
  flex-shrink: 0;
}

.input-area-container {
  position: relative;
}

#image-preview-container {
  padding: 0 0.5rem 0.5rem 0.5rem;
  display: none;
  gap: 0.5rem;
}

.image-preview-item {
  position: relative;
  display: inline-block;
}

.image-preview-item img {
  max-width: 80px;
  max-height: 80px;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
}

.image-preview-item .remove-image-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--surface-color);
  color: var(--on-surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1;
}

.image-preview-item .remove-image-btn:hover {
  background-color: var(--error-bg);
  color: var(--error-border);
  transform: scale(1.1);
}

.prompt-suggestions-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 1.5rem;
  right: 1.5rem;
  margin-bottom: 0.5rem;
  /* Space between popup and input box */
  background-color: var(--bot-message-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
  max-height: 250px;
  overflow-y: auto;
  z-index: 10;
  animation: slide-up 0.2s ease-out;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prompt-suggestions-popup ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prompt-suggestions-popup li {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--surface-border);
  color: var(--on-background-color);
  font-size: 0.95rem;
}

.prompt-suggestions-popup li:last-child {
  border-bottom: none;
}

.prompt-suggestions-popup li:hover {
  background-color: var(--user-message-bg);
  color: var(--on-surface-color);
}

/* === START CHAT INPUT RE-STYLE === */
@keyframes subtle-glow {

  0%,
  100% {
    box-shadow: 0 0 8px 0px rgba(167, 139, 250, 0);
  }

  50% {
    box-shadow: 0 0 8px 3px rgba(167, 139, 250, 0.15);
    /* Faint halo */
  }
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--input-bg);
  border-radius: 1rem;
  transition: all 0.3s ease-in-out;
  position: relative;
  padding: 6px 12px;
}

/* AI Provider Switch */
.ai-provider-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 0.25rem;
  border: 1px solid var(--surface-border);
}

.provider-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0;
}

.provider-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.provider-option.active {
  background: var(--primary-color);
  color: white;
}

.provider-option svg {
  width: 14px;
  height: 14px;
}

body.custom-glow-enabled .input-wrapper.is-typing {
  animation: subtle-glow 4s ease-in-out infinite;
}

.input-wrapper:focus-within {
  box-shadow: 0 0 0 1px var(--input-border-active);
}

.tools-popup-trigger {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Center on the border */
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  color: #a0aec0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 12;
  /* Higher than popup */
}

.tools-popup-trigger svg {
  transition: transform 0.3s ease-out;
}

.tools-popup-trigger.active svg {
  transform: rotate(180deg);
}

.tools-popup-trigger:hover {
  background-color: var(--user-message-bg);
  color: var(--on-surface-color);
}

.tools-label {
  display: inline-block;
  vertical-align: middle;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease;
}

.tools-popup-trigger:hover .tools-label {
  transition-delay: 0.3s;
  max-width: 40px;
  opacity: 1;
  margin-left: 4px;
}

.tools-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-bottom: 8px;
  transform: translateX(-50%) translateY(15px);
  background-color: rgba(42, 42, 47, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  z-index: 11;
  /* Lower than trigger */
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0s 0.25s;
}

.tools-popup.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0s 0s;
}

.input-action-btn {
  background: transparent;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.input-action-btn svg {
  width: 20px;
  height: 20px;
}

.input-action-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--on-surface-color);
}

#suggestion-toggle-btn.active,
#web-toggle-btn.active {
  color: var(--primary-color);
}

.input-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#chat-input {
  flex-grow: 1;
  padding: 4px;
  background-color: transparent;
  color: var(--on-surface-color);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  max-height: 150px;
  overflow-y: auto;
  border: none;
  outline: none;
}

#chat-input::placeholder {
  color: #718096;
}

#send-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: #a0aec0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#send-button.active {
  background-color: var(--primary-color);
  color: var(--surface-color);
}

#send-button:not(.active):hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

#send-button.active:hover:not(:disabled) {
  transform: scale(1.05);
}

#send-button:disabled {
  background-color: transparent;
  color: #4a5568;
  cursor: not-allowed;
  transform: scale(1);
}

.loader {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid var(--primary-color);
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

#send-button:disabled .loader {
  border-top-color: #4a5568;
}

/* === END CHAT INPUT RE-STYLE === */

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

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

/* Typing Indicator */
.typing-indicator-wrapper {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
}

.typing-indicator {
  background-color: var(--bot-message-bg);
  border: 1px solid var(--surface-border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  border-bottom-left-radius: 4px;
  max-width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background-color: #a0aec0;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

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

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

.typing-indicator .typing-dot:nth-child(3) {
  animation-delay: 0s;
}


@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1.0);
  }
}

/* --- Pro Power Indicator --- */
.power-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 18px;
  height: 18px;
}

.power-indicator svg .power-fill {
  animation: fill-up 2.5s linear infinite;
}

@keyframes fill-up {
  0% {
    transform: translateY(100%);
  }

  100% {
    transform: translateY(0%);
  }
}

.message.bot .power-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  animation: none;
  opacity: 0.6;
}

.message.bot .power-indicator svg .power-fill {
  animation: none;
  fill: var(--primary-color);
}

/* --- End Pro Power Indicator --- */


/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--surface-border);
  width: 90%;
  max-width: 800px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--on-background-color);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  opacity: 1;
}

.memories-list {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

.memory-category-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface-border);
}

.memory-category-header:first-child {
  margin-top: 0;
}

.memory-item {
  background-color: var(--bot-message-bg);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.memory-item.processing .summary-text {
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

.memory-number {
  font-size: 1rem;
  font-weight: 600;
  color: var(--on-background-color);
  padding-top: 2px;
}

.memory-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}


.memory-content {
  color: var(--on-surface-color);
  line-height: 1.6;
}

.memory-summary {
  color: var(--on-surface-color);
  line-height: 1.6;
}

.summary-text {
  display: inline;
}

.see-more-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  margin-left: 0.5rem;
  padding: 0;
  font-size: 0.9em;
  text-decoration: underline;
}

.memory-full-text {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-top 0.4s ease-in-out;
}

.memory-full-text.visible {
  max-height: 1000px;
  opacity: 1;
  margin-top: 0.75rem;
}

.memory-full-text pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.6;
}


.memory-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.memory-timestamp {
  font-size: 0.8rem;
  color: #a0aec0;
}

.memory-actions {
  display: flex;
  gap: 0.5rem;
}

.memory-action-btn {
  background: none;
  border: 1px solid transparent;
  color: #a0aec0;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.memory-action-btn:hover {
  color: var(--on-surface-color);
  background-color: var(--user-message-bg);
}

.memory-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* Message Actions: Highlight & Bookmark Buttons */
.message-actions-container {
  display: flex;
  flex-direction: row;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
  margin-top: 8px;
  /* Space below message */
}

.message-wrapper.bot:hover .message-actions-container {
  opacity: 1;
  pointer-events: auto;
}

.message-action-btn {
  background-color: var(--bot-message-bg);
  border: 1px solid var(--surface-border);
  color: #a0aec0;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.message-action-btn:hover {
  color: var(--on-surface-color);
  background-color: var(--user-message-bg);
}

.message-action-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.message-action-btn.api-disabled {
  pointer-events: none;
  opacity: 0.4 !important;
}

.message-action-btn.active {
  color: var(--primary-color);
  border-color: rgba(167, 139, 250, 0.5);
  background-color: rgba(167, 139, 250, 0.1);
}

.message-action-btn.save-memory-btn.active svg {
  fill: var(--primary-color);
}

#clear-highlights-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-color);
  color: var(--surface-color);
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-family-sans);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease;
  transition: transform 0.2s ease;
}

#clear-highlights-btn:hover {
  transform: scale(1.05);
}

#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.toast {
  background-color: #2d3748;
  color: #e2e8f0;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Edit in place styles */
.memory-item .edit-textarea {
  width: 100%;
  background-color: #1a202c;
  color: var(--on-surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  padding: 0.5rem;
  font-family: var(--font-family-sans);
  font-size: 1rem;
  resize: vertical;
  min-height: 80px;
}

.edit-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* --- SIDE DRAWER --- */
.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  /* left edge only */
  width: var(--drawer-width);
  max-width: 420px;
  background: var(--surface-color);
  box-shadow: 2px 0 12px rgba(0, 0, 0, .15);
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--surface-border);
}

.drawer.open {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  flex-shrink: 0;
}

.drawer__header h2 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--on-surface-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

#new-chat-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 24px);
  margin: 0 12px 8px 12px;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  background-color: transparent;
  color: var(--on-surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#new-chat-btn:hover {
  background-color: var(--user-message-bg);
}

.drawer-nav-section {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Space between buttons */
}

.drawer-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  background-color: transparent;
  color: var(--on-background-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-action-btn:hover {
  background-color: var(--user-message-bg);
}

.drawer-action-btn.active {
  background-color: rgba(167, 139, 250, 0.1);
  color: var(--primary-color);
}

.drawer-divider {
  height: 1px;
  background-color: var(--surface-border);
  margin: 8px 0;
}

#recent-chats-container {
  display: none;
  /* Hidden by default */
}

/* --- LIVE FEED --- */
#live-feed-container {
  padding: 8px 12px;
}

.live-feed-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 8px 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-feed-item {
  background-color: var(--bot-message-bg);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--on-background-color);
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.live-feed-item:hover {
  background-color: var(--user-message-bg);
  border-color: var(--surface-border);
  transform: translateY(-2px);
}

.live-feed-item.skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 60px;
  pointer-events: none;
  background-color: var(--bot-message-bg);
}

.live-feed-item.skeleton .line {
  background: linear-gradient(90deg, var(--user-message-bg) 25%, #4a5568 50%, var(--user-message-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
  height: 12px;
}

.live-feed-item.skeleton .line-1 {
  width: 80%;
}

.live-feed-item.skeleton .line-2 {
  width: 60%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* --- END LIVE FEED --- */

.recent-chats-title {
  padding: 8px 20px 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  margin: 4px 12px;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.chat-list-item:hover {
  background-color: var(--bot-message-bg);
}

.chat-list-item.active {
  background-color: var(--primary-color);
}

.chat-list-item .chat-link {
  flex-grow: 1;
  padding: 10px 0 10px 20px;
  color: var(--on-background-color);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.chat-list-item:hover .chat-link {
  color: var(--on-surface-color);
}

.chat-list-item.active .chat-link {
  color: var(--surface-color);
  font-weight: 600;
}

.delete-chat-btn {
  background: transparent;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-right: 8px;
}

.chat-list-item:hover .delete-chat-btn {
  opacity: 1;
}

.delete-chat-btn:hover {
  color: #ef4444;
  /* red */
  background-color: rgba(239, 68, 68, 0.1);
}

.chat-list-item.active .delete-chat-btn {
  opacity: 0.7;
  color: var(--surface-color);
}

.chat-list-item.active:hover .delete-chat-btn {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.2);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility 0s .35s;
  z-index: calc(var(--z-drawer) - 1);
}

.backdrop.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--surface-border);
  background-color: var(--bot-message-bg);
  display: flex;
  justify-content: flex-end;
}

.footer-settings-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-setting-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-switch.legend-mode input:checked+.slider {
  background-color: var(--error-border);
}

.toggle-switch.legend-mode input:focus+.slider {
  box-shadow: 0 0 1px var(--error-border);
}

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

/* Disabled states when legend mode is active */
body.legend-mode-active .mode-selector,
body.legend-mode-active .instruction-toggle-group,
body.legend-mode-active .mini-chatbot-container {
  opacity: 0.4;
  pointer-events: none;
}


[data-role="system"][data-hidden="true"] {
  display: none;
  /* never render */
}

/* --- New Selection Highlight Styles --- */
.text-highlight {
  background-color: var(--highlight-bg);
  color: #fef3c7;
  /* Lighter color for better contrast on dark bg */
  border-radius: 4px;
  padding: 1px 0;
}


#selection-toolbar {
  position: absolute;
  background-color: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.25rem;
  display: none;
  /* Initially hidden */
  gap: 0.25rem;
  z-index: 1100;
  animation: fadeIn 0.1s ease-out;
}

.toolbar-btn {
  background: none;
  border: none;
  color: var(--on-background-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background-color: var(--user-message-bg);
}

.toolbar-btn svg {
  width: 16px;
  height: 16px;
}

@media (prefers-reduced-motion: reduce) {
  body.custom-glow-enabled .input-wrapper.is-typing {
    animation: none;
    border: 1px solid var(--input-border-active);
  }
}

@media (max-width: 768px) {
  body {
    padding: 0;
    display: block;
    /* Let the banner push content */
  }

  .container {
    height: calc(100vh - 38px);
    /* Adjust for banner */
    border-radius: 0;
    border: none;
    margin-top: 0;
  }

  body:not(:has(#mock-mode-banner[style*="display: block"])) .container {
    height: 100vh;
  }

  .chat-log {
    padding: 1rem;
  }

  header {
    padding: 0.75rem 1rem;
  }

  .chat-form {
    padding: 1.5rem 1rem 1rem;
    /* Keep top padding for button on mobile */
  }

  .modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .modal-body {
    padding: 1rem;
    /* Less padding on mobile modals */
  }

  .drawer__header {
    padding: 1rem 1rem 1rem 1rem;
    /* Adjust for smaller screens */
  }

  #clear-highlights-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 600px) {
  :root {
    --drawer-width: 85%;
  }
}

/* Touch feedback for interactive elements */
.hamburger:active,
.header-action-btn:active,
.input-action-btn:active,
#send-button.active:active,
#new-chat-btn:active,
.drawer-action-btn:active,
.chat-list-item:active,
.memory-action-btn:active,
.toolbar-btn:active,
.mode-btn:active,
.delete-chat-btn:active,
#clear-highlights-btn:active,
#rate-limit-retry-btn:active,
.image-preview-item .remove-image-btn:active {
  transform: scale(0.97);
}

/* === AUTHENTICATION MODAL === */
.auth-modal {
  max-width: 420px;
  width: 90vw;
  background: rgba(33, 33, 33, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: authModalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: backdropFadeIn 0.3s ease-out;
}

@keyframes authModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }

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

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.auth-modal .modal-header {
  position: relative;
  padding: 24px 32px 0;
  text-align: center;
}

.auth-modal .modal-header .logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #9333ea 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(167, 139, 250, 0.3);
}

.auth-modal .modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--on-surface-color);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.auth-modal .modal-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.4;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
  padding: 0 32px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-color);
  letter-spacing: 0.1px;
}

.input-group input {
  padding: 16px 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface-color);
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.12), 0 8px 20px rgba(167, 139, 250, 0.1);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.input-group input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.input-group input.error {
  border-color: var(--error-border);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
  animation: inputShake 0.4s ease-in-out;
}

@keyframes inputShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.form-error {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--error-border);
  font-size: 14px;
  margin-top: 4px;
  animation: errorSlideIn 0.3s ease-out;
}

.form-error.show {
  display: flex;
}

@keyframes errorSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #9333ea 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 56px;
  position: relative;
  overflow: hidden;
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(167, 139, 250, 0.4);
}

.auth-submit-btn:hover::before {
  left: 100%;
}

.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-submit-btn:disabled::before {
  display: none;
}

.auth-submit-btn .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 32px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.auth-divider span {
  padding: 0 20px;
  background: var(--surface-color);
}

.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.95);
  color: #374151;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 32px 24px;
  backdrop-filter: blur(10px);
}

.google-signin-btn:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.google-signin-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-switch {
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 32px 32px;
  line-height: 1.5;
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: all 0.2s ease;
  position: relative;
}

.auth-switch-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.auth-switch-link:hover {
  color: #9333ea;
}

.auth-switch-link:hover::after {
  width: 100%;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.password-strength.show {
  opacity: 1;
  transform: translateY(0);
}

.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.strength-bar {
  height: 4px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.strength-bar.weak {
  background: #ef4444;
}

.strength-bar.medium {
  background: #f59e0b;
}

.strength-bar.strong {
  background: #10b981;
}

.strength-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* Success Animation */
.auth-modal.success {
  animation: authSuccess 0.6s ease-out;
}

@keyframes authSuccess {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
  }

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

/* Mobile Responsive */
@media (max-width: 480px) {
  .auth-modal {
    width: 95vw;
    margin: 10px;
  }

  .auth-modal .modal-header {
    padding: 20px 24px 0;
  }

  .auth-form {
    padding: 0 24px;
  }

  .auth-divider {
    margin: 20px 24px;
  }

  .google-signin-btn {
    margin: 0 24px 20px;
  }

  .auth-switch {
    padding: 0 24px 24px;
  }

  .auth-modal .modal-title {
    font-size: 24px;
  }
}

/* High Contrast Mode */
@media (forced-colors: active) {
  .auth-modal {
    border: 2px solid ButtonText;
  }

  .auth-submit-btn {
    border: 2px solid ButtonText;
  }

  .input-group input {
    border: 2px solid ButtonText;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .auth-modal,
  .auth-modal::backdrop,
  .input-group input,
  .auth-submit-btn,
  .google-signin-btn,
  .auth-switch-link::after {
    animation: none;
    transition: none;
  }

  .auth-submit-btn:hover,
  .google-signin-btn:hover,
  .input-group input:focus {
    transform: none;
  }
}

/* === ENHANCED AUTHENTICATION FEATURES === */

/* Enhanced Password Input */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

/* Password Requirements */
.password-requirements {
  margin-top: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.password-requirements.show {
  opacity: 1;
  transform: translateY(0);
}

.password-requirements h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-color);
  margin-bottom: 8px;
}

.password-requirements ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.requirement::before {
  content: '✗';
  color: #ef4444;
  font-weight: bold;
  transition: color 0.3s ease;
}

.requirement.met {
  color: #10b981;
}

.requirement.met::before {
  content: '✓';
  color: #10b981;
}

/* Terms and Conditions */
.terms-group {
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
  opacity: 1;
}

.text-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: #9333ea;
}

/* Form Success States */
.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-size: 14px;
  margin-top: 4px;
  animation: successSlideIn 0.3s ease-out;
}

.form-success.show {
  display: flex;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Legal Links */
.auth-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 32px 24px;
  font-size: 13px;
}

.legal-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.legal-link:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.legal-separator {
  color: rgba(255, 255, 255, 0.3);
}

/* === TERMS AND PRIVACY MODALS === */
.terms-modal,
.privacy-modal {
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  background: rgba(33, 33, 33, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.terms-content,
.privacy-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.terms-content::-webkit-scrollbar,
.privacy-content::-webkit-scrollbar {
  width: 6px;
}

.terms-content::-webkit-scrollbar-track,
.privacy-content::-webkit-scrollbar-track {
  background: transparent;
}

.terms-content::-webkit-scrollbar-thumb,
.privacy-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.terms-text h3,
.privacy-text h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--on-surface-color);
  margin: 24px 0 12px 0;
}

.terms-text h3:first-child,
.privacy-text h3:first-child {
  margin-top: 0;
}

.terms-text p,
.privacy-text p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}

.terms-update,
.privacy-update {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  margin-top: 24px;
  text-align: center;
}

/* === PLAN SELECTION MODAL === */
.plan-modal {
  max-width: 900px;
  width: 95vw;
  background: rgba(33, 33, 33, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.plan-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-top: 8px;
}

.plans-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 32px 24px;
}

.plan-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(167, 139, 250, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.plan-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(167, 139, 250, 0.2);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-color), #9333ea);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.plan-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--on-surface-color);
  margin-bottom: 8px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.plan-price span {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.plan-features li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
  padding-left: 4px;
  line-height: 1.4;
}

.plan-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #9333ea);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(167, 139, 250, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-surface-color);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* === GOOGLE TERMS MODAL === */
.google-terms-modal {
  max-width: 450px;
  width: 90vw;
  background: rgba(33, 33, 33, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.google-terms-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-top: 8px;
}

.google-user-info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.user-details h4 {
  color: var(--on-surface-color);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.user-details p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
}

.terms-acceptance {
  padding: 20px 0;
}

/* === SECURITY MODAL === */
.security-modal {
  max-width: 400px;
  width: 90vw;
  background: rgba(33, 33, 33, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#captcha-container {
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

.security-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.5;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  .plans-container {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 16px;
  }

  .plan-card {
    padding: 20px;
  }

  .auth-legal-links {
    flex-direction: column;
    gap: 12px;
  }

  .legal-separator {
    display: none;
  }
}

@media (max-width: 480px) {

  .terms-modal,
  .privacy-modal {
    width: 95vw;
    margin: 20px;
  }

  .terms-content,
  .privacy-content {
    padding: 16px;
    max-height: 50vh;
  }

  .google-user-info {
    flex-direction: column;
    text-align: center;
  }

  .checkbox-label {
    font-size: 13px;
  }
}

/* === ENHANCED WELCOME MODAL === */
.welcome-modal {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
}

.welcome-modal .auth-modal {
  max-width: 480px;
  background: linear-gradient(145deg, rgba(33, 33, 33, 0.95), rgba(41, 41, 41, 0.95));
  border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: welcomeModalEnter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes welcomeModalEnter {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.8);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.welcome-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 50%, #06b6d4 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow:
    0 12px 24px rgba(167, 139, 250, 0.4),
    0 0 0 4px rgba(167, 139, 250, 0.1);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from {
    box-shadow:
      0 12px 24px rgba(167, 139, 250, 0.4),
      0 0 0 4px rgba(167, 139, 250, 0.1);
  }

  to {
    box-shadow:
      0 16px 32px rgba(167, 139, 250, 0.6),
      0 0 0 6px rgba(167, 139, 250, 0.2);
  }
}

.welcome-logo svg {
  width: 32px;
  height: 32px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 12px;
  letter-spacing: -0.8px;
  text-align: center;
}

.welcome-subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  font-weight: 400;
}

.auth-content {
  padding: 0;
}

/* Free Option Styling */
.auth-free-option {
  margin-top: 12px;
  padding: 0 32px 32px;
}

.free-option-divider {
  display: flex;
  align-items: center;
  margin: 20px 0 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
}

.free-option-divider::before,
.free-option-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.free-option-divider span {
  padding: 0 16px;
  background: var(--surface-color);
  position: relative;
}

.start-free-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.start-free-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.start-free-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(52, 211, 153, 0.4);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.start-free-btn:hover::before {
  left: 100%;
}

.start-free-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.start-free-btn svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.free-option-text {
  margin: 12px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  line-height: 1.4;
}

/* Welcome modal specific adjustments */
.welcome-modal .modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.welcome-modal .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: scale(1.1);
}

/* Auto-show welcome modal on first visit */
.first-visit .welcome-modal {
  display: flex !important;
  animation: welcomeAutoShow 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1s both;
}

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

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

/* Update body modal state to include auth modal */
body:has(.welcome-modal[style*="display: flex"]) {
  overflow: hidden;
}

body:has(.welcome-modal[style*="display: flex"]) .modal-is-open {
  overflow: hidden;
}

/* Mobile responsive for welcome modal */
@media (max-width: 480px) {
  .welcome-modal .auth-modal {
    width: 95vw;
    margin: 10px;
    max-width: none;
  }

  .welcome-title {
    font-size: 28px;
  }

  .welcome-subtitle {
    font-size: 16px;
  }

  .welcome-logo {
    width: 56px;
    height: 56px;
  }

  .welcome-logo svg {
    width: 28px;
    height: 28px;
  }

  .auth-free-option {
    padding: 0 24px 24px;
  }
}

/* Enhanced animations for better UX */
.auth-modal.entering {
  animation: welcomeModalEnter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-modal.leaving {
  animation: welcomeModalLeave 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

@keyframes welcomeModalLeave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* Update existing modal styles to work with new structure */
.modal-overlay.welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* Success states for free mode */
.start-free-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.3);
  }

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

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