.stats-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.stats-modal {
  position: relative;
  width: min(30vw, 600px);
  height: min(50vh, 500px);
  background: linear-gradient(135deg, 
    rgba(8, 13, 23, 0.98),
    rgba(14, 21, 40, 0.95));
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.stats-modal-overlay.show .stats-modal {
  transform: scale(1);
}

.stats-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.stats-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  transform: rotate(90deg);
}

.stats-content {
  height: calc(100% - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

@media (max-width: 768px) {
  .stats-modal-overlay {
    display: none !important;
  }
}



.suggest-edit-form {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

.suggest-edit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.cm-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: tagSlide 0.4s ease-out;
}

@keyframes tagSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card-code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 11px;
  color: #6b7280;
  background: #f9fafb;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #e5e7eb;
}

.form-group {
  margin-bottom: 18px;
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  letter-spacing: 0.01em;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #1f2937;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #fafbff;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
  font-size: 13px;
}

.form-textarea {
  min-height: 100px;
  max-height: 200px;
  resize: vertical;
  line-height: 1.5;
}

.char-counter {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  font-size: 11px;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.char-counter.warning {
  color: #ef4444;
}

.submit-button {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.submit-button:hover::before {
  width: 300px;
  height: 300px;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.35);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.35);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.submit-icon {
  width: 16px;
  height: 16px;
  animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.message-box {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease-out;
  font-size: 14px;
}

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

.success-message {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error-message {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}


.form-input:hover,
.form-textarea:hover {
  border-color: #d1d5db;
}


* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


@media (max-width: 640px) {
  .form-input,
  .form-textarea {
    font-size: 16px; 
  }
  
  .submit-button {
    padding: 14px 20px;
  }
}


@media (prefers-color-scheme: dark) {
  .form-input,
  .form-textarea {
    background: #1f29372f;
    color: #f9fafb;
    border-color: #374151;
  }
  
  .form-input:focus,
  .form-textarea:focus {
    background: #2935442f;
    border-color: #667eea;
  }
  
  .card-code {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
  }
  
  .form-label {
    color: #e5e7eb;
  }
}














 























:root {
  --modal-card: #1e1f22;
  --text: #e5f0ff;
  --line: rgba(255, 255, 255, 0.10);
  --line-hover: rgba(255, 255, 255, 0.18);
  --btn-primary: rgba(255, 255, 255, 0.06);
}

.cm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.cm-dialog {
  background: var(--modal-card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  width: min(92vw, 560px);
  max-height: 80vh;
  overflow: auto;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(229, 240, 255, 0.03);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.cm-dialog::-webkit-scrollbar {
  width: 6px;
}

.cm-dialog::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}

.cm-dialog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: background 0.2s;
}

.cm-dialog::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.cm-title {
  margin: 0 0 16px;
  font: 600 20px/1.3 system-ui, -apple-system, "Segoe UI", Roboto;
  animation: fadeInText 0.5s ease 0.1s both;
}

.cm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  animation: fadeInText 0.5s ease 0.2s both;
}


.cm-btn2 {
  background: #5f5f5f4b;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cm-btn2:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 30px rgba(255, 255, 255, 0);
}
.cm-btn {
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cm-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.cm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cm-btn:hover::before {
  width: 100px;
  height: 100px;
}

.cm-btn:active {
  transform: translateY(0);
}

.cm-btn.primary {
  background: var(--btn-primary);
  border-color: var(--line-hover);
}

.cm-btn.primary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
}

.cm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  color: rgba(229, 240, 255, 0.6);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 20px;
}

.cm-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: rotate(90deg);
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


























/* Group holding Create + Settings side-by-side */
.ai-tools2{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  vertical-align: middle;
}

/* Settings wrapper stays inline */
.ai-settings-wrapper2{
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* Tool buttons (Create + Settings) */
.ai-tool-btn2 {
  display: inline-flex;          /* only inline-flex, not flex twice */
  align-items: center;
  justify-content: center;
  gap: 6px;

  margin-right: auto;            /* push this button to the left */

  padding: 8px 14px;
  min-height: 34px;
  min-width: 90px;
  
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);;
  color: var(--ai-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

/* This wrapper should wrap the NEXT button (e.g. Settings) */
.ai-tool-btn2-wrapper {
  margin-left: 16px;  /* creates gap from the left button */
}


.ai-tool-btn2 svg{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ai-tool-btn2:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.ai-tool-btn2:active{ transform: translateY(1px); }

/* Cyan accent for Create button */
.ai-create-btn2:hover{
  box-shadow: inset 0 0 0 1px rgba(0,255,255,0.3);
  background: linear-gradient(180deg, rgba(0,255,255,0.1), rgba(255,255,255,0.05));
}

/* Hide text on very small screens */
@media (max-width: 480px){
  .ai-create-text{ display: none; }
  .ai-create-btn{ min-width: auto; padding: 8px; }
}

.ai-tool-btn2.selected {
 box-shadow: inset 0 0 0 1px rgba(0, 195, 255, 0.473);
  background: linear-gradient(180deg, rgba(0,255,255,0.1), rgba(255,255,255,0.05));
}


















/* Reset password error message */
.reset-error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 8px;
    margin: 12px 20px;
    animation: slideIn 0.3s ease;
}

.reset-error-message svg {
    color: #ff4757;
    flex-shrink: 0;
}

.reset-error-message span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.4;
}

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