/* Global Reset & Box Sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #dceefd;
  background-image: 
    radial-gradient(#b2d7fc 2px, transparent 2px);
  background-size: 24px 24px;
  color: #1e293b;
  min-height: 100vh;
  padding: 24px 16px 40px 16px;
  display: flex;
  justify-content: center;
}

.page-wrapper {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Site Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 50, 120, 0.06);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-circle {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #1d60d8, #0b45a3);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(11, 69, 163, 0.3);
}

.school-name {
  font-size: 17px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1.2;
}

.school-sub {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}

.main-title {
  font-size: 32px;
  font-weight: 900;
  color: #1e3a8a;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.header-right {
  display: flex;
  gap: 8px;
  font-size: 24px;
}

.star-yellow {
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.5));
}

.star-blue {
  color: #38bdf8;
  filter: drop-shadow(0 2px 4px rgba(56, 189, 248, 0.5));
}

/* Menu Section Container */
.menu-section {
  background: #ffffff;
  border-radius: 24px;
  border: 3px solid #94cafc;
  box-shadow: 0 16px 40px rgba(30, 80, 160, 0.14);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.margin-top-lg {
  margin-top: 8px;
}

/* Header Bar inside Section */
.section-header-bar {
  background: linear-gradient(90deg, #2b82f6 0%, #2998e4 50%, #20bca3 100%);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-badge {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.section-title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-box-wrapper {
  position: relative;
  width: 320px;
}

.search-input {
  width: 100%;
  padding: 12px 22px;
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.4);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Grid Container */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 28px;
  padding: 36px 36px;
}

/* Menu Card Button */
.menu-card {
  display: flex;
  align-items: center;
  height: 68px;
  background: linear-gradient(180deg, #4d8bf8 0%, #306ee8 100%);
  border-radius: 14px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(48, 110, 232, 0.32);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Left Slanted Tag */
.card-tag {
  width: 64px;
  height: 100%;
  background: linear-gradient(180deg, #1e40af 0%, #173289 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0% 100%);
  padding-right: 12px;
  transition: background 0.25s ease;
}

.card-tag i {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Card Text */
.card-text {
  flex: 1;
  text-align: left;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  padding-left: 18px;
  padding-right: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover & Active Effects */
.menu-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 22px rgba(48, 110, 232, 0.45);
  background: linear-gradient(180deg, #5c97ff 0%, #3d7af2 100%);
}

.menu-card:hover .card-tag {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.menu-card:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: 0 4px 10px rgba(48, 110, 232, 0.3);
}

/* Hidden state for filter */
.menu-card.hidden {
  display: none;
}

/* No results text styling */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 16px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Layout */
@media (max-width: 900px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .grid-container {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .section-header-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .search-box-wrapper {
    width: 100%;
  }
}
