/* style.css - K-Vibe AI Travel & Mate Platform */
:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.5);
  --secondary: #f43f5e;
  --accent: #10b981;
  --bg-body: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: rgba(226, 232, 240, 0.8);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Effect */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  transition: var(--transition);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  height: 80vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #fae8ff 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Search Bar */
.search-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 50px;
  display: flex;
  gap: 10px;
}

.search-container input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 20px;
  font-size: 1rem;
  outline: none;
}

.search-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 40px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--primary-glow);
}

/* Trending Chips */
.trending-chips {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  padding: 8px 18px;
  background: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f5f3ff;
}

/* AI Planner Section */
.planner-section {
  background: white;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

.planner-card {
  padding: 30px;
  border-radius: var(--radius-lg);
}

.control-group {
  margin-bottom: 30px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-weight: 700;
}

.control-value {
  color: var(--primary);
}

/* Slider Styling */
input[type=range] {
  width: 100%;
  appearance: none;
  height: 6px;
  background: #e2e8f0;
  border-radius: 5px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid white;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.vibe-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vibe-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.vibe-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.generate-btn {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  color: white;
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 20px;
  transition: var(--transition);
}

.generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

/* AI Loading State */
#ai-loading {
  display: none;
  text-align: center;
  padding: 60px;
}

.loading-pulse {
  width: 100px;
  height: 100px;
  background: var(--primary-glow);
  border-radius: 50%;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(99, 102, 241, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.loading-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  height: 30px;
}

/* Timeline Styling */
.timeline-container {
  display: none;
  position: relative;
  padding: 40px 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
  transform: translateX(-50%);
}

.timeline-item {
  margin-bottom: 60px;
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border: 4px solid white;
}

.timeline-card {
  width: 45%;
  padding: 25px;
  border-radius: var(--radius-lg);
  position: relative;
}

.timeline-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 15px;
}

.badge-trending {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--secondary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tag-list {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-kpop { background: #fee2e2; color: #ef4444; }
.tag-food { background: #fef3c7; color: #d97706; }
.tag-culture { background: #dcfce7; color: #16a34a; }

.transport-info {
  position: absolute;
  left: 50%;
  bottom: -45px;
  transform: translateX(-50%);
  background: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  z-index: 20;
}

/* K-Pop & Goods Section */
.kpop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.kpop-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.kpop-card:hover {
  transform: translateY(-10px);
}

.kpop-card-img {
  height: 350px;
  position: relative;
}

.kpop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.d-day {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--secondary);
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.9rem;
}

.kpop-card-info {
  padding: 20px;
}

.stock-info {
  font-size: 0.8rem;
  color: var(--secondary);
  font-weight: 700;
  margin-top: 10px;
}

/* Mate Matching Board */
.mate-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.mate-card {
  padding: 25px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 20px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
}

.flag {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 1.2rem;
}

.mate-info h4 {
  margin-bottom: 5px;
}

.mate-tags {
  margin-top: 10px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mate-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 4px;
  color: var(--text-muted);
}

.apply-btn {
  margin-top: 15px;
  padding: 8px 15px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .planner-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.8rem; }
  .timeline-container::before { left: 30px; }
  .timeline-dot { left: 30px; }
  .timeline-item { justify-content: flex-start; padding-left: 60px; }
  .timeline-card { width: 100%; }
  .transport-info { left: 30px; transform: none; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
}

/* Accessible inputs and states for the live itinerary planner */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  background: #fff;
  font-size: 1rem;
}

.preference-controls label {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 5px;
  font-weight: 600;
}

.preference-controls output { color: var(--primary); font-variant-numeric: tabular-nums; }
.generate-btn:disabled { cursor: wait; opacity: .7; transform: none; }
#ai-loading:not([hidden]) { display: block; }
#timeline-box:not([hidden]) { display: block; }
.timeline-container { padding: 8px 0; }
.route-heading { margin: 8px 0 24px; }
.route-heading h2 { margin-bottom: 8px; }
.timeline-item.is-visible { display: flex; }
.timeline-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.timeline-card h3 { margin-bottom: 8px; }
.timeline-detail, .transit-info { margin-top: 10px; color: var(--text-muted); font-size: .9rem; }
.transit-info { border-top: 1px solid var(--border); padding-top: 10px; }
.tag { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: .75rem; font-weight: 800; }
.tag-food { background: #fff7ed; color: #c2410c; }
.tag-culture { background: #ecfdf5; color: #047857; }
.route-notes { margin: 24px 0 0 60px; padding: 22px; border-radius: var(--radius-md); }
.route-notes h3 { margin-bottom: 8px; }
.route-notes ul { padding-left: 20px; color: var(--text-muted); }
.route-notice { padding: 20px; border: 1px solid #fecaca; border-radius: var(--radius-md); color: #991b1b; background: #fff7f7; }
.sample-notice { grid-column: 1 / -1; color: var(--text-muted); font-size: .9rem; }
.mate-info h3 { margin-bottom: 6px; font-size: 1rem; }
.mate-info h3 span { display: block; color: var(--text-muted); font-size: .8rem; font-weight: 400; }
.apply-btn:disabled { cursor: not-allowed; opacity: .65; }

.unlock-card { padding: 20px; border: 1px solid #e2e8f0; border-radius: var(--radius-md); background: #f8fafc; }
.unlock-label { color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.unlock-card p { margin: 8px 0 10px; color: var(--text-muted); font-size: .92rem; }
.unlock-card small { display: block; margin-top: 9px; color: #64748b; font-size: .78rem; }
.generate-btn:disabled { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }
.free-routes-section { padding-top: 52px; }
.free-route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.free-route-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.free-route-top { display: flex; justify-content: space-between; gap: 10px; color: var(--primary); font-size: .78rem; font-weight: 800; }
.free-route-card h3 { margin: 12px 0 14px; font-size: 1.2rem; }
.free-route-card ol { padding-left: 20px; color: #334155; font-size: .9rem; }
.free-route-card li { margin: 0 0 12px; padding-left: 3px; }
.free-route-card time { display: inline-block; min-width: 48px; color: var(--primary); font-weight: 800; }
.free-route-note { margin: 8px 0 16px; padding: 12px; border-radius: 10px; background: #f8fafc; color: var(--text-muted); font-size: .8rem; }
.free-route-card a { margin-top: auto; color: var(--primary); font-weight: 800; text-decoration: none; }
.free-route-card a:hover { text-decoration: underline; }
@media (max-width: 900px) { .free-route-grid { grid-template-columns: 1fr; } }

/* Searchable editorial guide */
.guide-promo { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 72px auto; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.guide-promo h2 { margin: 5px 0; font-size: 1.7rem; }
.guide-promo p { max-width: 680px; color: var(--text-muted); }
.eyebrow { color: var(--primary); font-size: .76rem; font-weight: 800; letter-spacing: .1em; }
.article-page { background: #fff; }
.article-page #main-header { border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); }
.guide-article { max-width: 900px; padding-top: 28px; padding-bottom: 60px; }
.breadcrumbs { display: flex; gap: 10px; margin-bottom: 34px; color: var(--text-muted); font-size: .9rem; }
.breadcrumbs a, .source-list a { color: var(--primary); }
.article-header { max-width: 780px; margin: 0 auto 38px; }
.article-header h1 { margin: 12px 0 18px; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; letter-spacing: -.04em; }
.article-deck { color: var(--text-muted); font-size: 1.2rem; }
.article-byline { margin-top: 18px; color: var(--text-muted); font-size: .9rem; }
.article-content { max-width: 780px; margin: 0 auto; color: #273449; font-size: 1.06rem; line-height: 1.85; }
.article-content p, .article-content ul, .article-content ol { margin: 0 0 20px; }
.article-content h2 { margin: 42px 0 14px; color: var(--text-main); font-size: 1.65rem; line-height: 1.25; }
.article-content ul, .article-content ol { padding-left: 26px; }
.article-content li { margin: 0 0 10px; }
.guide-table-wrap { overflow-x: auto; margin: 20px 0 26px; }
.article-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 12px; text-align: left; vertical-align: top; }
.article-content th { background: #f8fafc; }
.editorial-note { padding: 16px; border-left: 4px solid var(--primary); background: #f8fafc; font-size: .94rem; }
.article-cta { max-width: 780px; margin: 36px auto 0; }
.site-footer { padding: 32px 0; background: var(--text-main); color: #fff; }
.site-footer a { color: #fff; font-weight: 800; }
.site-footer p { margin-top: 8px; color: #cbd5e1; font-size: .9rem; }

@media (max-width: 700px) {
  .guide-promo { align-items: flex-start; flex-direction: column; padding: 24px; }
  .guide-article { padding-top: 20px; }
  .article-content { font-size: 1rem; }
  .route-notes { margin-left: 0; }
}
