/* Custom University Theme - Distinctive & Professional */

:root {
  /* Unique Color Palette - Academic Blue & Warm Accents */
  /* --primary: #2563eb;

  --accent: #f59e0b;

  --success: #059669;
  --warm: #dc2626; */
 --primary: #FF6B6B;      /* Coral - Emotional */
  --secondary: #4ECDC4;    /* Teal - Tech */
  --accent: #A78BFA;       /* Purple - Innovation */
  --success: #51CF66;      /* Green - Health */
  --warning: #FFB84D;      /* Orange - Education */
 --primary-dark: #1e40af;
   --primary-light: #3b82f6;
     --accent-dark: #d97706;

  --gradient-kislab: linear-gradient(120deg, #FF6B6B 0%, #4ECDC4 50%, #A78BFA 100%);

  /* Neutrals with warmer tone */
  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Custom gradients - less "startup-y" */
  --gradient-primary: linear-gradient(120deg, #2563eb 0%, #1e40af 100%);
  --gradient-warm: linear-gradient(120deg, #f59e0b 0%, #dc2626 100%);
  --gradient-success: linear-gradient(120deg, #059669 0%, #2563eb 100%);

  /* Shadows - softer */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border radius - more subtle */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

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

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: #ffffff;
  background-image:
    radial-gradient(at 20% 20%, rgba(37, 99, 235, 0.03) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(245, 158, 11, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================
   Header - More Academic Look
   ========================================== */
.header {
  background: linear-gradient(to bottom, #ffffff 0%, #fafaf9 100%);
  border-bottom: 2px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.logo-icon {
  font-size: 2.25rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.logo-text h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.025em;
}

.tagline {
  font-size: 0.8125rem;
  color: var(--gray-600);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  font-size: 0.9375rem;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--gray-50);
  border-color: var(--gray-200);
}

/* ==========================================
   Hero Section - Less "Startup-y"
   ========================================== */
.hero {
  padding: 2.5rem 0 3rem;
  background: linear-gradient(to bottom, transparent 0%, var(--gray-50) 100%);
}

.hero-content {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.gradient-text {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.gradient-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-warm);
  border-radius: 2px;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--gray-600);
  max-width: 1000px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

/* ==========================================
   Search Container - More Professional
   ========================================== */
.search-container {
  max-width: 860px;
  margin: 0 auto;
}

.search-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  display: flex;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  border: 2px solid var(--gray-200);
  transition: all 0.25s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-lg);
}

.search-icon {
  font-size: 1.375rem;
  padding-top: 0.375rem;
  color: var(--gray-400);
}

.search-box textarea {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.0625rem;
  font-family: inherit;
  resize: none;
  line-height: 1.6;
  color: var(--gray-900);
}

.search-box textarea::placeholder {
  color: var(--gray-400);
}

.search-button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
  font-family: inherit;
  letter-spacing: 0.01em;
}

.search-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.search-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#searchButton {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   Example Chips - More Subtle
   ========================================== */
.search-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.examples-label {
  color: var(--gray-600);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: white;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 500;
  color: var(--gray-700);
}

.chip:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   Loading State
   ========================================== */
.loading-state {
  padding: 3rem 0;
}

.loading-content {
  text-align: center;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

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

.loading-text {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.loading-subtext {
  color: var(--gray-500);
  font-size: 0.9375rem;
}

/* ==========================================
   AI Explanation - More Academic
   ========================================== */
.explanation-section {
  padding: 2rem 0;
  animation: fadeIn 0.4s ease-out;
}

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

.explanation-card {
  background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ai-icon {
  font-size: 1.125rem;
}

.explanation-header h3 {
  font-size: 1.375rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
  font-weight: 700;
}

.explanation-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-800);
  white-space: pre-wrap;
}

/* ==========================================
   Results Section
   ========================================== */
.results-section {
  padding: 2rem 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

.results-header h3 {
  font-size: 1.625rem;
  color: var(--gray-900);
  font-weight: 700;
}

.results-count {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

.results-count span {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.375rem;
}

.results-grid {
  display: grid;
  gap: 1.5rem;
}

/* ==========================================
   Thesis Card - More Professional
   ========================================== */
.thesis-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
  border: 2px solid var(--gray-200);
  animation: slideUp 0.4s ease-out both;
}

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

.thesis-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}

.thesis-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.thesis-rank {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.similarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--success);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.thesis-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0;
  line-height: 1.4;
  color: var(--gray-900);
  cursor: pointer;
  transition: color 0.2s;
}

.thesis-title:hover {
  color: var(--primary);
}

.thesis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.125rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.thesis-abstract {
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.thesis-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.keyword-tag {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--gray-200);
  font-weight: 500;
}

.keyword-tag:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.view-pdf-button {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.view-pdf-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
  padding: 3rem 0;
}

.empty-content {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.25rem;
  opacity: 0.25;
}

.empty-content h3 {
  font-size: 1.375rem;
  margin-bottom: 0.625rem;
  color: var(--gray-800);
  font-weight: 700;
}

.empty-content p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.secondary-button {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================
   Initial State - More Academic
   ========================================== */
.initial-state {
  padding: 2.5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background: white;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.25s;
  text-align: center;
  border: 2px solid var(--gray-200);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.625rem;
  color: var(--gray-900);
  font-weight: 700;
}

.feature-card p {
  color: var(--gray-600);
  line-height: 1.6;
  font-size: 0.875rem;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  background: linear-gradient(to top, var(--gray-900) 0%, var(--gray-800) 100%);
  color: var(--gray-300);
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 3px solid var(--primary);
}

.footer-content {
  text-align: center;
  font-size: 0.875rem;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.875rem;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
  }

  .search-button {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    margin: 0 auto;
  }

  .button-text {
    display: none;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .nav-link {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .thesis-card {
    padding: 1.25rem;
  }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
  .header,
  .footer,
  .search-container,
  .nav {
    display: none;
  }

  .thesis-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}



/* Search Quality Indicator */
.search-quality-indicator {
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease-out;
}

.search-quality-indicator.quality-excellent {
  border-color: var(--success);
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.search-quality-indicator.quality-good {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.search-quality-indicator.quality-moderate {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.search-quality-indicator.quality-low,
.search-quality-indicator.quality-very-low {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.quality-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.quality-icon {
  font-size: 1.5rem;
}

.quality-message {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--gray-900);
}

.quality-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
}

.quality-stats strong {
  color: var(--gray-900);
  font-weight: 700;
}

.stats-separator {
  color: var(--gray-400);
}

.quality-advice {
  font-size: 0.875rem;
  color: var(--gray-700);
  font-style: italic;
  margin-top: 0.5rem;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.query-enhancement {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.625rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  margin: 0.625rem 0;
  border: 1px dashed var(--gray-300);
}

.query-enhancement strong {
  color: var(--primary);
}

/* Enhanced Similarity Badges */
.similarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.similarity-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.similarity-badge.quality-excellent {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.similarity-badge.quality-good {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.similarity-badge.quality-moderate {
  background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
}

.similarity-badge.quality-low {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.badge-icon {
  font-size: 1rem;
}

.badge-label {
  font-weight: 600;
}

.similarity-percent {
  font-weight: 700;
  margin-left: 0.25rem;
}

/* Relevance-Focused Abstract */
.thesis-abstract-wrapper {
  margin-bottom: 1.25rem;
}

.abstract-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.625rem;
}

.thesis-abstract {
  color: var(--gray-700);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.thesis-abstract.relevance-abstract {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 3px solid var(--primary);
  font-weight: 500;
  color: var(--gray-800);
}

/* Matched Keywords Highlight */
.keyword-tag {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--gray-200);
  font-weight: 500;
}

.keyword-tag:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.keyword-tag.keyword-match {
  background: linear-gradient(135deg, var(--primary) 0%, #e55a5a 100%);
  color: white;
  font-weight: 700;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.keyword-tag.keyword-match:hover {
  background: linear-gradient(135deg, #e55a5a 0%, var(--primary) 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(255, 107, 107, 0.5);
  }
}

/* Enhanced Thesis Cards for Different Quality Levels */
.thesis-card[data-quality="excellent"] {
  border-color: var(--success);
  box-shadow: 0 4px 12px rgba(81, 207, 102, 0.15);
}

.thesis-card[data-quality="good"] {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.thesis-card[data-quality="moderate"] {
  border-color: var(--warning);
  box-shadow: 0 4px 12px rgba(251, 184, 77, 0.15);
}

.thesis-card[data-quality="low"] {
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
  opacity: 0.92;
}

/* Loading State Enhancement */
.loading-state {
  padding: 3rem 0;
  animation: fadeIn 0.3s ease-out;
}

.loading-content {
  text-align: center;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

.loading-subtext {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Explanation Section Enhancement */
.explanation-card {
  background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
  border: 2px solid #bfdbfe;
  border-radius: 0.875rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.explanation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.explanation-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-800);
  white-space: pre-wrap;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .search-quality-indicator {
    padding: 1rem;
  }

  .quality-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .stats-separator {
    display: none;
  }

  .similarity-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }

  .badge-label {
    display: none;
  }

  .quality-message {
    font-size: 0.9375rem;
  }

  .thesis-abstract.relevance-abstract {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
}

/* Animation Improvements */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Print Styles */
@media print {
  .search-quality-indicator,
  .abstract-label,
  .keyword-tag.keyword-match {
    background: white !important;
    border: 1px solid black;
  }

  .similarity-badge {
    background: white !important;
    color: black !important;
    border: 1px solid black;
  }
}

.quick-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.chatbot-btn:hover {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border-color: transparent;
}

.btn-icon {
  font-size: 1.5rem;
}

.btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-text strong {
  font-size: 0.9375rem;
  color: #2d3748;
}

.btn-text small {
  font-size: 0.75rem;
  color: #718096;
}

.chatbot-btn:hover .btn-text strong,
.chatbot-btn:hover .btn-text small {
  color: white;
}

.btn-chat-thesis {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-chat-thesis:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

.empty-suggestions {
  background: #f7fafc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  text-align: left;
  max-width: 500px;
}

.empty-suggestions h4 {
  margin-bottom: 0.75rem;
  color: #2d3748;
}

.empty-suggestions ul {
  list-style: none;
  padding: 0;
}

.empty-suggestions li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.empty-suggestions li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

.empty-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  /* Larger tap targets */
  .search-button {
    min-height: 48px;
    font-size: 1rem;
  }

  /* Stack action buttons vertically */
  .card-actions {
    flex-direction: column;
  }

  .card-actions button {
    width: 100%;
  }

  /* Simpler stats banner */
  .stats-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Hide keyboard hints on mobile */
  .keyboard-hints {
    display: none;
  }

  /* Bigger search chips */
  .research-chip {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #2d3748;
}

.section-subtitle {
  text-align: center;
  color: #718096;
  margin-bottom: 2rem;
}

.research-clickable {
  cursor: pointer;
  border: 2px solid #e2e8f0;
  background: white;
  text-align: left;
  transition: all 0.3s ease;
  width: 100%;
}

.research-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.research-clickable:active {
  transform: translateY(-2px);
}

