/* Root palette - Enhanced with modern gradients and improved contrast */
:root {
  --rutgers-red: #cc0033;
  --rutgers-red-gradient: linear-gradient(135deg, #cc0033 0%, #e6002e 100%);
  --rutgers-dark: #1a1a1a;
  --rutgers-dark-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  --rutgers-light: #ffffff;
  --rutgers-gray: #6b7280;
  --rutgers-red-50: #fef2f2;
  --rutgers-red-100: #fee2e2;
  --rutgers-red-200: #fecaca;
  --rutgers-red-300: #fca5a5;
  --rutgers-red-400: #f87171;
  --rutgers-red-500: #ef4444;
  --rutgers-red-600: #dc2626;
  --rutgers-red-700: #b91c1c;
  --rutgers-red-800: #991b1b;
  --rutgers-red-900: #7f1d1d;
  
  /* Modern color additions */
  --surface-primary: #ffffff;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
  background: linear-gradient(135deg, var(--rutgers-red-50) 0%, var(--surface-secondary) 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.header {
  background: var(--rutgers-red);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 1rem 0 1rem 0;
}

.header-logo {
  height: 80px;
  width: auto;
  margin-left: 1.5rem;
  margin-right: 2rem;
  display: inline-block;
  vertical-align: middle;
}

.header-text {
  text-align: right;
  width: 100%;
  padding-right: 2.5rem;
}

.header-text .subtitle {
  font-size: 1rem;
}

.header-text .title {
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.1;
}
@media (min-width: 768px) {
  .header-text .title {
    font-size: 2rem;
  }
}

.navbar {
  background: var(--rutgers-dark-gradient);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 10;
}

.navbar-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  list-style: none;
  margin: 0;
}

.navbar-link {
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: block;
  position: relative;
  letter-spacing: 0.3px;
}

.navbar-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--rutgers-red-gradient);
  border-radius: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.navbar-link:hover::before,
.navbar-link.active::before {
  opacity: 1;
}

.navbar-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(204, 0, 51, 0.3);
}

/* Navbar Dropdown Styles */
.navbar-dropdown {
  position: relative;
}

.navbar-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-dropdown-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.navbar-dropdown:hover .navbar-dropdown-icon {
  transform: rotate(180deg);
}

.navbar-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-primary);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  list-style: none;
  margin: 0;
  padding: 0.75rem 0;
  border: 1px solid var(--border-light);
}

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

.navbar-dropdown-link {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  margin: 0 0.5rem;
}

.navbar-dropdown-link:hover {
  background: var(--rutgers-red-50);
  color: var(--rutgers-red-700);
  transform: translateX(4px);
}

.main-content {
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* AI Articles Section Styles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.article-card {
  background: var(--surface-primary);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-light);
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rutgers-red-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.article-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .article-img {
  transform: scale(1.05);
}


.article-content {
  padding: 1.75rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.article-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.article-date {
  font-weight: 600;
}

.article-source {
  font-style: italic;
  font-weight: 500;
}

.article-link {
  display: inline-flex;
  align-items: center;
  color: var(--rutgers-red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--rutgers-red-50);
}

.article-link:hover {
  color: var(--rutgers-red-700);
  background: var(--rutgers-red-100);
  transform: translateX(2px);
}

.section-card {
  background: var(--surface-primary);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rutgers-red-gradient);
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.section-title {
  color: var(--rutgers-red);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  line-height: 1.2;
  background: var(--rutgers-red-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .section-title {
    font-size: 1.5rem;
  }
}

.chart-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem auto;
  height: 250px;
  max-height: 300px;
}
@media (min-width: 768px) {
  .chart-container {
    height: 300px;
    max-height: 350px;
  }
}

.bg-red-200 { background: var(--rutgers-red-200); }
.bg-red-50 { background: #fff5f5; }
.border-red-200 { border-color: var(--rutgers-red-200); }
.text-red-700 { color: var(--rutgers-red-700); }
.text-red-900 { color: var(--rutgers-red-900); }

.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.shadow-lg { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-12 > * + * { margin-top: 3rem; }

.text-center { text-align: center; }
.text-sm { font-size: 0.95rem; }
.text-lg { font-size: 1.15rem; }
.text-xs { font-size: 0.8rem; }
.font-bold { font-weight: bold; }
.font-semibold { font-weight: 600; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }

.max-w-3xl { max-width: 700px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.border { border: 1px solid #eee; }
.border-l-4 { border-left: 4px solid var(--rutgers-red-500); }

.cursor-pointer { cursor: pointer; }
.overflow-x-auto { overflow-x: auto; }

/* Footer - Enhanced */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-light);
  background: var(--surface-secondary);
  color: var(--text-tertiary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--rutgers-red-gradient);
  border-radius: 0 0 1.5px 1.5px;
}

/* Sidebar Navigation - Enhanced */
.sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--rutgers-dark-gradient);
  border-radius: 1.25rem 0 0 1.25rem;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.sidebar:hover {
  width: 220px;
  box-shadow: var(--shadow-xl);
}

.sidebar-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  width: 100%;
  transition: all 0.3s ease;
}

.sidebar-trigger:hover {
  background: rgba(255,255,255,0.05);
}

.sidebar-line {
  width: 18px;
  height: 2px;
  background: #fff;
  margin: 2px 0;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.sidebar:hover .sidebar-line {
  width: 14px;
}

.sidebar-nav {
  padding: 0.75rem 0;
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  border-right: 3px solid transparent;
  white-space: nowrap;
  position: relative;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--rutgers-red-gradient);
  transition: width 0.3s ease;
}

.sidebar-link:hover::before,
.sidebar-link.active::before {
  width: 4px;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.1);
  border-right-color: var(--rutgers-red);
  transform: translateX(4px);
}

.sidebar-link.active {
  background: rgba(255,255,255,0.1);
  border-right-color: var(--rutgers-red);
}

.sidebar-line-item {
  width: 14px;
  height: 1px;
  background: #fff;
  margin-right: 0.875rem;
  min-width: 14px;
  transition: all 0.3s ease;
}

.sidebar-link:hover .sidebar-line-item,
.sidebar-link.active .sidebar-line-item {
  width: 18px;
  height: 2px;
}

.sidebar-text {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.sidebar:hover .sidebar-text {
  opacity: 1;
  transform: translateX(0);
}

/* Adjust main content to accommodate sidebar */
@media (min-width: 768px) {
  .main-content {
    margin: 0 auto;
    max-width: 900px;
  }
}

@media (max-width: 767px) {
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin: 0 auto;
  }
}

/* Responsive grid for cards */
@media (min-width: 768px) {
  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
  }
  .lg-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Ensure grid items don't overflow */
.grid > * {
  min-width: 0;
  max-width: 100%;
}

/* Button styles - Enhanced */
.button, button {
  background: var(--rutgers-red-gradient);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.button::before, button::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 ease;
}

.button:hover::before, button:hover::before {
  left: 100%;
}

.button:hover, button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button:active, button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

/* Tab styles - Enhanced */
.tab-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.tab-button::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--rutgers-red-gradient);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-button.active, .tab-button[aria-selected="true"] {
  color: var(--rutgers-red);
  font-weight: 700;
}

.tab-button.active::before, .tab-button[aria-selected="true"]::before {
  width: 100%;
}

.tab-button:hover {
  color: var(--rutgers-red-700);
  background: var(--rutgers-red-50);
  border-radius: 0.5rem 0.5rem 0 0;
}

/* Misc */
.whitespace-pre-wrap { white-space: pre-wrap; }
.overflow-y-auto { overflow-y: auto; }
.h-48 { height: 12rem; }
.h-full { height: 100%; }
.w-full { width: 100%; }

/* Hide scrollbars for nav on mobile */
@media (max-width: 600px) {
  .navbar-list {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

.crpa-step {
  margin-bottom: 0.75rem;
  width: 100%;
  display: block;
}
.crpa-step:last-child {
  margin-bottom: 0;
}

.ai-guideline-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ai-guideline-header .emoji {
  font-size: 2rem;
  line-height: 1;
}

.tab-content-wrapper {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 600px) {
  .tab-content-wrapper {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.tab-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 900px) {
  .tab-content-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* --- CRAFT Framework Button Spacing --- */
.craft-step {
  margin-bottom: 1.25rem !important;
  padding: 1.25rem 2rem !important;
  font-size: 1.1rem;
  border-radius: 1.25rem !important;
}
.craft-step:last-child {
  margin-bottom: 0 !important;
}

#prompt-output {
  min-height: 30rem !important;
  padding: 2rem 2.5rem !important;
  margin-top: 1.5rem !important;
  font-size: 1rem;
  border-radius: 1.25rem !important;
  overflow-y: auto !important;
}

#craft-container {
  margin-bottom: 2.5rem !important;
}

#reset-prompt {
  margin-top: 1rem !important;
  padding: 0.5rem 1.5rem !important;
  font-size: 1rem !important;
  border-radius: 1rem !important;
  background: var(--rutgers-red-100) !important;
  color: var(--rutgers-red-700) !important;
  border: 1.5px solid var(--rutgers-red-200) !important;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
#reset-prompt:hover {
  background: var(--rutgers-red-200) !important;
  color: var(--rutgers-red-900) !important;
  border-color: var(--rutgers-red-500) !important;
}

/* Form styles - Enhanced */
input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 0.75rem;
  background: var(--surface-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rutgers-red);
  box-shadow: 0 0 0 3px rgba(204, 0, 51, 0.1), var(--shadow-md);
  transform: translateY(-1px);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

/* Copy button styles */
.copy-template-btn {
  transition: all 0.2s ease;
}

.copy-template-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Fix text selection highlighting issue and ensure consistent text box widths */
/* Use block layout and full width for consistent text box sizing */

.bg-red-200.border-l-4.p-6 {
  display: block;
  width: 100%;
  max-width: 100%;
}

/* Apply consistent width to all text boxes, but exclude buttons */
.bg-red-50.p-4:not(button),
.bg-red-50.p-6:not(button),
.bg-red-100.p-4:not(button),
.bg-red-100.p-6:not(button) {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure grid items maintain consistent widths, but exclude buttons */
.grid .bg-red-50:not(button),
.grid .bg-red-100:not(button),
.grid .bg-red-200:not(button) {
  display: block !important;
  width: 100% !important;
  min-height: 250px; /* Set minimum height for consistency */
  box-sizing: border-box;
}

/* Form elements should be contained */
.section-card input,
.section-card textarea,
.section-card select {
  width: 100%;
  max-width: 100%;
}

/* Additional rules for consistent text box alignment, but exclude buttons */
.bg-red-50.border:not(button),
.bg-red-100.border:not(button),
.bg-red-200.border:not(button) {
  width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* Ensure consistent spacing and alignment in grid layouts, but exclude buttons */
.grid > .bg-red-50:not(button),
.grid > .bg-red-100:not(button),
.grid > .bg-red-200:not(button) {
  height: auto;
  min-height: 280px; /* Ensure consistent minimum height */
  display: flex;
  flex-direction: column;
}

/* Make content within text boxes fill available space properly, but exclude buttons */
.bg-red-50.border:not(button) .space-y-4,
.bg-red-100.border:not(button) .space-y-4,
.bg-red-200.border:not(button) .space-y-4 {
  flex: 1;
}

/* Resizable textareas for Practice Exercise */
.practice-textarea {
  min-height: 60px;
  max-height: 300px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.practice-textarea:focus {
  outline: none;
  border-color: var(--rutgers-red-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Feedback form message boxes */
#feedback-success.hidden,
#feedback-error.hidden {
  display: none !important;
}

/* Popup animation for feedback messages */
.feedback-popup {
  animation: slideInUp 0.3s ease-out;
  transform-origin: bottom center;
}

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

.practice-textarea::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Search Hub Styles - Enhanced */
.search-hub-container {
  max-width: 800px;
  margin: 0 auto;
}

.search-hub-wrapper {
  display: flex;
  align-items: center;
  background: var(--surface-primary);
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.search-hub-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(204, 0, 51, 0.05), transparent);
  transition: left 0.5s ease;
}

.search-hub-wrapper:focus-within {
  border-color: var(--rutgers-red);
  box-shadow: 0 0 0 3px rgba(204, 0, 51, 0.1), var(--shadow-lg);
  transform: translateY(-1px);
}

.search-hub-wrapper:focus-within::before {
  left: 100%;
}

.main-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.125rem;
  padding: 0.875rem 1rem;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
}

.main-search-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.main-search-btn {
  background: var(--rutgers-red-gradient);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.main-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.clear-main-search-btn {
  background: var(--text-tertiary);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-left: 0.75rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.clear-main-search-btn:hover {
  background: var(--text-secondary);
  transform: translateY(-1px);
}

/* Search Suggestions */
.search-suggestions-container {
  margin-top: 16px;
  background: white;
  border: 1px solid var(--rutgers-red-200);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.suggestions-header h4 {
  margin: 0 0 12px 0;
  color: var(--rutgers-red-700);
  font-size: 14px;
  font-weight: 600;
}

.suggestions-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.suggestion-item {
  background: var(--rutgers-red-100);
  border: 1px solid var(--rutgers-red-200);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  text-align: left;
}

.suggestion-item:hover {
  background: var(--rutgers-red-200);
  border-color: var(--rutgers-red);
}

/* Category Filters - Enhanced */
.category-filters {
  margin-top: 2rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.category-filter-btn {
  background: var(--surface-primary);
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.category-filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--rutgers-red-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-filter-btn:hover {
  border-color: var(--rutgers-red);
  background: var(--rutgers-red-50);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.category-filter-btn:hover::before {
  opacity: 0.05;
}

.filter-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.category-filter-btn:hover .filter-icon {
  transform: scale(1.1);
}

.filter-text {
  font-weight: 600;
  color: var(--rutgers-red-700);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
}

/* Search Results */
.search-results-container {
  margin-top: 32px;
  background: white;
  border: 1px solid var(--rutgers-red-200);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rutgers-red-200);
}

.results-header h3 {
  margin: 0;
  color: var(--rutgers-red-700);
  font-size: 18px;
}

.results-count {
  color: var(--rutgers-red-500);
  font-size: 14px;
  font-weight: 500;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-result-item {
  background: var(--rutgers-red-100);
  border: 1px solid var(--rutgers-red-200);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result-item:hover {
  background: white;
  border-color: var(--rutgers-red);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.search-result-title {
  font-weight: 600;
  color: var(--rutgers-red-700);
  margin-bottom: 8px;
  font-size: 16px;
}

.search-result-content {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.search-result-meta {
  font-size: 12px;
  color: #9ca3af;
}

.search-highlight {
  background: #fef3c7;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* Recent Searches */
.recent-searches-container {
  margin-top: 24px;
  padding: 16px;
  background: var(--rutgers-red-100);
  border-radius: 8px;
}

.recent-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-search-item {
  background: white;
  border: 1px solid var(--rutgers-red-200);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.recent-search-item:hover {
  background: var(--rutgers-red-200);
  border-color: var(--rutgers-red);
}

/* Quick Navigation */
.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.quick-nav-card {
  background: white;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  text-align: center;
}

.quick-nav-card:hover {
  border-color: var(--rutgers-red);
  background: var(--rutgers-red-100);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.nav-card-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.nav-card-title {
  font-weight: 600;
  color: var(--rutgers-red-700);
  margin-bottom: 8px;
  font-size: 16px;
}

.nav-card-desc {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
}

/* Search Results Styles */
.search-results-container {
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  border: 2px solid var(--rutgers-red-200);
  overflow: hidden;
}

.results-header {
  background: var(--rutgers-red-100);
  padding: 16px 20px;
  border-bottom: 1px solid var(--rutgers-red-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-header h3 {
  margin: 0;
  color: var(--rutgers-red-700);
  font-size: 18px;
}

.results-count {
  color: var(--rutgers-red-600);
  font-size: 14px;
  font-weight: 500;
}

.results-list {
  max-height: 400px;
  overflow-y: auto;
}

.search-result-item {
  padding: 20px;
  border-bottom: 1px solid var(--rutgers-red-100);
  transition: background-color 0.2s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--rutgers-red-50);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.result-title {
  margin: 0;
  color: var(--rutgers-red-700);
  font-size: 16px;
  font-weight: 600;
}

.result-page {
  background: var(--rutgers-red-200);
  color: var(--rutgers-red-800);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.result-content {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.search-highlight {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.result-action-btn {
  background: var(--rutgers-red);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.result-action-btn:hover {
  background: var(--rutgers-red-700);
}

.no-results {
  padding: 40px 20px;
  text-align: center;
}

/* Recent Searches Styles */
.recent-searches-container {
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  border: 2px solid var(--rutgers-red-200);
  padding: 16px;
}

.recent-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.recent-search-item {
  background: var(--rutgers-red-100);
  border: 1px solid var(--rutgers-red-200);
  color: var(--rutgers-red-700);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.recent-search-item:hover {
  background: var(--rutgers-red-200);
  border-color: var(--rutgers-red);
}

/* Template Warehouse Styles */
.template-search-container {
  max-width: 800px;
  margin: 0 auto;
}

.template-search-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.template-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.template-search-input:focus {
  outline: none;
  border-color: var(--rutgers-red);
}

.template-search-btn {
  background: var(--rutgers-red);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.template-search-btn:hover {
  background: var(--rutgers-red-700);
}

.clear-template-search-btn {
  background: #6b7280;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.clear-template-search-btn:hover {
  background: #4b5563;
}

.template-search-results {
  background: white;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 12px;
  overflow: hidden;
}

.template-results-header {
  background: var(--rutgers-red-100);
  padding: 16px 20px;
  border-bottom: 1px solid var(--rutgers-red-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-results-header h3 {
  margin: 0;
  color: var(--rutgers-red-700);
  font-size: 18px;
}

.template-results-count {
  color: var(--rutgers-red-600);
  font-size: 14px;
  font-weight: 500;
}

.template-results-list {
  max-height: 400px;
  overflow-y: auto;
}

/* Template Categories */
.template-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.template-category-card {
  background: white;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.template-category-card:hover {
  border-color: var(--rutgers-red);
  background: var(--rutgers-red-100);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.category-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.category-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--rutgers-red-700);
  margin-bottom: 12px;
}

.category-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.category-count {
  background: var(--rutgers-red-200);
  color: var(--rutgers-red-800);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

/* Template Library */
.template-library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.template-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 2px solid var(--rutgers-red-200);
  color: var(--rutgers-red-700);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--rutgers-red);
  background: var(--rutgers-red-100);
}

.filter-btn.active {
  background: var(--rutgers-red);
  color: white;
  border-color: var(--rutgers-red);
}

.template-sort-select {
  padding: 8px 12px;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 8px;
  background: white;
  color: var(--rutgers-red-700);
  font-size: 14px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.template-card {
  background: var(--surface-primary);
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rutgers-red-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-card:hover {
  border-color: var(--rutgers-red);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

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

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.template-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--rutgers-red-700);
  margin: 0;
  flex: 1;
}

.template-card-category {
  background: var(--rutgers-red-200);
  color: var(--rutgers-red-800);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 12px;
}

.template-card-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.template-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.template-tag {
  background: var(--rutgers-red-100);
  color: var(--rutgers-red-700);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.template-card-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.template-action-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.template-action-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 ease;
}

.template-action-btn:hover::before {
  left: 100%;
}

.template-action-btn.primary {
  background: var(--rutgers-red-gradient);
  color: white;
  box-shadow: var(--shadow-sm);
}

.template-action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.template-action-btn.secondary {
  background: var(--surface-primary);
  color: var(--rutgers-red-700);
  border: 2px solid var(--border-light);
}

.template-action-btn.secondary:hover {
  background: var(--rutgers-red-50);
  border-color: var(--rutgers-red);
  transform: translateY(-1px);
}

.template-action-btn.danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.template-action-btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.template-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.template-popularity {
  font-weight: 500;
}

/* Create Template Form */
.create-template-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--rutgers-red-700);
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--rutgers-red);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.template-content-textarea {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
}

.form-help {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-outline {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--rutgers-red);
  color: white;
}

.btn-primary:hover {
  background: var(--rutgers-red-700);
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-outline {
  background: white;
  color: var(--rutgers-red-700);
  border: 2px solid var(--rutgers-red-200);
}

.btn-outline:hover {
  background: var(--rutgers-red-100);
  border-color: var(--rutgers-red);
}

/* Template Preview */
.template-preview {
  margin-top: 24px;
  background: white;
  border: 2px solid var(--rutgers-red-200);
  border-radius: 12px;
  padding: 24px;
}

.template-preview h3 {
  margin-top: 0;
  color: var(--rutgers-red-700);
}

.preview-template-info {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rutgers-red-200);
}

.preview-template-info h4 {
  margin: 0 0 8px 0;
  color: var(--rutgers-red-700);
}

.preview-category {
  color: var(--rutgers-red-600);
  font-size: 14px;
  margin-bottom: 8px;
}

.preview-description {
  color: #6b7280;
  font-size: 14px;
}

.preview-template-content h5 {
  color: var(--rutgers-red-700);
  margin-bottom: 12px;
}

.preview-content-text {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.preview-template-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

/* My Templates */
.my-templates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.my-templates-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

.my-templates-actions {
  display: flex;
  gap: 12px;
}

.my-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.no-templates {
  text-align: center;
  padding: 60px 20px;
}

.no-templates-content {
  max-width: 400px;
  margin: 0 auto;
}

.no-templates-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.no-templates-content h3 {
  color: var(--rutgers-red-700);
  margin-bottom: 12px;
}

.no-templates-content p {
  color: #6b7280;
  margin-bottom: 24px;
}

/* Notifications - Enhanced */
.notification {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  z-index: 1000;
  animation: notificationSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.notification-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Additional Utility Classes */
.text-gradient {
  background: var(--rutgers-red-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(204, 0, 51, 0.3);
}

.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface-primary), var(--surface-primary)) padding-box,
              var(--rutgers-red-gradient) border-box;
}

.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(204, 0, 51, 0.1);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Mobile Responsive Updates - Enhanced */
@media (max-width: 768px) {
  .main-content {
    padding: 1.5rem 0.75rem;
  }
  
  .section-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
  }
  
  .search-hub-wrapper {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .main-search-input {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem;
  }
  
  .main-search-btn {
    width: 100%;
    margin-left: 0;
    padding: 0.75rem 1rem;
  }
  
  .clear-main-search-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .category-filter-btn {
    padding: 1.25rem 1rem;
  }
  
  .filter-icon {
    font-size: 2rem;
  }
  
  .quick-nav-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .suggestions-list {
    grid-template-columns: 1fr;
  }
  
  /* Mobile navbar dropdown adjustments */
  .navbar-dropdown-menu {
    min-width: 200px;
    left: -50px;
    border-radius: 0.75rem;
  }
  
  .navbar-dropdown-link {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
  
  /* Template Warehouse Mobile Styles */
  .template-search-wrapper {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .template-search-input {
    font-size: 1rem;
    padding: 0.75rem;
  }
  
  .template-search-btn {
    width: 100%;
  }
  
  .template-categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .template-library-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .template-filters {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .template-card {
    padding: 1.25rem;
  }
  
  .my-templates-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .my-templates-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .my-templates-actions {
    justify-content: center;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn-primary, .btn-secondary, .btn-outline {
    width: 100%;
    padding: 0.875rem 1rem;
  }
  
  .preview-template-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .template-card-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .template-action-btn {
    width: 100%;
    padding: 0.875rem 1rem;
  }
  
  /* Mobile Articles Styles */
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .article-image {
    height: 180px;
  }
  
  .article-content {
    padding: 1.25rem;
  }
  
  .article-title {
    font-size: 1.125rem;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  /* Mobile Modal Adjustments */
  .template-preview-content {
    width: 95%;
    max-height: 90vh;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .template-preview-header h3 {
    font-size: 1.25rem;
  }
  
  /* Mobile Sidebar */
  .sidebar {
    display: none;
  }
  
  /* Mobile Header */
  .header {
    padding: 1rem 0;
  }
  
  .header-logo {
    height: 70px;
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .header-text {
    padding-right: 1rem;
  }
  
  .header-text .title {
    font-size: 1.5rem;
  }
  
  .header-text .subtitle {
    font-size: 0.9rem;
  }
}

/* Template Preview Modal - Enhanced */
.template-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.template-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.template-preview-content {
  position: relative;
  background: var(--surface-primary);
  border-radius: 1.25rem;
  padding: 2rem;
  max-width: 900px;
  max-height: 85vh;
  width: 95%;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.template-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
}

.template-preview-header h3 {
  margin: 0;
  color: var(--rutgers-red-700);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.template-preview-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.template-preview-close:hover {
  color: var(--rutgers-red-700);
  background-color: var(--rutgers-red-50);
  transform: scale(1.1);
}

.preview-content-editable {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-light);
  border-radius: 0.75rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  background-color: var(--surface-secondary);
  transition: all 0.3s ease;
  color: var(--text-primary);
  min-height: 200px;
}

.preview-content-editable:focus {
  outline: none;
  border-color: var(--rutgers-red);
  background-color: var(--surface-primary);
  box-shadow: 0 0 0 3px rgba(204, 0, 51, 0.1), var(--shadow-md);
  transform: translateY(-1px);
}

.preview-content-help {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--rutgers-red-50);
  border-radius: 0.5rem;
  border-left: 3px solid var(--rutgers-red-300);
}

.preview-content-help small {
  color: var(--rutgers-red-700);
  font-style: italic;
  font-weight: 500;
}