/* ===== CSS Variables ===== */
:root {
  /* Light & Bright Color Palette */
  --bg-primary: #fef6f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #fff0f5;

  /* Cute Pastel Accents */
  --accent-primary: #ff9ec7;
  --accent-secondary: #ffb8d9;
  --accent-gradient: linear-gradient(135deg, #ffa6c9 0%, #ffcce0 100%);
  --accent-glow: rgba(255, 158, 199, 0.3);

  /* Text Colors */
  --text-primary: #4a4a4a;
  --text-secondary: #7a7a7a;
  --text-muted: #b0b0b0;

  /* Border & Shadows */
  --border-color: rgba(255, 158, 199, 0.2);
  --border-focus: rgba(255, 158, 199, 0.5);

  --success: #7dd3c0;
  --warning: #ffb347;

  --shadow-sm: 0 2px 8px rgba(255, 158, 199, 0.15);
  --shadow-md: 0 4px 20px rgba(255, 158, 199, 0.2);
  --shadow-lg: 0 8px 40px rgba(255, 158, 199, 0.25);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Noto Sans TC",
    "Outfit",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    radial-gradient(
      ellipse at 10% 20%,
      rgba(255, 182, 217, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 90% 80%,
      rgba(255, 204, 224, 0.12) 0%,
      transparent 50%
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 50px,
      rgba(255, 255, 255, 0.03) 50px,
      rgba(255, 255, 255, 0.03) 100px
    );
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.header {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 30px;
}

.title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  font-family: "Outfit", "Noto Sans TC", sans-serif;
  letter-spacing: -0.02em;
}

.title-icon {
  font-size: 1.2em;
  -webkit-text-fill-color: initial;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(255, 158, 199, 0.3));
}

.title-icon:last-child {
  animation-delay: 1.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Notice Section ===== */
.notice-section {
  margin-bottom: 25px;
}

.notice-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: var(--transition);
}

.notice-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.notice-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.notice-content {
  flex: 1;
}

.notice-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.notice-list {
  list-style: none;
  margin-bottom: 0;
}

.notice-list li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 158, 199, 0.1);
}

.notice-list li:last-child {
  border-bottom: none;
}

/* ===== Search Section ===== */
.search-section {
  margin-bottom: 30px;
}

.search-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.search-card:hover {
  border-color: var(--accent-secondary);
}

.search-group {
  margin-bottom: 25px;
}

.search-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.label-icon {
  font-size: 1.2em;
}

.search-input-wrapper {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.search-input,
.search-select {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus,
.search-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  background: var(--bg-secondary);
}

.search-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff9ec7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 45px;
}

.search-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px;
}

/* ===== Buttons ===== */
.button-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon {
  font-size: 1.1em;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
}

/* ===== Results Section ===== */
.results-section {
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.results-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.results-icon {
  font-size: 1.2em;
}

.results-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
}

.stat-value {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.1em;
}

.stat-label {
  color: var(--text-secondary);
}

/* ===== Table ===== */
.table-container {
  flex: 1;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.results-table th,
.results-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.results-table th {
  background: var(--bg-primary);
  font-weight: 600;
  color: var(--accent-primary);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.results-table tbody tr {
  transition: var(--transition);
}

.results-table tbody tr:hover {
  background: var(--bg-hover);
  transform: scale(1.01);
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.results-table td {
  color: var(--text-secondary);
}

.results-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.price {
  font-weight: 700;
  color: var(--success);
  font-size: 1.05em;
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.empty-text {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 25px 15px;
  }

  .search-card {
    padding: 20px;
  }

  .search-input-wrapper {
    flex-direction: column;
  }

  .search-input,
  .search-select {
    min-width: 100%;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .results-section {
    padding: 15px;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-table th,
  .results-table td {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.5rem;
  }

  .title-icon {
    font-size: 1em;
  }

  .results-table {
    font-size: 0.85rem;
  }
}
