:root {
  --primary: #d4af37; /* Elegant Gold */
  --bg-color: #0d1117;
  --text-main: #fcfcfc;
  --text-muted: #d0d0d0;
  --card-bg: rgba(20, 20, 25, 0.75);
  --border-radius: 12px;
  --transition: 0.4s ease;
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  min-height: 100vh;
  position: relative;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('background.png') no-repeat center center/cover;
  z-index: -2;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(26, 26, 26, 0.4) 0%, rgba(15, 15, 15, 0.8) 100%);
  z-index: -1;
}

.transparent-nav {
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.container {
  padding: 100px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero-title {
  text-align: center;
  font-family: 'Noto Serif JP', serif;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 15px rgba(212, 175, 55, 0.3);
  letter-spacing: 0.05em;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(212, 175, 55, 0.8); }
  100% { box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
}

#btn-near-me {
  animation: pulseGlow 2s infinite ease-in-out;
}

.search-section {
  width: 100%;
  max-width: 800px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}
.form-group.full-width {
  flex: 100%;
}

.form-group label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-group input {
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.6);
}

.btn-search {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--primary);
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-search:hover {
  background: #f0c950;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin-top: 8px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 480px; /* Slightly taller for comfort */
}

.mega-menu.hidden {
  display: none;
}

.mega-menu-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
  flex-shrink: 0; /* Keep tabs from shrinking/clipping */
  -webkit-overflow-scrolling: touch;
}

.mega-menu-tab {
  padding: 1rem 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.mega-menu-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mega-menu-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(212, 175, 55, 0.05);
}

.mega-menu-content {
  padding: 1.5rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.pref-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pref-title {
  font-size: 1rem;
  color: #fff;
  font-weight: bold;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 0.3rem;
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.pref-title:hover {
  color: var(--primary);
}

.area-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.area-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  padding: 0.2rem 0;
}

.area-item:hover {
  color: var(--primary);
  padding-left: 5px;
}

.rooms-config-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}
.section-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: bold;
}
.rooms-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.room-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.05);
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}
.room-label {
  font-weight: bold;
  min-width: 60px;
  color: var(--text-main);
}
.btn-secondary {
  padding: 0.8rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px dashed rgba(255,255,255,0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  align-self: flex-start;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}
.btn-remove-room {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0 0.5rem;
  transition: 0.2s;
}
.btn-remove-room:hover {
  transform: scale(1.1);
}

.results-section {
  width: 100%;
  max-width: 1200px;
  margin-top: 4rem;
}

.results-section h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.5rem;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hotel-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.hotel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-color: rgba(212, 175, 55, 0.4);
}
.hotel-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}
.hotel-card a {
  display: inline-block;
  margin-top: 1rem;
  color: #1a1a1a;
  background: var(--primary);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
}
.hotel-card a:hover {
  background: #f0c950;
}
.position-relative {
  position: relative;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  list-style: none;
  margin-top: 4px;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  z-index: 999; /* Higher than mega-menu (100) to ensure visibility */
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.suggestions-list li {
  padding: 0.8rem 1rem;
  color: var(--text-main);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.suggestions-list li:last-child {
  border-bottom: none;
}

.suggestions-list li:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

.hidden { display: none; }

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: #fff;
  font-size: 0.9rem;
}
.custom-checkbox input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .transparent-nav {
    padding: 1rem;
    justify-content: center;
  }
  .container {
    padding: 80px 10px 20px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .search-section {
    padding: 1.5rem;
  }
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  .form-group {
    width: 100%;
  }
  .room-row {
    flex-wrap: wrap;
  }
  .hotel-card {
    padding: 1rem;
  }
  .mega-menu-content {
    grid-template-columns: 1fr;
  }
}

/* Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(20, 20, 25, 0.85);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background-color 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.back-to-top-btn:hover {
  background: var(--primary);
  color: #1a1a1a;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.back-to-top-btn:active {
  transform: translateY(-1px);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.btn-quick-date {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.btn-quick-date:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Search History Styling */
.search-history-section {
  padding: 1rem 1.5rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.search-history-section.hidden {
  display: none;
}
.history-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 500;
}
.search-history-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.history-tag {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  backdrop-filter: blur(5px);
}
.history-tag:hover {
  background: var(--primary);
  color: #1a1a1a;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}
.clear-history-btn {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.clear-history-btn:hover {
  background: rgba(255, 107, 107, 0.1);
  color: #ff8787;
  text-decoration: underline;
}



