/* =====================
   WorldTime — Global CSS
   ===================== */

/* 상단 내 시간 배너 */
.wt-my-time-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.wt-my-time-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.wt-my-time-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.wt-my-time-city {
  font-size: 0.85rem;
  color: #6366f1;
  font-weight: 600;
}
.wt-my-time-digital {
  font-size: 2rem;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
}
.wt-my-time-date {
  font-size: 0.875rem;
  color: #94a3b8;
}
.wt-my-time-utc {
  margin-left: auto;
  text-align: right;
}
.wt-utc-clock {
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.wt-utc-label {
  font-size: 0.7rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 탭 */
.wt-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 0.25rem;
  flex-wrap: wrap;
}
.wt-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.wt-tab-btn:hover {
  color: #94a3b8;
  background: rgba(99,102,241,0.05);
}
.wt-tab-btn.active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

/* 필터 바 */
.wt-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.wt-search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.wt-search-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: 0.875rem;
}
.wt-search {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.25rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}
.wt-search:focus {
  outline: none;
  border-color: #6366f1;
}
.wt-search::placeholder {
  color: #475569;
}
.wt-continent-btns {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.wt-continent-btn {
  padding: 0.45rem 0.8rem;
  border: 1px solid #1e293b;
  background: #0f172a;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.wt-continent-btn:hover {
  border-color: #6366f1;
  color: #a5b4fc;
}
.wt-continent-btn.active {
  background: rgba(99,102,241,0.15);
  border-color: #6366f1;
  color: #a5b4fc;
}

/* 도시 카운트 */
.wt-city-count {
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 0.75rem;
}

/* 카드 그리드 */
.wt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

/* 도시 카드 */
.wt-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 1rem;
  transition: all 0.2s;
  position: relative;
  cursor: default;
}
.wt-card:hover {
  border-color: rgba(99,102,241,0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.wt-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.wt-card-city-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wt-card-flag {
  font-size: 1.5rem;
  line-height: 1;
}
.wt-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
}
.wt-card-country {
  font-size: 0.72rem;
  color: #64748b;
}
.wt-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #334155;
  transition: all 0.2s;
  padding: 0.1rem 0.2rem;
  line-height: 1;
}
.wt-fav-btn:hover, .wt-fav-btn.active {
  color: #f59e0b;
  transform: scale(1.2);
}

/* 아날로그 시계 */
.wt-analog-wrap {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}
.wt-analog {
  width: 90px;
  height: 90px;
}

/* 디지털 시간 */
.wt-digital {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.wt-date-str {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.wt-date-diff {
  color: #f59e0b;
  font-size: 0.7rem;
}

/* 배지 영역 */
.wt-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.wt-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 100px;
  font-weight: 500;
  white-space: nowrap;
}
.wt-badge-utc {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.3);
}
.wt-badge-dst {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.3);
}
.wt-badge-day { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.wt-badge-night { background: rgba(99,102,241,0.1); color: #818cf8; border: 1px solid rgba(99,102,241,0.25); }

/* 일출/일몰 */
.wt-sun-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: #64748b;
}
.wt-sun-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.wt-sun-icon { font-size: 0.8rem; }

/* 내 시간과 시차 */
.wt-my-diff {
  text-align: center;
  font-size: 0.7rem;
  color: #475569;
  margin-top: 0.4rem;
  border-top: 1px solid #1e293b;
  padding-top: 0.4rem;
}
.wt-my-diff span {
  color: #6366f1;
  font-weight: 600;
}

/* ========================
   시차 계산기 탭
   ======================== */
.wt-section {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 1.5rem;
}
.wt-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}
.wt-section-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}
.wt-diff-selects {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.wt-diff-vs {
  font-size: 1.2rem;
  color: #475569;
  text-align: center;
}
.wt-city-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 0.875rem;
}
.wt-city-select:focus {
  outline: none;
  border-color: #6366f1;
}
.wt-diff-result-box {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  display: none;
}
.wt-diff-result-box.show { display: block; }
.wt-diff-hours {
  font-size: 2.5rem;
  font-weight: 800;
  color: #6366f1;
}
.wt-diff-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}
.wt-diff-times {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.wt-diff-city-time {
  text-align: center;
}
.wt-diff-city-name {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.wt-diff-city-clock {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

/* ========================
   회의 플래너 탭
   ======================== */
.wt-planner-cities {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  min-height: 40px;
  background: #1e293b;
  border-radius: 10px;
  padding: 0.5rem;
}
.wt-planner-city-tag {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  padding: 0.25rem 0.6rem 0.25rem 0.75rem;
  font-size: 0.8rem;
  color: #a5b4fc;
}
.wt-planner-city-tag button {
  background: none;
  border: none;
  color: #6366f1;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  line-height: 1;
}
.wt-planner-add-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.wt-planner-add-row select {
  flex: 1;
}
.wt-btn {
  padding: 0.6rem 1.25rem;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.wt-btn:hover { background: #4f46e5; }
.wt-btn-secondary {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
}
.wt-btn-secondary:hover { background: #334155; color: #e2e8f0; }

/* 플래너 결과 */
.wt-planner-result {
  display: none;
}
.wt-planner-result.show { display: block; }
.wt-planner-grid-header {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
  padding-left: 100px;
}
.wt-hour-label {
  flex: 1;
  text-align: center;
  font-size: 0.65rem;
  color: #475569;
}
.wt-planner-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.wt-planner-row-label {
  width: 100px;
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.wt-planner-cell {
  flex: 1;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 600;
}
.wt-cell-great { background: rgba(34,197,94,0.2); color: #4ade80; }
.wt-cell-ok { background: rgba(234,179,8,0.15); color: #facc15; }
.wt-cell-bad { background: rgba(239,68,68,0.1); color: #475569; }
.wt-planner-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: #64748b;
  flex-wrap: wrap;
}
.wt-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.wt-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ========================
   시간 변환기 탭
   ======================== */
.wt-conv-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.wt-conv-label {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.wt-time-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 0.875rem;
}
.wt-time-input:focus {
  outline: none;
  border-color: #6366f1;
}
.wt-conv-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: #1e293b;
  padding: 0.5rem;
  border-radius: 10px;
  min-height: 40px;
}
.wt-conv-result {
  display: none;
}
.wt-conv-result.show { display: block; }
.wt-conv-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wt-conv-city-name {
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wt-conv-time-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}
.wt-conv-date-note {
  font-size: 0.7rem;
  color: #f59e0b;
}

/* 없는 결과 */
.wt-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #475569;
  font-size: 0.875rem;
}

/* 반응형 */
@media (max-width: 640px) {
  .wt-my-time-digital { font-size: 1.6rem; }
  .wt-diff-selects { grid-template-columns: 1fr; }
  .wt-diff-vs { display: none; }
  .wt-conv-top { grid-template-columns: 1fr; }
  .wt-tabs { gap: 0.15rem; }
  .wt-tab-btn { font-size: 0.78rem; padding: 0.5rem 0.6rem; min-width: 0; }
  .wt-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
