/* Base styles */
:root {
  --primary-color: #5f6be0;
  --primary-light: #eef0ff;
  --primary-dark: #4751c9;
  --accent-color: #fd7e55;
  --accent-light: #fff4ef;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #888888;
  --bg-color: #fafafa;
  --white: #ffffff;
  --border-color: #e0e0e0;
  --hover-bg: #f5f5f5;
  --highlight: #fffae8;
  --blue-light: #e5f0ff;
  --green-light: #e6f7e9;
  --red-light: #ffefef;
  --surface-1: #ffffff;
  --surface-2: #f5f5f5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 24px;
  --transition: all 0.2s ease;
  --spacing-1: 4px;
  --spacing-2: 8px;
  --spacing-3: 12px;
  --spacing-4: 16px;
  --spacing-5: 20px;
  --spacing-6: 24px;
  --spacing-8: 32px;
  --spacing-9: 36px;
  --danger-color: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Main content should grow and allow scrolling */
.main-content {
    flex: 1 0 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Footer stays at the bottom, not fixed */
.footer {
    flex-shrink: 0;
    width: 100%;
}

/* If you want the info-footer always at the bottom, use this: */
.info-footer {
    background: #f8f9ff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
    padding: 10px 0;
    font-size: 15px;
    color: #5f6be0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Add gap between tool/footer bars */
.footer-gap {
    height: 18px;
    background: transparent;
    width: 100%;
}

/* Space out the info-footer links */
.info-footer .footer-center {
    display: flex;
    justify-content: center;
    gap: 24px; /* More space between links */
}

.info-footer .footer-center a {
    color: #5f6be0;
    margin: 0 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 0 8px;
    transition: color 0.2s;
}

.info-footer .footer-center a:hover {
    text-decoration: underline;
    color: #4751c9;
}

/* Header styles */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-bottom: 1px solid #e8eaed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 74px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-left {
  grid-area: left;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: start;
}
.header-center {
  grid-area: center;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: center;
}
.header-right {
  grid-area: right;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.logo:hover {
  transform: scale(1.02);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  background: linear-gradient(135deg, #5f6be0, #8a98f3);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(95, 107, 224, 0.3);
  transition: all 0.2s ease;
}

.logo-text {
  font-weight: 600;
  font-size: 18px;
  color: var(--primary-color);
}
.doc-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e8eaed;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
  max-width: 300px;
}
.doc-title {
  font-size: 14px;
  color: #5f6be0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;

  /* ✅ Center this element */
  display: block;
  margin: 0 auto;   /* pushes it to the horizontal center */
  width: fit-content; /* keeps it only as wide as its text */
}
.doc-title:hover {
  background-color: var(--hover-bg);
}

.menu-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-tertiary);
  padding: var(--spacing-2);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  padding: var(--spacing-3) var(--spacing-4);
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  
  /* ✅ Updated positioning */
  margin-left: auto;   /* pushes the whole div to the right */
  margin-right: 0;     /* keep it flush with right */
  max-width: none;     /* remove fit-content constraint */
}

/* User Info Section */
.user-info {
  display: flex;
  flex-direction: row;   
  align-items: center;
  gap: var(--spacing-2);
  margin-right: var(--spacing-2);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-plan {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-1) var(--spacing-3);
  background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(95, 107, 224, 0.2);
}

/* Enhanced Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-5);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 40px;
  justify-content: center;
}

.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;
}

.btn:hover::before {
  left: 100%;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 2px 4px rgba(95, 107, 224, 0.3);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), #3b47c7);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(95, 107, 224, 0.4);
}

.secondary-btn {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.secondary-btn:hover {
  background: var(--hover-bg);
  border-color: var(--border-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: var(--transition);
}

.icon-btn:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.copy-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.copy-btn:hover {
  color: var(--primary-color);
}

/* Enhanced Dropdown */
.dropdown {
  position: relative;
}

/* User dropdown button refined */
.dropdown-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent; /* keep background clean */
  border: 2px solid var(--primary-color); /* ⬅️ border with primary */
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-toggle i {
  font-size: 18px;
  color: var(--primary-color); /* ⬅️ icon in primary */
  transition: var(--transition);
}

.dropdown-toggle:hover {
  background: var(--hover-bg);
  transform: scale(1.05);
  box-shadow: 0 0 6px rgba(95, 107, 224, 0.25);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + var(--spacing-2));
  right: 0;
  min-width: 200px;
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-3) var(--spacing-4);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--hover-bg);
  color: var(--primary-color);
  transform: translateX(4px);
}

.dropdown-item i {
  font-size: 16px;
  color: var(--text-tertiary);
  transition: var(--transition);
  width: 16px;
}

.dropdown-item:hover i {
  color: var(--primary-color);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--spacing-2) 0;
}

/* Special styling for logout */
.dropdown-item:last-child {
  color: var(--danger-color);
}

.dropdown-item:last-child:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.dropdown-item:last-child i {
  color: var(--danger-color);
}

/* Authentication buttons container */
.auth-buttons {
  display: flex;
  gap: var(--spacing-3);
}

/* Main content styles */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  background-color: var(--bg-color);
}

/* Editor area styles */
.editor-area {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.editor {
  flex: 1;
  padding: var(--spacing-5);
  overflow-y: auto;
  display: flex;
  justify-content: center;
  background-color: var(--bg-color);
}

.editor-container {
  width: 100%;
  max-width: 800px;
  padding: var(--spacing-5);
  background-color: var(--surface-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
}

.textarea-container {
  position: relative;
  margin-bottom: var(--spacing-5);
  min-height: 300px;
}

#inputText {
  width: 100%;
  min-height: 300px;
  padding: var(--spacing-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: var(--transition);
  background-color: var(--surface-1);
}

#inputText:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.placeholder {
  position: absolute;
  top: var(--spacing-4);
  left: var(--spacing-4);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: var(--transition);
  font-size: 16px;
}

#inputText:not(:placeholder-shown) + .placeholder,
#inputText:focus + .placeholder {
  opacity: 0;
}

.rich-editor {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--surface-1);
  overflow-y: auto;
  outline: none;
}

/* placeholder shim */
.rich-editor:empty:before {
  content: attr(placeholder);
  color: var(--text-tertiary);
  pointer-events: none;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 80px;
  text-align: center;
  padding: var(--spacing-6);
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  color: var(--primary-color);
  opacity: 0.5;
  margin-bottom: var(--spacing-5);
}

.empty-state-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: var(--spacing-3);
}

.empty-state-subtext {
  font-size: 14px;
  color: var(--text-tertiary);
  max-width: 400px;
  line-height: 1.5;
}

/* File upload styles */
.file-upload {
  display: flex;
  justify-content: center;
  margin: var(--spacing-5) 0;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-4);
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border: 1px dashed var(--primary-color);
  transition: var(--transition);
}

.file-upload-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(95, 107, 224, 0.3);
}

.file-input {
  display: none;
}

/* Results container styles */
.results-container {
  margin-top: var(--spacing-6);
  background-color: var(--surface-1);
  border-radius: var(--radius-md);
  padding: var(--spacing-5);
  box-shadow: var(--shadow-sm);
}

.results-heading {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing-4);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.results-heading i {
  color: var(--primary-color);
}

.text-display {
  padding: var(--spacing-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--surface-1);
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-line;
  line-height: 1.6;
  font-size: 16px;
  margin-bottom: var(--spacing-4);
}

.text-section {
  margin-bottom: var(--spacing-5);
}

.text-section-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

/* Analysis panel styles */
.analysis-panel {
  width: 380px;
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.analysis-panel .panel-header {
  background: linear-gradient(135deg, #5f6be0, #8a98f3);
  padding: var(--spacing-4) var(--spacing-5);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analysis-panel .panel-header i {
  margin-right: 8px;
  margin-top: 50px;
}
.analysis-panel .panel-header span {
  
  margin-top: 50px;
}

.analysis-panel .panel-content {
  padding: 0;
  overflow-y: auto;
  flex: 1;
  background: #fafbff;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 15px;
}

.category-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  color: #666;
  background: #f0f0f0;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.category-tab:hover {
  background: #e8e8e8;
  color: #444;
}

.category-tab.active {
  background: #5f6be0;
  color: #fff;
}

/* Suggestion Cards */
.suggestion-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-left: 4px solid #5f6be0;
}

.suggestion-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.suggestion-item-active {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-left-color: #2196f3 !important;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.suggestion-item-removed {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
    max-height: 200px;
  }
  to {
    opacity: 0;
    transform: translateX(20px);
    max-height: 0;
    margin: 0;
    padding: 0;
  }
}

.suggestion-item-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.suggestion-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  color: #5f6be0;
}

.suggestion-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.suggestion-text {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-top: 4px;
}

/* Issue and Recommendation text styles */
.issue-text {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.recommendation-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 12px;
}

.issue-text strong,
.recommendation-text strong {
  color: #333;
  font-weight: 600;
}

/* Suggestion actions */
.suggestion-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.suggestion-action {
  font-size: 12px;
  padding: 6px 12px;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  text-decoration: none;
}

.suggestion-action:hover {
  background: #e0e0e0;
}

.suggestion-action-accept {
  background: #eef0ff;
  color: #5f6be0;
}

.suggestion-action-accept:hover {
  background: #d8dcfe;
}

.suggestion-action-options {
  background: #fff4ef;
  color: #fd7e55;
}

.suggestion-action-options:hover {
  background: #ffe9df;
}

/* Options container */
.options-container {
  margin-top: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid #e0e0e0;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
}
.visi-text {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0080FF 0%, #00BFFF 50%, #1E90FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-family: 'Arial Black', Arial, sans-serif;
}

.grow-well {
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0080FF 0%, #00BFFF 50%, #1E90FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

<!-- With this CSS: -->
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    text-decoration: none;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.visi-logo {
    display: flex;
    align-items: center;
    position: relative;
}

.visi-text {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0080FF 0%, #00BFFF 50%, #1E90FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-family: 'Arial Black', Arial, sans-serif;
}

.grow-well {
    position: absolute;
    right: -85px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0080FF 0%, #00BFFF 50%, #1E90FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

.option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
}

.option-item:hover {
  border-color: #d0d0d0;
  background-color: #fafafa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.option-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  margin-right: 12px;
}

.option-accept-btn {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.option-accept-btn:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-1px);
}

/* Loading states */
.analysis-loading,
.options-loading {
  text-align: center;
  padding: 30px;
  color: #666;
  font-size: 14px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 8px;
  margin: 15px;
}

.analysis-loading i,
.options-loading i {
  font-size: 24px;
  color: #4caf50;
  margin-right: 12px;
}

/* Enhanced no suggestions state */
.no-suggestions {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.no-suggestions-icon {
  font-size: 48px;
  color: #4CAF50;
  margin-bottom: 16px;
  opacity: 0.8;
}

.no-suggestions-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.no-suggestions-text {
  font-size: 14px;
  line-height: 1.5;
}

/* Enhanced error state */
.error-message {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border-radius: 8px;
  margin: 15px;
  color: #fd7e55;
  font-style: normal;
}

.error-icon {
  font-size: 36px;
  color: #f44336;
  margin-bottom: 12px;
}

.error-title {
  font-size: 16px;
  font-weight: 600;
  color: #d32f2f;
  margin-bottom: 8px;
}

.error-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.4;
}

.error-retry-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.error-retry-btn:hover {
  background: #d32f2f;
}

.no-options {
  text-align: center;
  padding: 20px;
  color: #888;
  font-style: italic;
  font-size: 14px;
}

/* Friction highlighting */
.sentence-friction-highlight {
  background-color: rgba(255, 152, 0, 0.15);
  border-bottom: 2px solid #ff9800;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline;
}

.sentence-friction-highlight:hover {
  background-color: rgba(255, 152, 0, 0.25);
}

/* Different colors for different friction types */
.sentence-friction-highlight[data-type="but"],
.friction-type-but {
  border-bottom-color: #ff9800;
  background-color: rgba(255, 152, 0, 0.1);
}

.sentence-friction-highlight[data-type="should"],
.friction-type-should {
  border-bottom-color: #2196f3;
  background-color: rgba(33, 150, 243, 0.1);
}

.sentence-friction-highlight[data-type="not"],
.friction-type-not {
  border-bottom-color: #f44336;
  background-color: rgba(244, 67, 54, 0.1);
}

.friction-mark {
  border-bottom: 2px dotted;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding-bottom: 1px;
}

.friction-mark:hover {
  background-color: rgba(95, 107, 224, 0.15) !important;
}

/* Footer background and padding */
.footer {
  display: flex;
  align-items: center;
  background-color: #f1f3f5;
  padding: 14px 20px;
  border-top: 1px solid #eaeaea;
}

/* Give each region equal flex so center stays centered */
.footer-left,
.footer-center,
.footer-right {
  flex: 1;
}

/* Center the format buttons group */
.footer-center {
  display: flex;
  justify-content: center;
}

/* Surround the buttons with a pill-shaped background */
.format-group {
  display: flex;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  padding: 4px 8px;
}

/* Format button styles */
.format-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin: 0 6px;
  padding: 8px;
  border-radius: 50%;
}

.format-btn:hover {
  background-color: #f5f5f5;
  color: #5f6be0;
  transform: scale(1.1);
}

.format-btn:active {
  background: #dee2e6;
  transform: scale(1.05);
}

.format-btn.active {
  color: var(--white);
  background-color: var(--primary-color);
}

.format-btn span {
  font-size: 14px;
  font-weight: 600;
}

.format-btn .fas {
  color: #495057;
  font-size: 18px;
}

/* Common divider */
.divider {
  width: 1px;
  height: 20px;
  background-color: #e0e0e0;
  margin: 0 4px;
}

.panel-header {
  padding: var(--spacing-4);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-4);
}

.empty-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-6);
  height: 100%;
  background: linear-gradient(135deg, #fafbff 0%, #f0f2ff 100%);
}

.panel-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #eef0ff, #d8dcff);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: var(--spacing-5);
  box-shadow: 0 4px 12px rgba(95, 107, 224, 0.2);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.panel-title-lg {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-3);
}

.panel-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-5);
  line-height: 1.5;
}

.wizard-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
  width: 100%;
  margin-bottom: var(--spacing-6);
  text-align: left;
}

.wizard-step {
  display: flex;
  gap: var(--spacing-3);
  align-items: flex-start;
}

.step-number {
  width: 28px;
  height: 28px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

/* Prompt badge styles */
.prompt-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: white;
  border-radius: 20px;
  color: #5f6be0;
  font-weight: 500;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-badge:hover {
  background-color: #eef0ff;
  border-color: #5f6be0;
  box-shadow: 0 2px 6px rgba(95, 107, 224, 0.2);
}

.prompt-badge:active {
  transform: scale(0.98);
}

.prompt-badge i {
  font-size: 16px;
}

/* Highlight styles */
.highlight-change {
  background-color: #fff4ef;
  border-bottom: 2px solid #fd7e55;
  padding: 0 2px;
  border-radius: 2px;
}

.highlight-add {
  background-color: #eef0ff;
  border-bottom: 2px solid #5f6be0;
  padding: 0 2px;
  border-radius: 2px;
}

/* Scrollbar styling (WebKit) */
.analysis-panel .panel-content::-webkit-scrollbar {
  width: 6px;
}

.analysis-panel .panel-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}

.analysis-panel .panel-content::-webkit-scrollbar-track {
  background: transparent;
}

/* Loader */
.loader {
  margin: 1rem auto;
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(0,0,0,0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Special translate button */
#translateBtn {
  padding: var(--spacing-3) var(--spacing-6);
  font-size: 18px;
}

#translateBtn i {
  font-size: 1.4em;
}

/* Content area ordering */
#contentArea {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.textarea-container {
  order: 1;
}

/* Toast notifications */
@keyframes notification-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes notification-slide-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .analysis-panel {
    display: none;
  }

  .actions {
    padding: var(--spacing-2) var(--spacing-3);
    gap: var(--spacing-3);
  }

  .user-info {
    display: none;
  }

  .btn {
    padding: var(--spacing-2) var(--spacing-4);
    font-size: 13px;
  }

  .dropdown-menu {
    min-width: 180px;
    right: -10px;
  }
}

@media (max-width: 480px) {
  .auth-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}