body {
  font-family: 'Inter', 'Open Sans', Arial, sans-serif;
  background: #f5f4e1;
  color: #222;
  margin: 0;
  padding: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 1em 2em;
  background: #eaf6e6;
  border-bottom: 1px solid #dbead3;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

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

.sign-out-container {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.5em;
}

/* Main navigation */
.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  padding-bottom: 0.5em;
  margin-left: auto;
  margin-right: 1.5rem;
}

.nav-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
  transition: all 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f3eac2;
  transition: width 0.2s ease;
}

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

/* Project title links - same hover effect as nav */
.project-title-link {
  color: #3a4d3f;
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
  text-shadow: 0 1px 2px rgba(58, 77, 63, 0.1);
  cursor: pointer;
}

.project-title-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f3eac2;
  transition: width 0.2s ease;
}

.project-title-link:hover::after {
  width: 100%;
}

.sign-out-button {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #4b5563;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.sign-out-button:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.sign-out-form {
  margin: 0;
  padding: 0;
  display: inline;
}

/* Auth Pages */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 100px);
  padding: 2rem;
}

.auth-form {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
  text-align: center;
  color: #2d3748;
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.auth-form .field {
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #4a5568;
  font-weight: 500;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.password-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Form field styles */
.name-fields {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.name-fields .half {
  flex: 1;
  min-width: 0; /* Prevents flex items from overflowing */
}

/* Make sure the form controls take full width */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .name-fields {
    flex-direction: column;
    gap: 1rem;
  }
  
  .name-fields .half {
    width: 100%;
  }
}

.remember-me {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
  margin-right: 0.5rem;
}

.remember-me-label {
  margin: 0;
  font-weight: normal;
  color: #4a5568;
}

.actions {
  margin-top: 2rem;
}

.actions input[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.actions input[type="submit"]:hover {
  background-color: #3b82f6;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
}

.auth-links a {
  color: #4a90e2;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.logo-img {
  max-height: 48px;
  margin-right: 1em;
}

.app-header h1 {
  font-size: 2em;
  color: #82a078;
  margin: 0;
}

.status-header {
  display: flex;
  align-items: center;
  padding: 1em 2em;
  background: #eaf6e6;
  border-bottom: 1px solid #dbead3;
}

.status-header h1 {
  font-size: 2em;
  color: #82a078;
  margin: 0;
}

.status-page-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.status-main {
  display: flex;
  flex: 1 1 auto;
  padding: 2em;
  gap: 2em;
}

.results-page-layout {
  width: 100%;
  min-height: 100vh;
  background: #f5f4e1;
  padding: 2em;
  box-sizing: border-box;
  position: relative;
}

.results-main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(600px, 45%) minmax(700px, 55%);
  gap: 2em;
  justify-content: center;
  position: relative;
}

.left-panel {
  background: #f5f4e1;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 1.5em;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.right-panel {
  background: #fffbe6;
  border-radius: 12px;
  box-shadow: 0 2px 8px #e0e0d0;
  padding: 1.5em;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.left-panel:hover, .right-panel:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.transcript-viewer {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  font-family: 'Open Sans', monospace, sans-serif;
  color: #3a4d3f;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid #e0e0d0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.panel-header {
  margin-bottom: 1.5rem;
}

.panel-header h2 {
  font-size: 1.5rem;
  color: #3a4d3f;
  margin: 0 0 0.5rem 0;
}

.language-info {
  font-size: 0.9rem;
  color: #666;
}

.button-container {
  margin-bottom: 1rem;
}

.btn {
  background: #82a078;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: #6b8a63;
}

.btn.hidden {
  display: none;
}

/* Export button specific styles */
.export-buttons {
  margin: 2rem 0;
}

.export-buttons h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 180px;
  min-height: 44px;
  padding: 12px 16px;
  background: #82a078;
  color: white;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-export:hover {
  background: #6b8a63;
  color: white;
  text-decoration: none;
}

.btn-export:disabled {
  background: #a0a0a0;
  cursor: not-allowed;
}

.btn-export[style*="pointer-events: none"] {
  cursor: not-allowed;
}

.btn-export .btn-content,
.btn-export .btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export .btn-loading {
  display: none;
}

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

.loading-spinner {
  animation: spin 1s linear infinite;
}

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

.tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  border-bottom: 1px solid #e0e0d0;
}

.tabs li {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tabs li:hover {
  border-bottom-color: #82a078;
}

.tabs li.active {
  border-bottom-color: #82a078;
  color: #82a078;
  font-weight: 500;
}

.tab-content {
  padding: 1rem 0;
}

.hidden {
  display: none;
}

/* Index Page Styles */
.index-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 80px);
  padding: 4rem;  /* top right bottom left */
  background-color: #f8f9fa;
}

.upload-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
}

.upload-section h2 {
  font-size: 1.6rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.upload-description {
  color: #666;
  font-size: 1rem;
}

.upload-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  max-width: 420px;
}

.upload-form .button-container {
  justify-content: flex-start;
  width: auto;
}

.file-input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.file-input {
  padding: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
}

.file-name {
  color: #666;
  font-size: 0.9rem;
}

.analyze-button {
  background-color: #3a4d3f;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 0;
}

.analyze-button:hover:not(:disabled) {
  background-color: #2c3a2f;
}

.analyze-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* File input styling */
input[type="file"] {
  position: relative;
  padding: 1rem;
  background-color: white;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

input[type="file"]:hover {
  border-color: #4285f4;
}

input[type="file"]::file-selector-button {
  background-color: #f8f9fa;
  color: #333;
  padding: 0.5rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 1rem;
  transition: background-color 0.2s;
}

input[type="file"]::file-selector-button:hover {
  background-color: #e8e8e8;
}

/* Project Selector Styles */
.project-selector-container {
  margin: 1.5rem 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.project-selector-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-label {
  display: flex;
  align-items: center;
  color: #374151;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0;
  white-space: nowrap;
  min-width: fit-content;
}

.project-select-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.project-select-enhanced {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-weight: 500;
}

.project-select-enhanced:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.project-select-enhanced:hover {
  border-color: #9ca3af;
}

.project-select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
  transition: color 0.2s ease;
}

.project-select-enhanced:focus + .project-select-arrow {
  color: #3b82f6;
}

/* Legacy project select styles for backward compatibility */
.project-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.project-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.project-select:hover {
  border-color: #9ca3af;
}

/* Project Navigation Button Styles */
.project-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: white;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.project-nav-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #1f2937;
}

.project-nav-btn-primary {
  background-color: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.project-nav-btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  color: white;
}

.project-nav-btn-new {
  background-color: #10b981;
  border-color: #10b981;
  color: white;
}

.project-nav-btn-new:hover {
  background-color: #059669;
  border-color: #059669;
  color: white;
}

.project-nav-btn-more {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.project-nav-btn-more:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
  color: #374151;
}

.project-count {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: normal;
}

/* Enhanced New Project Button */
.new-project-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.new-project-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
  color: white;
  text-decoration: none;
}

.new-project-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* More Prominent New Project Button */
.new-project-btn-prominent {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: 2px solid #047857;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.new-project-btn-prominent:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
  color: white;
  text-decoration: none;
  border-color: #065f46;
}

.new-project-btn-prominent:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* New Project Button - Similar to Analyze Now */
.new-project-button {
  display: inline-flex;
  align-items: center;
  background-color: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.new-project-button:hover {
  background-color: #059669;
  color: white;
  text-decoration: none;
}

.new-project-button:active {
  background-color: #047857;
}

/* Processing Status Styles */
.processing-status {
  padding: 2rem;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0d0;
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar-fill {
  width: 100%;
  height: 100%;
  background: #82a078;
  animation: progress 2s ease-in-out infinite;
  transform-origin: 0% 50%;
}

@keyframes progress {
  0% {
    transform: scaleX(0);
  }
  50% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

.step-indicators {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #666;
}

.step.completed {
  color: #82a078;
}

.step.in-progress {
  color: #3a4d3f;
}

.step-icon {
  font-size: 1.2rem;
  width: 1.5rem;
  text-align: center;
}

.step-text {
  font-size: 1rem;
}

.processing-tip {
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
}

/* Debug styles removed */

/* Grid debugging text hiding removed to prevent CSS issues */

.results-columns {
  display: grid;
  grid-template-columns: 600px 700px;
  gap: 2.5rem;
  min-width: 1300px;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1rem;
  overflow-x: auto;
  background: #ffeedd !important; /* debug color */
  border: 2px solid red !important; /* debug border */
}

.results-left, .results-right {
  background: #f8f8e8;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  min-width: 340px;
}

.results-left {
  border: 1.5px solid #e0e0d0;
}

.results-right {
  border: 1.5px solid #f3eac2;
}

.panel-header {
  background: #eaf6e6;
  border-radius: 12px 12px 0 0;
  padding: 1.2rem 1rem 1rem 1rem;
  margin: -2rem -1.5rem 1.5rem -1.5rem;
}

.panel-header h2 {
  font-size: 2rem;
  color: #7ca16c;
  margin: 0;
  font-weight: 600;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.02em;
}

.language-info {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #5a6b4d;
  font-weight: 500;
  border-left: 4px solid #b7d7b0;
}

.transcript-viewer {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 1.5rem;
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #3a4d3f;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid #e0e0d0;
  border-left: 4px solid #b7d7b0;
  line-height: 1.6;
  font-size: 1.1rem;
}

/* Responsive layout fixes */
/* Use auto-fit / minmax to maintain two columns until panels reach 360px */
.results-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2em;
  transition: all 0.3s ease;
}

/* Only stack vertically on very narrow viewports */
@media (max-width: 600px) {
  .results-main {
    flex-direction: column;
  }
}

.left-panel,
.right-panel {
  min-width: 360px;
}

/* Notification system */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
}

.notification-success {
  background-color: #10b981;
}

.notification-error {
  background-color: #ef4444;
}

.notification-info {
  background-color: #3b82f6;
}

.notification-warning {
  background-color: #f59e0b;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}