*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px;
}

.app-header {
  max-width: 800px;
  text-align: center;
  margin-bottom: 32px;
}

.app-header h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  align-items: baseline;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
}

.app-description {
  margin: 0;
  color: #9ca3af;
  font-size: 0.95rem;
}

.calendar-container {
  margin-top: 20px;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.calendar-title {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.calendar-year {
  font-size: 0.8rem;
  color: #9ca3af;
}

.calendar-month {
  font-size: 1rem;
  font-weight: 600;
}

.calendar-nav {
  border: none;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav:hover {
  background: #0f172a;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 0.7rem;
  color: #9ca3af;
}

.calendar-weekdays span {
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 2px;
}

.calendar-cell {
  width: 32px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #e5e7eb;
}

.calendar-cell.empty {
  cursor: default;
}

.calendar-cell:not(.empty):hover {
  background: rgba(51, 65, 85, 0.9);
}

.calendar-cell.selected {
  background: #38bdf8;
  color: #020617;
  font-weight: 600;
}

.calendar-cell.today {
  border: 1px solid rgba(56, 189, 248, 0.7);
}

.timezones {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timezone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.timezone-row.dragging {
  background: rgba(30, 64, 175, 0.8);
}

.timezone-label {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timezone-name {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.timezone-offset {
  font-size: 0.8rem;
  color: #9ca3af;
}

.timezone-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f2933, #111827);
  overflow: hidden;
}

.track::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    90deg,
    rgba(248, 250, 252, 0.2) 1px,
    transparent 1px
  );
  background-size: calc(100% / 24) 100%;
  opacity: 0.4;
  pointer-events: none;
}

.handle {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.8),
    0 10px 20px rgba(56, 189, 248, 0.4);
  cursor: grab;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.handle:active {
  cursor: grabbing;
  background: #0ea5e9;
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.9),
    0 14px 28px rgba(56, 189, 248, 0.6);
}

.time-display {
  align-self: flex-end;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.date-display {
  align-self: flex-end;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: #9ca3af;
}

@media (max-width: 640px) {
  .timezone-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timezone-label {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .time-display {
    align-self: flex-start;
  }

  .date-display {
    align-self: flex-start;
  }
}

