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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: #ffffff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Elements */
.weather-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cloud {
  position: absolute;
  font-size: 60px;
  opacity: 0.6;
  animation: float 20s infinite ease-in-out;
}

.cloud1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.cloud2 {
  top: 30%;
  right: 15%;
  animation-delay: 5s;
}

.cloud3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 10s;
}

.sun {
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 80px;
  animation: rotate 30s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Header */
.header {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.time-display {
  text-align: right;
}

.time-label {
  font-size: 12px;
  opacity: 0.8;
  display: block;
  margin-bottom: 5px;
}

#clock {
  font-size: 28px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Container */
.container {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 40px;
}

.title-section {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 3em;
  font-weight: 700;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  animation: slideDown 0.8s ease;
}

.subtitle {
  font-size: 1.1em;
  opacity: 0.9;
  font-weight: 300;
  animation: fadeIn 1s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Method Selector */
.method-selector {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1.1em;
  padding: 10px 20px;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.radio-label:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.radio-label input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.radio-label span {
  font-weight: 500;
}

.input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  margin-bottom: 15px;
  border: none;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1em;
  transition: all 0.3s ease;
}

input[type="number"]::placeholder,
input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

button {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  background-color: #4caf50;
  color: #ffffff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1em;
  font-weight: bold;
  text-transform: uppercase;
}

button:hover {
  background-color: #45a049;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.weather-info {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-radius: 20px;
  padding: 30px;
  margin-top: 30px;
  display: none;
  animation: slideUp 0.5s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.weather-info h2 {
  margin-top: 0;
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 20px;
}

.weather-info p {
  margin: 15px 0;
  font-size: 1.1em;
  display: flex;
  align-items: center;
}

.weather-info p strong {
  margin-right: 10px;
  min-width: 150px;
}

.result {
  font-size: 1.5em;
  margin-right: 10px;
}

/* Loading Spinner Styles */
.loading-spinner {
  text-align: center;
  padding: 40px;
  margin-top: 30px;
  animation: fadeIn 0.3s ease;
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top: 5px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-spinner p {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 10px;
}

/* Info Section */
.info-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.info-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease;
}

.info-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.info-icon {
  font-size: 50px;
  margin-bottom: 15px;
}

.info-card h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: 600;
}

.info-card p {
  font-size: 0.95em;
  opacity: 0.9;
  line-height: 1.5;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px 20px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
  margin: 5px 0;
  font-size: 1em;
}

.footer-small {
  font-size: 0.85em;
  opacity: 0.8;
}


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

  .logo, #clock {
    font-size: 20px;
  }

  .header-content {
    justify-content: center;
    text-align: center;
  }

  .time-display {
    text-align: center;
  }

  .container {
    padding: 25px;
  }

  .cloud, .sun {
    font-size: 40px;
  }

  .info-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  input[type="number"],
  input[type="text"] {
    width: 100%;
  }

  .method-selector {
    gap: 15px;
  }

  .radio-label {
    font-size: 0.95em;
    padding: 8px 15px;
  }
}

/* Browse Locations Button */
.browse-section {
  text-align: center;
  margin: 25px 0;
}

.browse-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  max-width: 400px;
}

.browse-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8em;
  color: white;
}

.close-btn {
  font-size: 35px;
  color: white;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s;
}

.close-btn:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px 30px;
  max-height: calc(80vh - 100px);
  overflow-y: auto;
}

.search-bar {
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 15px 20px;
  border-radius: 25px;
  border: none;
  font-size: 1em;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.search-results {
  max-height: 500px;
  overflow-y: auto;
}

/* Search Result Items */
.search-result-item {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 15px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.result-city {
  font-size: 0.9em;
  opacity: 0.9;
  margin-bottom: 5px;
}

.result-locality {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 5px;
}

.result-code {
  font-size: 0.85em;
  opacity: 0.8;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 10px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 5px;
}

/* City Groups */
.city-group {
  margin-bottom: 15px;
}

.city-header {
  background: rgba(255, 255, 255, 0.2);
  padding: 15px 20px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.city-header:hover {
  background: rgba(255, 255, 255, 0.3);
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.city-localities {
  padding: 10px 0;
}

.locality-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  margin: 8px 0;
  margin-left: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.locality-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
  border-left-color: white;
}

.locality-code {
  float: right;
  font-family: monospace;
  opacity: 0.8;
  font-size: 0.9em;
}

.no-results {
  text-align: center;
  padding: 40px;
  font-size: 1.2em;
  opacity: 0.8;
}

/* Notification */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: rgba(76, 175, 80, 0.95);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* Scrollbar Styling */
.modal-body::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}