/* normalrange specific styles */
.intro-section {
  margin-bottom: 2rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.intro-image {
  max-width: 100%;
  height: auto;
  max-height: 250px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}

.intro-text p {
  line-height: 1.6;
  margin: 0;
  font-size: 1.1rem;
}

@media (min-width: 992px) {
  .intro-section {
    flex-direction: row;
    text-align: left;
    padding: 2.5rem;
    gap: 3rem;
  }

  .intro-image-wrapper {
    flex: 0 0 240px;
  }

  .intro-image {
    max-height: 240px;
    width: 100%;
  }

  .intro-text p {
    font-size: 1.25rem;
  }
}

/* Controls */
.controls-card {
  margin-bottom: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 1rem;
  box-shadow: var(--shadow-sm);
}

.search-icon {
  font-size: 1.2rem;
  opacity: 0.5;
  margin-right: 0.5rem;
}

.search-input {
  flex: 1;
  height: 48px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text-main);
}

.filter-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 100px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233b82f6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  appearance: none;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Grid Layout */
.notice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 600px) {
  .notice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .notice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card Styles */
.notice-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.notice-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.notice-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0.5rem 0 0;
  flex: 1;
}

.badge-container {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-gender-m {
  background-color: #e0f2fe;
  color: #0284c7;
}

html[data-theme="dark"] .badge-gender-m {
  background-color: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

.badge-gender-f {
  background-color: #fdf2f8;
  color: #ec4899;
}

html[data-theme="dark"] .badge-gender-f {
  background-color: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.badge-general {
  background-color: #f1f5f9;
  color: #475569;
}

html[data-theme="dark"] .badge-general {
  background-color: #334155;
  color: #cbd5e1;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.details-container {
  background-color: var(--bg-color);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: auto;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  font-size: 1.05rem;
  font-weight: 800;
}

.value-color-m { color: #2563eb; }
html[data-theme="dark"] .value-color-m { color: #60a5fa; }

.value-color-f { color: #dc2626; }
html[data-theme="dark"] .value-color-f { color: #f87171; }

.value-color-general { color: #0f172a; }
html[data-theme="dark"] .value-color-general { color: #e2e8f0; }

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
