/* ===== CSS Variables & Design System ===== */
:root {
  --background: hsl(220, 20%, 6%);
  --foreground: hsl(210, 40%, 98%);
  --card: hsl(220, 20%, 10%);
  --card-foreground: hsl(210, 40%, 98%);
  --primary: hsl(175, 84%, 50%);
  --primary-foreground: hsl(220, 20%, 6%);
  --secondary: hsl(220, 20%, 15%);
  --secondary-foreground: hsl(210, 40%, 98%);
  --muted: hsl(220, 20%, 18%);
  --muted-foreground: hsl(215, 20%, 65%);
  --accent: hsl(350, 90%, 65%);
  --accent-foreground: hsl(210, 40%, 98%);
  --border: hsl(220, 20%, 20%);
  --radius: 1rem;
  --glow-primary: 0 0 40px hsla(175, 84%, 50%, 0.4);
  --glow-accent: 0 0 40px hsla(350, 90%, 65%, 0.4);
  --glass-bg: hsla(220, 20%, 10%, 0.7);
  --glass-border: hsla(220, 20%, 30%, 0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Utility Classes ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hidden {
  display: none !important;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 4rem 1rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsla(175, 84%, 50%, 0.2), hsla(350, 90%, 65%, 0.2));
  opacity: 0.5;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: pulseGlow 2s ease-in-out infinite;
}

.glow-1 {
  top: 5rem;
  left: 2.5rem;
  width: 16rem;
  height: 16rem;
  background: hsla(175, 84%, 50%, 0.2);
}

.glow-2 {
  bottom: 2.5rem;
  right: 2.5rem;
  width: 24rem;
  height: 24rem;
  background: hsla(350, 90%, 65%, 0.2);
  animation-delay: 1s;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsla(220, 20%, 15%, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease-out;
}

.badge-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.badge span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  animation: slideUp 0.6s ease-out;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  animation: slideUp 0.6s ease-out 0.1s backwards;
}

.search-container {
  position: relative;
  max-width: 36rem;
  margin: 0 auto;
  animation: slideUp 0.6s ease-out 0.2s backwards;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
}

.search-input {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1.125rem;
  color: var(--foreground);
  font-family: inherit;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

/* ===== Main Content ===== */
.main-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

@media (min-width: 640px) {
  .filter-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.filter-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .filter-left {
    flex-direction: row;
    align-items: center;
  }
}

.filter-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.filter-count span {
  font-weight: 600;
}

.department-dropdown {
  position: relative;
}

.department-select {
  appearance: none;
  background: var(--secondary);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.department-select:hover {
  border-color: var(--primary);
}

.department-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.department-select option {
  background: var(--card);
  color: var(--foreground);
  padding: 0.5rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--foreground);
}

.filter-btn svg {
  width: 1rem;
  height: 1rem;
}

.filter-btn:hover {
  background: var(--secondary);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--glow-primary);
  transform: scale(1.05);
}

/* ===== Electives Grid ===== */
.electives-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .electives-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .electives-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Elective Card ===== */
.elective-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: slideUp 0.6s ease-out backwards;
}

.elective-card:hover {
  transform: scale(1.02);
  box-shadow: var(--glow-primary);
}

.elective-card:hover .card-emoji {
  animation: float 2s ease-in-out infinite;
}

.elective-card:hover .card-title {
  color: var(--primary);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-emoji {
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.card-code {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  color: var(--muted-foreground);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stars {
  display: flex;
  gap: 0.125rem;
}

.star {
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  opacity: 0.4;
  transition: all 0.2s ease;
}

.star.filled {
  color: var(--primary);
  fill: var(--primary);
  opacity: 1;
}

.rating-value {
  font-size: 0.875rem;
  font-weight: 600;
}

.card-reviews {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted-foreground);
}

.card-reviews svg {
  width: 1rem;
  height: 1rem;
}

.card-reviews span {
  font-size: 0.875rem;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.tag-department {
  background: hsla(175, 84%, 50%, 0.2);
  color: var(--primary);
}

.tag-credits {
  background: hsla(350, 90%, 65%, 0.2);
  color: var(--accent);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  animation: fadeIn 0.5s ease-out;
}

.empty-state .emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted-foreground);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: hsla(220, 20%, 6%, 0.8);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.modal {
  width: 100%;
  max-width: 42rem;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 1.5rem;
  animation: scaleIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-emoji {
  font-size: 3rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-subtitle {
  color: var(--muted-foreground);
}

.close-btn {
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--foreground);
}

.close-btn:hover {
  background: var(--secondary);
}

.close-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.modal-rating-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.stars-large {
  display: flex;
  gap: 0.25rem;
}

.stars-large .star {
  width: 1.75rem;
  height: 1.75rem;
}

.avg-rating {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.review-count {
  color: var(--muted-foreground);
}

/* ===== Reviews Section ===== */
.modal-reviews {
  padding: 1.5rem 1.5rem 2rem;
  flex: 1;
  min-height: 350px;
  max-height: 450px;
  overflow-y: auto;
  background: linear-gradient(180deg, hsla(220, 20%, 8%, 0.5), hsla(220, 20%, 12%, 0.3));
}

.reviews-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reviews-heading::before {
  content: '💬';
  font-size: 1.25rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-item {
  background: linear-gradient(135deg, hsla(220, 20%, 15%, 0.8), hsla(220, 20%, 18%, 0.6));
  border: 1px solid hsla(220, 20%, 25%, 0.4);
  border-radius: 1rem;
  padding: 1.25rem;
  animation: fadeIn 0.3s ease-out backwards;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.review-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
}

.review-item:hover {
  transform: translateX(4px);
  border-color: hsla(175, 84%, 50%, 0.3);
  box-shadow: 0 4px 20px hsla(175, 84%, 50%, 0.1);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-foreground);
  box-shadow: 0 0 20px hsla(175, 84%, 50%, 0.3);
}

.review-username {
  font-weight: 700;
  font-size: 1rem;
  color: var(--foreground);
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-meta .stars {
  gap: 0.125rem;
}

.review-meta .star {
  width: 1rem;
  height: 1rem;
}

.review-date {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  background: hsla(220, 20%, 20%, 0.5);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.review-comment {
  color: var(--card-foreground);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 0.5rem;
}

.no-reviews {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted-foreground);
  background: hsla(220, 20%, 15%, 0.3);
  border-radius: 1rem;
  border: 1px dashed hsla(220, 20%, 30%, 0.5);
}

.no-reviews::before {
  content: '📝';
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

/* ===== Add Review Form ===== */
.modal-form {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: hsla(220, 20%, 15%, 0.3);
}

.form-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-foreground);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.form-textarea {
  resize: none;
}

.rating-input {
  display: flex;
  gap: 0.25rem;
}

.rating-input .star {
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-input .star:hover {
  transform: scale(1.25);
}

.submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--glow-primary);
}

.submit-btn:hover {
  transform: scale(1.02);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.submit-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.3s ease-out;
  z-index: 100;
}

.toast span {
  font-weight: 500;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ===== Elective Detail Page ===== */
.elective-page {
  min-height: 100vh;
}

.page-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsla(220, 20%, 6%, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: var(--primary);
}

.back-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Elective Header */
.elective-header {
  position: relative;
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

.elective-header-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsla(175, 84%, 50%, 0.15), hsla(350, 90%, 65%, 0.1), transparent);
}

.elective-header-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .elective-header-content {
    flex-direction: row;
    text-align: left;
    gap: 2rem;
  }
}

.elective-emoji {
  font-size: 5rem;
  animation: float 3s ease-in-out infinite;
}

.elective-info {
  flex: 1;
}

.elective-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .elective-badges {
    justify-content: flex-start;
  }
}

.elective-code,
.elective-department,
.elective-credits {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
}

.elective-code {
  background: var(--secondary);
  color: var(--foreground);
}

.elective-department {
  background: hsla(175, 84%, 50%, 0.2);
  color: var(--primary);
}

.elective-credits {
  background: hsla(350, 90%, 65%, 0.2);
  color: var(--accent);
}

.elective-name {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.elective-description {
  font-size: 1rem;
  color: var(--muted-foreground);
  max-width: 40rem;
  line-height: 1.7;
}

.elective-rating-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .elective-rating-summary {
    justify-content: flex-start;
  }
}

.avg-rating-large {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.review-count-large {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* Elective Main Content */
.elective-main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Add Review Section */
.add-review-section {
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.review-count-badge {
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  margin-left: auto;
}

.review-form .form-group {
  margin-bottom: 1.25rem;
}

.review-form .form-group label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.625rem;
  display: block;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.625rem;
}

.form-label-row label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 500;
  transition: color 0.2s ease;
}

.char-counter.over-limit {
  color: var(--accent);
}

.rating-input-large {
  display: flex;
  gap: 0.375rem;
}

.rating-input-large .star {
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-input-large .star:hover {
  transform: scale(1.2);
}

.form-textarea-large {
  width: 100%;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  transition: all 0.3s ease;
}

.form-textarea-large::placeholder {
  color: var(--muted-foreground);
}

.form-textarea-large:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(175, 84%, 50%, 0.2);
}

.submit-btn-large {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), hsl(175, 84%, 40%));
  color: var(--primary-foreground);
  border: none;
  border-radius: 1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--glow-primary);
}

.submit-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px hsla(175, 84%, 50%, 0.4);
}

.submit-btn-large svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Reviews Section */

.reviews-list-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-card {
  background: linear-gradient(135deg, hsla(220, 20%, 12%, 0.9), hsla(220, 20%, 15%, 0.7));
  border: 1px solid hsla(220, 20%, 25%, 0.4);
  border-radius: 1.25rem;
  padding: 1.5rem;
  animation: slideUp 0.5s ease-out backwards;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.review-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 5px 0 0 5px;
}

.review-card:hover {
  transform: translateX(6px);
  border-color: hsla(175, 84%, 50%, 0.4);
  box-shadow: 0 8px 32px hsla(175, 84%, 50%, 0.15);
}

.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.review-card-user {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.review-card-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 25px hsla(175, 84%, 50%, 0.35);
}

.review-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.review-card-name {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--foreground);
}

.review-card-date {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.review-card-rating .stars {
  gap: 0.125rem;
}

.review-card-rating .star {
  width: 1.125rem;
  height: 1.125rem;
}

.review-card-comment {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--card-foreground);
  padding-left: 0.75rem;
  border-left: 2px solid hsla(220, 20%, 30%, 0.5);
  margin-left: 0.5rem;
  margin-bottom: 1rem;
}

/* Vote Buttons */
.review-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-left: 0.75rem;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  background: hsla(220, 20%, 20%, 0.6);
  border: 1px solid hsla(220, 20%, 30%, 0.4);
  color: var(--muted-foreground);
}

.vote-btn svg {
  width: 1rem;
  height: 1rem;
}

.vote-btn:hover {
  background: hsla(220, 20%, 25%, 0.8);
  border-color: hsla(220, 20%, 40%, 0.5);
  color: var(--foreground);
}

.vote-btn.active[data-vote-type="like"] {
  background: hsla(175, 84%, 50%, 0.2);
  border-color: hsla(175, 84%, 50%, 0.5);
  color: var(--primary);
}

.vote-btn.active[data-vote-type="like"] svg {
  fill: var(--primary);
}

.vote-btn.active[data-vote-type="dislike"] {
  background: hsla(350, 90%, 65%, 0.2);
  border-color: hsla(350, 90%, 65%, 0.5);
  color: var(--accent);
}

.vote-btn.active[data-vote-type="dislike"] svg {
  fill: var(--accent);
}

.vote-count {
  min-width: 0.5rem;
}

/* No Reviews State */
.no-reviews-page {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, hsla(220, 20%, 12%, 0.6), hsla(220, 20%, 15%, 0.4));
  border: 2px dashed hsla(220, 20%, 30%, 0.5);
  border-radius: 1.5rem;
}

.no-reviews-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.no-reviews-page h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.no-reviews-page p {
  color: var(--muted-foreground);
  font-size: 1rem;
}

/* ===== Mobile Optimizations for Elective Detail Page ===== */
@media (max-width: 767px) {
  /* Page Navigation */
  .page-nav {
    padding: 0.875rem 1rem;
  }
  
  .back-link {
    font-size: 0.875rem;
  }
  
  .back-link svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  /* Elective Header Mobile */
  .elective-header {
    padding: 2rem 1rem 2.5rem;
  }
  
  .elective-emoji {
    font-size: 3.5rem;
  }
  
  .elective-header-content {
    gap: 1rem;
  }
  
  .elective-badges {
    gap: 0.375rem;
    margin-bottom: 0.75rem;
  }
  
  .elective-code,
  .elective-department,
  .elective-credits {
    font-size: 0.6875rem;
    padding: 0.3125rem 0.625rem;
  }
  
  .elective-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .elective-description {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  .elective-rating-summary {
    margin-top: 1rem;
    gap: 0.5rem;
  }
  
  .avg-rating-large {
    font-size: 1.5rem;
  }
  
  .review-count-large {
    font-size: 0.875rem;
  }
  
  .stars-large .star {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* Main Content Mobile */
  .elective-main {
    padding: 0 1rem 3rem;
    gap: 1.5rem;
    display: flex;
    flex-direction: column;
  }
  
  /* Add Review Section Mobile */
  .add-review-section {
    padding: 1.25rem;
    border-radius: 1rem;
  }
  
  .section-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    gap: 0.5rem;
  }
  
  .section-title svg {
    width: 1.125rem;
    height: 1.125rem;
  }
  
  .review-count-badge {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
  }
  
  .review-form .form-group {
    margin-bottom: 1rem;
  }
  
  .review-form .form-group label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  .rating-input-large {
    gap: 0.25rem;
  }
  
  .rating-input-large .star {
    width: 2rem;
    height: 2rem;
  }
  
  .form-textarea-large {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border-radius: 0.875rem;
  }
  
  .submit-btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.875rem;
    gap: 0.5rem;
  }
  
  .submit-btn-large svg {
    width: 1.125rem;
    height: 1.125rem;
  }
  
  /* Reviews Section Mobile */
  
  .reviews-list-page {
    gap: 1rem;
  }
  
  /* Review Card Mobile */
  .review-card {
    padding: 1.25rem 1rem 1.25rem 1.125rem;
    border-radius: 1rem;
  }
  
  .review-card::before {
    width: 4px;
  }
  
  .review-card:hover {
    transform: translateX(4px);
  }
  
  .review-card-header {
    margin-bottom: 0.875rem;
    gap: 0.5rem;
  }
  
  .review-card-avatar {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .review-card-user {
    gap: 0.625rem;
  }
  
  .review-card-name {
    font-size: 0.9375rem;
  }
  
  .review-card-date {
    font-size: 0.75rem;
  }
  
  .review-card-rating .star {
    width: 1rem;
    height: 1rem;
  }
  
  .review-card-comment {
    font-size: 0.9375rem;
    line-height: 1.7;
    padding-left: 0.625rem;
    margin-left: 0.375rem;
    margin-bottom: 0.875rem;
  }
  
  .review-card-actions {
    gap: 0.5rem;
    padding-left: 0.625rem;
  }
  
  .vote-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
  }
  
  .vote-btn svg {
    width: 0.875rem;
    height: 0.875rem;
  }
  
  /* No Reviews State Mobile */
  .no-reviews-page {
    padding: 3rem 1.5rem;
    border-radius: 1.25rem;
  }
  
  .no-reviews-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
  }
  
  .no-reviews-page h3 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
  }
  
  .no-reviews-page p {
    font-size: 0.875rem;
  }
  
  /* Toast Mobile */
  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    text-align: center;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
  }
  
  /* Glow effects - smaller on mobile */
  .glow-1 {
    width: 10rem;
    height: 10rem;
    top: 2rem;
    left: 1rem;
  }
  
  .glow-2 {
    width: 14rem;
    height: 14rem;
    bottom: 1rem;
    right: 1rem;
  }
}

/* ===== Extra Small Mobile (< 360px) ===== */
@media (max-width: 359px) {
  .elective-header {
    padding: 1.5rem 0.75rem 2rem;
  }
  
  .elective-emoji {
    font-size: 2.75rem;
  }
  
  .elective-name {
    font-size: 1.25rem;
  }
  
  .elective-badges {
    gap: 0.25rem;
  }
  
  .elective-code,
  .elective-department,
  .elective-credits {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }
  
  .elective-main {
    padding: 0 0.75rem 2.5rem;
  }
  
  .add-review-section {
    padding: 1rem;
  }
  
  .rating-input-large .star {
    width: 1.75rem;
    height: 1.75rem;
  }
  
  .review-card {
    padding: 1rem 0.875rem 1rem 1rem;
  }
  
  .review-card-avatar {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9375rem;
  }
}

/* Review Limit Message */
.review-limit-message {
  text-align: center;
  padding: 2rem 1rem;
}

.review-limit-message .limit-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.review-limit-message h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.review-limit-message p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ===== Quick Stats Section ===== */
.quick-stats-section {
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  background: var(--secondary);
  border-radius: 0.75rem;
  padding: 1rem;
}

.stat-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-bar-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  width: 5rem;
  flex-shrink: 0;
}

.stat-bar-track {
  flex: 1;
  height: 0.5rem;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease-out;
}

.stat-bar-fill.scoring-easy { background: var(--primary); }
.stat-bar-fill.scoring-average { background: hsl(45, 90%, 55%); }
.stat-bar-fill.scoring-tough { background: var(--accent); }
.stat-bar-fill.teaching-good { background: var(--primary); }
.stat-bar-fill.teaching-heavy { background: hsl(45, 90%, 55%); }
.stat-bar-fill.teaching-chill { background: hsl(260, 80%, 65%); }
.stat-bar-fill.attendance-given { background: var(--primary); }
.stat-bar-fill.attendance-regular { background: hsl(45, 90%, 55%); }
.stat-bar-fill.attendance-deducted { background: var(--accent); }

.stat-bar-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  width: 2rem;
  text-align: right;
}

/* ===== Quick Review Section ===== */
.quick-review-section {
  margin-bottom: 1.5rem;
}

.quick-review-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  display: block;
}

.quick-review-group {
  margin-bottom: 1rem;
}

.quick-review-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  display: block;
}

.quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-option {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--secondary);
  border: 1px solid var(--glass-border);
  color: var(--foreground);
}

.quick-option:hover {
  border-color: var(--primary);
  transform: scale(1.02);
}

.quick-option.selected {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
}

.text-review-section {
  animation: fadeIn 0.3s ease-out;
  margin-top: 1rem;
}

.required {
  color: var(--accent);
}

/* Quick Review Tags in Review Cards */
.review-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.quick-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

.quick-tag.scoring { background: hsla(175, 84%, 50%, 0.2); color: var(--primary); }
.quick-tag.teaching { background: hsla(260, 80%, 65%, 0.2); color: hsl(260, 80%, 65%); }
.quick-tag.attendance { background: hsla(45, 90%, 55%, 0.2); color: hsl(45, 90%, 55%); }

/* Share Section */
.share-section {
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.share-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.share-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.share-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.share-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.share-btn.whatsapp {
  background: hsl(142, 70%, 45%);
  color: white;
}

.share-btn.whatsapp:hover {
  background: hsl(142, 70%, 40%);
  transform: scale(1.05);
}


.share-btn.instagram {
  background: linear-gradient(45deg, hsl(37, 97%, 52%), hsl(333, 100%, 50%), hsl(280, 87%, 47%));
  color: white;
  text-decoration: none;
}

.share-btn.instagram:hover {
  background: linear-gradient(45deg, hsl(37, 97%, 45%), hsl(333, 100%, 45%), hsl(280, 87%, 40%));
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .share-buttons {
    width: 100%;
  }
  
  .share-btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }
}

/* ===== Turnstile Widget ===== */
.turnstile-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.turnstile-container iframe {
  border-radius: var(--radius);
}

/* ===== Admin Page Styles ===== */
.admin-page {
  min-height: 100vh;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin: 1rem;
  border-radius: 1rem;
}

.admin-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user-email {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.sign-out-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sign-out-btn:hover {
  background: var(--muted);
}

.sign-out-btn svg {
  width: 1rem;
  height: 1rem;
}

.admin-main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* Loading State */
.admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login State */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.login-card {
  text-align: center;
  padding: 3rem;
  border-radius: 1.5rem;
  max-width: 400px;
}

.login-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.login-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.login-card p {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.admin-login-form {
  text-align: left;
}

.admin-login-form .form-group {
  margin-bottom: 1rem;
}

.admin-login-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.admin-login-form .form-input {
  width: 100%;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
  box-sizing: border-box;
}

.admin-login-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(175, 84%, 50%, 0.2);
}

.admin-login-form .form-input::placeholder {
  color: var(--muted-foreground);
}

.login-error {
  background: hsla(0, 84%, 50%, 0.15);
  color: hsl(0, 84%, 65%);
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid hsla(0, 84%, 50%, 0.25);
}

.admin-login-form .google-signin-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  background: white;
  border: none;
  border-radius: 0.5rem;
  color: #333;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-signin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.google-signin-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Access Denied State */
.admin-access-denied {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.access-denied-card {
  text-align: center;
  padding: 3rem;
  border-radius: 1.5rem;
  max-width: 400px;
}

.access-denied-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.access-denied-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.access-denied-card p {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.try-another-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  border: none;
  border-radius: 0.5rem;
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.try-another-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

/* Admin Dashboard */
.admin-header {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-title {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 700;
}

.admin-title svg {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.admin-subtitle {
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.admin-tab {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.admin-tab:hover {
  color: var(--foreground);
}

.admin-tab.active {
  color: var(--primary);
}

.admin-tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.6rem;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 10px hsla(175, 84%, 50%, 0.4);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

.admin-input-date {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
  color-scheme: dark; /* makes calendar icon light in modern browsers */
}

.admin-input-date:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(175, 84%, 50%, 0.2);
}

/* Actions Bar */
.admin-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .admin-actions-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.admin-actions-left {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-filter-group label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.admin-select {
  appearance: none;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.admin-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-btn svg {
  width: 1rem;
  height: 1rem;
}

.admin-btn.primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.admin-btn.primary:hover {
  box-shadow: var(--glow-primary);
}

.admin-btn.secondary {
  background: var(--secondary);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.admin-btn.secondary:hover {
  background: var(--muted);
}

.admin-btn.danger {
  background: hsl(0, 84%, 50%);
  color: white;
}

.admin-btn.danger:hover:not(:disabled) {
  background: hsl(0, 84%, 45%);
}

.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Admin Table */
.admin-table-container {
  border-radius: 1rem;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.admin-table tbody tr {
  transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
  background: hsla(175, 84%, 50%, 0.05);
}

.admin-table tbody tr.selected {
  background: hsla(175, 84%, 50%, 0.1);
}

.checkbox-col {
  width: 40px;
  text-align: center;
}

.elective-id-col {
  font-family: monospace;
  font-size: 0.875rem;
}

.comment-col {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions-col {
  display: flex;
  gap: 0.5rem;
}

.rating-display {
  color: var(--primary);
  letter-spacing: 2px;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-right: 0.25rem;
}

.status-badge.visible-badge {
  background: hsla(142, 70%, 45%, 0.2);
  color: hsl(142, 70%, 45%);
}

.status-badge.hidden-badge {
  background: hsla(0, 84%, 50%, 0.2);
  color: hsl(0, 84%, 50%);
}

.status-badge.spam-badge {
  background: hsla(38, 92%, 50%, 0.2);
  color: hsl(38, 92%, 50%);
}

.status-badge.banned-badge {
  background: hsla(280, 87%, 47%, 0.2);
  color: hsl(280, 87%, 55%);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn svg {
  width: 1rem;
  height: 1rem;
}

.action-btn.edit-btn:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.action-btn.delete-btn:hover {
  background: hsl(0, 84%, 50%);
  color: white;
  border-color: hsl(0, 84%, 50%);
}

.no-reviews-message {
  text-align: center;
  padding: 4rem;
  color: var(--muted-foreground);
}

.no-reviews-message span {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* Edit Modal */
.edit-modal {
  max-width: 500px;
}

.edit-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-modal .modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(175, 84%, 50%, 0.2);
}

/* Admin button in header */
.admin-header-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
}

.admin-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  border-radius: 0.5rem;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-link-btn:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

.admin-link-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Responsive table */
@media (max-width: 768px) {
  .admin-table {
    display: block;
    overflow-x: auto;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}
.footer-container {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--foreground);
}
/* ===== Legal Pages ===== */
.legal-page {
  padding: 3rem 1.5rem;
}
.legal-container {
  max-width: 48rem;
  margin: 0 auto;
}
.legal-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}
.legal-updated {
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
}
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}
.legal-section p {
  color: var(--muted-foreground);
  line-height: 1.7;
}
@media (max-width: 768px) {
  .legal-title {
    font-size: 1.75rem;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
