* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
  padding: 20px;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

.selector-container {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
  text-align: center;
}

.selector-container label {
  font-size: 1.1rem;
  font-weight: 600;
  margin-right: 15px;
  color: #667eea;
}

#city-select {
  padding: 12px 20px;
  font-size: 1rem;
  border: 2px solid #667eea;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 250px;
}

#city-select:hover {
  border-color: #764ba2;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#city-select:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.city-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.city-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.city-name {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 5px;
}

.country {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 20px;
}

.time {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin: 15px 0;
  font-family: "Courier New", monospace;
}

.date {
  font-size: 1.1rem;
  color: #666;
  margin-top: 10px;
}

.hidden {
  display: none;
}

#selected-city {
  margin-bottom: 30px;
}

#selected-city .city-info {
  text-align: center;
}

.home-link {
  display: inline-block;
  margin-bottom: 20px;
  padding: 10px 20px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s ease;
  font-weight: 600;
}

.home-link:hover {
  background: #764ba2;
}

footer {
  text-align: center;
  color: white;
  padding: 20px;
  margin-top: 40px;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .selector-container {
    padding: 20px;
  }

  .selector-container label {
    display: block;
    margin-bottom: 10px;
  }

  #city-select {
    width: 100%;
  }

  .cities-grid {
    grid-template-columns: 1fr;
  }

  .time {
    font-size: 2rem;
  }

  .city-name {
    font-size: 1.5rem;
  }
}

/* Animation for time update */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.time.updating {
  animation: pulse 0.5s ease;
}
