@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

/* Design Tokens & Variables */
:root {
  --primary: #0f172a;       /* Deep Navy Blue */
  --primary-light: #1e293b;
  --accent: #d97706;        /* Golden Amber */
  --accent-light: #f59e0b;
  --accent-dark: #b45309;
  --bg-main: #f8fafc;       /* Off-White */
  --card-bg: #ffffff;
  --text-main: #334155;     /* Slate Text */
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --font-family: 'Outfit', 'Noto Sans TC', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 80px 0 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent);
}

/* Luxury travel subtle background grids */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(217, 119, 6, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.8;
}

.hero-badge {
  background-color: rgba(217, 119, 6, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(217, 119, 6, 0.4);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 20px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.8s ease-out;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.8s ease-out;
}

.hero p {
  color: #94a3b8;
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 30px auto;
  font-weight: 300;
  animation: fadeIn 1s ease-out 0.2s both;
}

/* Stats dashboard */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
  animation: slideUp 0.8s ease-out 0.4s both;
}

.stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 28px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
}

.stat-label {
  font-size: 13px;
  color: #94a3b8;
}

/* Main Controls Section (Search & Filter) */
.controls-wrapper {
  margin-top: -30px;
  position: relative;
  z-index: 10;
  margin-bottom: 40px;
}

.controls-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Search Bar Styling */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 48px;
  font-size: 16px;
  font-family: var(--font-family);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  background-color: #f8fafc;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

.clear-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  transition: var(--transition);
}

.clear-btn:hover {
  background: #cbd5e1;
  color: var(--primary);
}

/* Filter Section */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  min-width: 80px;
}

/* Region Tabs */
.tabs-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.region-tab {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.region-tab:hover {
  background: #e2e8f0;
  color: var(--primary);
}

.region-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* County Pills Container */
.pills-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px dashed var(--border-color);
  animation: fadeIn 0.4s ease-out;
}

.pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: rgba(217, 119, 6, 0.03);
}

.pill-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Grid & Cards View */
.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.results-count {
  font-size: 15px;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--accent);
}

.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* Hotel Card */
.hotel-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  opacity: 0;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hotel-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(217, 119, 6, 0.4);
}

.card-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.region-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.badge-reg {
  background-color: #eff6ff;
  color: #2563eb;
}

.badge-all {
  background-color: #fef3c7;
  color: #d97706;
}

.hotel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.card-body {
  padding: 20px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-icon {
  font-size: 16px;
}

.info-text {
  font-size: 14px;
  color: var(--text-muted);
}

.price-tag {
  font-weight: 600;
  color: var(--text-main);
  padding: 4px 8px;
  background-color: #f1f5f9;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.price-tag.special {
  color: var(--accent-dark);
  background-color: rgba(217, 119, 6, 0.1);
}

.card-footer {
  padding: 16px 24px 24px 24px;
  background-color: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  font-family: var(--font-family);
  transition: var(--transition);
}

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

.btn-primary:hover {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

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

/* Details Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 30px 30px 20px 30px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  right: 24px;
  top: 24px;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--primary);
  transform: rotate(90deg);
}

.modal-title-group h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.modal-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent-dark);
  font-weight: 600;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-section {
  margin-bottom: 30px;
}

.modal-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
}

.modal-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

/* Contact actions in modal */
.contact-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-contact {
  flex: 1;
}

/* Remarks Formatting */
.remarks-list {
  padding-left: 20px;
}

.remarks-list li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-main);
  position: relative;
  list-style-type: none;
  padding-left: 12px;
}

.remarks-list li::before {
  content: "•";
  color: var(--accent);
  font-weight: bold;
  font-size: 16px;
  position: absolute;
  left: -8px;
  top: -2px;
}

.highlight-term {
  color: #e11d48; /* Crimson red */
  font-weight: 600;
  background-color: rgba(225, 29, 72, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Room Types Table inside Modal */
.room-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.room-table th {
  background-color: #f8fafc;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  padding: 14px 20px;
  border-bottom: 2px solid var(--border-color);
}

.room-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-main);
}

.room-table tr:last-child td {
  border-bottom: none;
}

.room-table tr:nth-child(even) {
  background-color: #fdfdfd;
}

.price-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin: 2px;
  white-space: nowrap;
}

.badge-weekday {
  background-color: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.badge-weekend {
  background-color: rgba(217, 119, 6, 0.08);
  color: var(--accent-dark);
}

.badge-dollar {
  background-color: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.badge-field {
  background-color: #f1f5f9;
  color: var(--text-muted);
}

.empty-room-types {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
}

/* No Results State */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-muted);
}

/* Footer Section */
.site-footer {
  background-color: #0f172a;
  color: #64748b;
  padding: 60px 0 40px 0;
  font-size: 14px;
  border-top: 4px solid var(--accent);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 320px;
  line-height: 1.5;
}

.footer-links h4 {
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 30px;
  text-align: center;
  font-size: 13px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Queries */
@media (max-width: 992px) {
  .hero h1 { font-size: 36px; }
  .footer-content { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 768px) {
  .hero { padding: 60px 0 50px 0; }
  .stats-container { gap: 16px; flex-wrap: wrap; }
  .stat-item { padding: 12px 20px; min-width: 140px; }
  .controls-wrapper { padding: 0 16px; }
  .controls-card { padding: 16px; }
  .tabs-container { gap: 6px; }
  .region-tab { padding: 8px 14px; font-size: 13px; }
  .hotel-grid { grid-template-columns: 1fr; gap: 16px; }
  .modal-card { max-height: 95vh; }
  .modal-body { padding: 20px; }
  .contact-actions { flex-direction: column; }
}
