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

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --bg: #f4f6f9;
  --card-bg: #fff;
  --text: #202124;
  --text-muted: #5f6368;
  --border: #dadce0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Buttons */
.btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero-actions .btn-outline {
  border-color: #fff;
  color: #fff;
}

.hero-actions .btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

/* Sections */
main section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

main h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Schedule */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.schedule-time {
  font-weight: 700;
  min-width: 110px;
  color: var(--primary);
}

.schedule-details h4 {
  font-size: 0.95rem;
}

.schedule-details span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Quick Actions */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.action-card:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.action-icon {
  font-size: 1.75rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* Schedule Page */
.schedule-header {
  text-align: center;
  padding-top: 2rem;
}

.schedule-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.current-week {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 200px;
  text-align: center;
}

.schedule-view {
  padding-top: 1rem;
}

.schedule-table-wrapper {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.schedule-table th,
.schedule-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  border: 1px solid var(--border);
}

.schedule-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.schedule-table .time-cell {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  background: #eaf1fb;
}

.schedule-table .filled-cell {
  background: #e8f0fe;
  font-weight: 500;
  font-size: 0.9rem;
}

.schedule-table .filled-cell small {
  color: var(--text-muted);
  font-weight: 400;
}

.schedule-table td:not(.time-cell):not(.filled-cell) {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Rooms Page */
.rooms-header {
  text-align: center;
  padding-top: 2rem;
}

.rooms-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.room-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s;
}

.room-card:hover {
  transform: translateY(-4px);
}

.room-card h3 {
  font-size: 1.15rem;
}

.room-building {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.room-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.room-current {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.room-status-badge {
  font-size: 0.8rem;
  font-weight: 600;
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.room-status-badge.available {
  background: #e6f4ea;
  color: #1e7e34;
}

.room-status-badge.occupied {
  background: #fce8e6;
  color: #c5221f;
}

.room-card .btn {
  margin-top: auto;
  width: 100%;
}

.room-card .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Courses Page */
.courses-header {
  text-align: center;
  padding-top: 2rem;
}

.courses-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.filter-input {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 220px;
  transition: border-color 0.2s;
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.course-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s;
}

.course-card:hover {
  transform: translateY(-4px);
}

.course-code {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: #e8f0fe;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  align-self: flex-start;
}

.course-card h3 {
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.course-dept,
.course-instructor,
.course-schedule {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-enrollment {
  margin-top: 0.5rem;
}

.enrollment-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.enrollment-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}

.enrollment-fill.full {
  background: #c5221f;
}

.enrollment-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.course-card .btn {
  margin-top: auto;
  width: 100%;
}

.course-card .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
  padding: 2rem;
}

/* Week Indicator */
.week-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.week-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.week-dot:hover {
  background: var(--primary);
  opacity: 0.6;
}

.week-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.schedule-controls .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Find Room Page */
.find-room-header {
  text-align: center;
  padding-top: 2rem;
}

.find-room-subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.find-room-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

.find-room-form {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.find-room-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.find-room-form label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.find-room-form .filter-input,
.find-room-form .filter-select {
  width: 100%;
}

.find-room-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.results-count {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.no-rooms {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.no-rooms-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}
