:root {
  --primary: #007aff;
  --secondary: #34c759;
  --bg-dark: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-hover: rgba(255, 255, 255, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Pretendard', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Dynamic background */
.bg-gradient {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.2), transparent 50%),
              radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.2), transparent 50%),
              url('https://images.unsplash.com/photo-1590518330805-4e899bdf4732?auto=format&fit=crop&w=2000&q=80') center/cover;
  filter: blur(10px) brightness(0.4);
  z-index: -1;
  transform: scale(1.1);
}

/* Trip Tabs */
.trip-tabs {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.trip-tab {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trip-tab:hover {
  background: var(--card-hover);
  color: var(--text-main);
  transform: translateY(-2px);
}

.trip-tab.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

body.jeju-theme .trip-tab.active {
  background: rgba(249, 115, 22, 0.25);
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

/* Jeju theme overrides */
body.jeju-theme .bg-gradient {
  background: radial-gradient(circle at 15% 50%, rgba(249, 115, 22, 0.2), transparent 50%),
              radial-gradient(circle at 85% 30%, rgba(34, 197, 94, 0.2), transparent 50%),
              url('https://images.unsplash.com/photo-1579169326371-b4c610adf8f5?auto=format&fit=crop&w=2000&q=80') center/cover;
  filter: blur(10px) brightness(0.4);
}

body.jeju-theme .header-content h1 span {
  background: linear-gradient(135deg, #f97316, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.jeju-theme .day-btn.active {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

body.jeju-theme .card-time {
  color: #f97316;
}

body.jeju-theme .timeline-item::before {
  background: #f97316;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

body.jeju-theme .timeline-area::before {
  background: linear-gradient(to bottom, #f97316, transparent);
}

body.jeju-theme .info-block {
  color: #f97316;
}

body.jeju-theme .transit-block h3 {
  color: #22c55e;
}

/* Tag badges for Jeju */
.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.tag-snorkeling {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.tag-backpacking {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.tag-food {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.tag-nature {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.tag-stay {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.tag-sightseeing {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
}

.tag-transit {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* Snorkeling tips box */
.tips-box {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.tips-box h3 {
  color: #38bdf8;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.tips-box ul {
  list-style: none;
  padding: 0;
}

.tips-box li {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.tips-box li::before {
  content: '🚿';
  position: absolute;
  left: 0;
}

.header {
  padding: 4rem 2rem 2rem;
  text-align: center;
}

.header-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.header-content h1 span {
  color: #38bdf8;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.dashboard-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  width: 250px;
  flex-shrink: 0;
}

.sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #e2e8f0;
}

#day-nav {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.day-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 1rem;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-btn::after {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
}

.day-btn:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

.day-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.day-btn.active::after {
  opacity: 1;
  transform: translateX(0);
}

/* Timeline */
.timeline-area {
  flex-grow: 1;
  position: relative;
  padding-left: 2rem;
}

.timeline-area::before {
  content: '';
  position: absolute;
  top: 1rem;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(to bottom, #38bdf8, transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: -2.35rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #38bdf8;
  border: 4px solid var(--bg-dark);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  z-index: 1;
}

.location-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.location-card:hover {
  background: var(--card-hover);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-time {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #38bdf8;
  min-width: 60px;
}

.card-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.card-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.card-transit {
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-thumb {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  margin-left: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Detail Panel */
.detail-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 450px;
  height: 100vh;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border);
  z-index: 100;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.detail-panel.open {
  right: 0;
}

.panel-header {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.panel-header h2 {
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #ef4444;
}

.panel-hero img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.panel-content {
  padding: 2rem;
  flex-grow: 1;
}

.info-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  color: #38bdf8;
  margin-bottom: 1rem;
}

.description {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #e2e8f0;
}

.transit-block {
  background: rgba(0,0,0,0.2);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.transit-block h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #818cf8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transit-summary {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.transit-detail {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.map-actions h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: #03c75a; /* Naver Green */
  color: white;
}

.btn-primary:hover {
  background: #02b351;
  box-shadow: 0 5px 15px rgba(3, 199, 90, 0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* Overlay for mobile/desktop */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
  }
  .sidebar { width: 100%; }
  .detail-panel { width: 100%; right: -100%; }
  
  .location-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .card-thumb {
    width: 100%;
    height: 150px;
    margin-left: 0;
    margin-top: 1rem;
  }
}
