@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #F4501E;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.background {
  width: 100%;
  padding: 30px 0;
}

.clock-container {
  background: #fff;
  border-radius: 20px;
  max-width: 960px;
  margin: auto;
  overflow: hidden;
  color: #111;
  display: flex;
  flex-direction: column;
  padding-bottom: 30px;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.logo img {
  width: 22px;
  height: 22px;
}
.header-actions {
  display: flex;
  gap: 8px;
}
.login { text-decoration: none; color:#111; }
.get-app {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
}

/* MAIN CLOCK */
.main-time-section {
  text-align: center;
  padding: 10px 0 20px;
}
.main-time { font-size: 120px; font-weight: 800; letter-spacing: -2px; }
.sun-info { font-size: 14px; color:#555; }
.time-mode { margin-top: 8px; }
.time-mode button {
  border: none; padding: 6px 14px; border-radius: 20px;
  margin: 0 4px; cursor:pointer; background:#eee;
}
.time-mode .active { background:#000; color:#fff; }

/* CITY SECTION */
.location { text-align:left; padding:20px 40px; }
.location h1 { margin:0; font-size:22px; }
.location-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.location-row p {
  font-size:12px; color:#666; margin-top:4px;
}
.add-city {
  background:#000; color:#fff;
  border:none; border-radius:8px;
  padding:8px 14px; font-size:13px; cursor:pointer;
  transition: background 0.3s;
}
.add-city:hover {
  background:#F4501E;
  color:#fff;
}

/* CITIES GRID */
.cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 0 20px;
}
.city-card {
  background: #f3f3f3;
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}
.city-card.active { background:#111; color:#fff; }
.city-card.day { background:#fffbe6; color:#333; }
.city-card.night { background:#f9f9f9; color:#333; }

.city-card h3 { margin:0; font-size:15px; font-weight:600; }
.city-card .time { font-size:26px; font-weight:700; margin:6px 0; }
.city-card .meta { font-size:12px; display:flex; justify-content:space-between; color:inherit; }

/* DELETE BUTTON */
.delete-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  color: #999;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}
.delete-btn:hover { color: red; }

/* انیمیشن نرم برای ثانیه‌شمار */
@keyframes tickPulse {
  0%   { transform: scale(1); opacity: 1; }
  40%  { transform: scale(1.1); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}
#main-time.tick {
  animation: tickPulse 0.4s ease-in-out;
}

/* دکمه تغییر فرمت ساعت */
.time-format-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 4px 10px;
  margin-left: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: 500;
}
.time-format-btn:hover {
  background: rgba(255,255,255,0.35);
}
