/* Main Screen Specifics (SCR-02) */
.main-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
  width: 100%;
}

.nav-brand {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-profile i {
  font-size: 36px;
  color: var(--color-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.nav-profile i:hover {
  transform: scale(1.1);
  color: var(--color-accent);
}

.dashboard-scroll-area {
  flex: 1;
  width: 100%;
  padding: 0 32px;
  overflow-y: auto;
  padding-bottom: 100px;
}

.section-heading {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.empty-trip-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
}

.empty-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-icon-circle i {
  font-size: 32px;
  color: var(--color-secondary);
}

.empty-trip-state h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-trip-state p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  border: none;
  box-shadow: 0 10px 30px rgba(var(--hue-primary), 80%, 50%, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.fab i {
  font-size: 32px;
}

.fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(var(--hue-accent), 80%, 50%, 0.6);
}

/* Modal UI */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-content {
  width: 90%;
  max-width: 480px;
  padding: 32px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
}

.btn-close-modal {
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: var(--color-accent);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.input-row {
  display: flex;
  gap: 16px;
}

.input-group label {
  font-size: 14px;
  color: var(--text-secondary);
}

.input-group input {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
}

.input-group input:focus {
  border-color: var(--color-primary);
}

.btn-create {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  color: white;
  font-size: 16px;
}

/* Detail Planner Screen Specifics (SCR-06) */
#detail-screen {
  display: flex;
  flex-direction: column;
}

.detail-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  z-index: 10;
  margin: 16px;
}

.btn-back {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
  transition: color 0.3s;
}

.btn-back:hover {
  color: var(--color-primary);
}

.detail-trip-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  overflow: hidden;
}

/* Responsive Centered Layout */
@media (min-width: 768px) {
  .detail-top-nav {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  .map-view-placeholder {
    margin: 32px 16px 32px 32px;
  }
}

/* 지도 영역 제거 (사용자 요청: 상세화면에서 지도 숨김) */
#map-view {
  display: none !important;
}

/* 상세 화면 스크롤 정상화: 모바일 및 웹 배포 대응 */
.detail-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 70px);
  overflow: hidden;
}

#day-tabs-container {
  flex-shrink: 0;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid var(--glass-border);
}

.timeline-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 80px 16px;
}

/* Detail Top Nav Mobile Fix */
.detail-top-nav {
  padding: 12px 16px;
  gap: 8px;
  overflow: hidden;
}

.detail-trip-title {
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav-extra {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* 모바일에서 네비게이션 버튼 텍스트 숨기기 (공간 확보) */
@media (max-width: 480px) {
  .nav-extra .btn span,
  .nav-extra .btn-premium font {
    display: none !important;
  }
  .nav-extra .btn, .nav-extra .btn-premium {
    padding: 8px !important;
    min-width: 40px;
  }
}

/* FAB Extra & AI Buttons Stabilization */
.timeline-header {
  flex-wrap: wrap;
  gap: 12px;
}

/* Search/AI Card Overflow Protection */
.ai-recommend-card h5,
.ai-recommend-card p,
.search-result-item strong,
.search-result-item small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

@media (max-width: 480px) {
  .ai-recommend-card h5,
  .ai-recommend-card p,
  .search-result-item strong,
  .search-result-item small {
    max-width: 180px;
  }
}

#fullscreen-map-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #000;
}

.fab-btn {
  position: fixed;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: var(--color-secondary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  z-index: 50;
}

@media (max-width: 768px) {
  .ai-recommend-card h5,
  .search-result-item strong {
    max-width: 150px;
  }
}
