/* 🌍 Base Light Mode */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  color: #333;
  margin: 0;
  padding: 0;
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin: 30px 15px;
  color: #003366;
  line-height: 1.3;
}

/* 🌙 Dark Mode */
body.dark-mode {
  background: #1e1e1e;
  color: #f5f5f5;
}
body.dark-mode h1 {
  color: #fff;
}

/* 🔹 Clock Grid */
.clock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1300px;
  margin: auto;
}

.clock-card {
  background: #fff;
  padding: 18px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.clock-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}
body.dark-mode .clock-card {
  background: #2b2b2b;
  color: #f5f5f5;
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

.city-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
}
.time-display {
  font-size: 1.4rem;
  font-weight: bold;
  color: #e63946;
}
body.dark-mode .time-display {
  color: #ff4d4d;
}

/* 🔹 Converter */
.converter {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.converter h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #003366;
}
.converter select,
.converter input {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.converter button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border: none;
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}
.converter button:hover {
  background: linear-gradient(135deg, #0056b3, #003d82);
  transform: scale(1.03);
}
.result {
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
  color: #333;
}

/* 🌙 Dark Mode for Converter */
body.dark-mode .converter {
  background: #2a2a2a;
}
body.dark-mode .converter h2 {
  color: #f5f5f5;
}
body.dark-mode .converter select,
body.dark-mode .converter input {
  background: #333;
  border: 1px solid #555;
  color: #f5f5f5;
}
body.dark-mode .converter button {
  background: #1e3a8a;
}
body.dark-mode .converter button:hover {
  background: #3b82f6;
}
body.dark-mode .result {
  color: #ccc;
}

/* 🔹 Back Button */
.back-home-wrapper {
  text-align: center;
  margin: 30px 0;
}
.back-home-button {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.back-home-button:hover {
  transform: scale(1.05);
}

/* 🌙 Dark Mode for Back Button */
body.dark-mode .back-home-button {
  background: linear-gradient(135deg, #7b2ff7, #f107a3);
}

/* ✅ Responsive Tweaks */
@media (max-width: 768px) {
  h1 {
    font-size: 1.6rem;
  }
  .converter {
    margin: 20px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
    margin: 20px 10px;
  }
  .clock-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }
  .clock-card {
    padding: 15px;
  }
  .converter {
    padding: 15px;
  }
  .converter button {
    font-size: 0.9rem;
  }
}
