body {
  background-image: url('https://i.pinimg.com/originals/77/85/31/7785314211f6cc70dde601ddcc4bd595.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

nav {
  align-self: flex-start;
  width: auto;
  margin: 20px 0 0 20px;
}

.container-fluid {
  justify-content: flex-start;
}

.flex-spacer {
  flex-grow: 1;
}

.transparent-container {
  background: linear-gradient(to bottom, 
                rgba(224, 173, 164, 0.35), 
                rgba(172, 184, 186, 0.35));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 40px;
  max-width: 650px;
  width: 85%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
  color: white;
  margin: 0 auto;
  margin-bottom: 60px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  align-self: center;
}

.transparent-container::after {
  display: none;
}

.place-info {
  position: absolute;
  top: 25px;
  left: 35px;
  text-align: left;
}

.city-name {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.weather-condition {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.condition-text {
  font-size: 18px;
  margin-right: 8px;
}

.condition-icon {
  width: 30px;
  height: 30px;
  margin-right: 15px;
}

.local-time {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  margin-left: 10px;
}

.local-time p {
  margin: 0;
}

.weather-details {
  margin-top: 100px;
  margin-bottom: 30px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.detail-item {
  width: 48%;
}

.detail-label {
  margin: 0;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  color: #FFE8CD;
}

.detail-value {
  margin: 0;
  font-size: 16px;
}

.temperature {
  position: absolute;
  bottom: 40px;
  right: 40px;
  text-align: right;
  display: flex;
  align-items: flex-start;
}

.temp-value {
  font-size: 64px;
  font-weight: bold;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.temp-value::after {
  content: "°C";
  font-size: 30px;
  vertical-align: top;
  position: relative;
  top: 8px;
  margin-left: 5px;
}

.form-control, .btn-outline-success {
  border: none;
  background-color: white;
  border-radius: 5px;
}

.form-control::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.btn-outline-success {
  color: rgba(0, 0, 0, 0.6);
  border-radius: 5px;
}

.btn-outline-success:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

.weather-container {
  position: relative;
  max-width: 650px;
  width: 85%;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.hover-indicator {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.hover-indicator svg {
  margin-left: 5px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(5px); }
}

.forecast-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, 
              rgba(224, 173, 164, 0.35), 
              rgba(172, 184, 186, 0.35));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 25px;
  margin-top: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
  box-sizing: border-box;
}

.weather-container:hover .forecast-panel {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

.weather-container:hover .hover-indicator {
  opacity: 0;
}

.forecast-container {
  display: flex;
  justify-content: space-between;
  overflow-x: auto;
  gap: 15px;
  padding: 10px 0;
}

.forecast-item {
  flex: 0 0 19%;
  min-width: 100px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.forecast-day {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 14px;
}

.forecast-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
}

.forecast-temp {
  font-size: 18px;
  font-weight: bold;
}

.forecast-condition {
  font-size: 12px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.9);
}

.forecast-loading {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: white;
}

body {
  padding-bottom: 250px;
}

@media (max-width: 768px) {
  .transparent-container, .forecast-panel {
    width: 92%;
    padding: 30px;
  }
  
  .city-name {
    font-size: 28px;
  }
  
  .condition-text {
    font-size: 16px;
  }
  
  .temp-value {
    font-size: 56px;
  }
  
  .temp-value::after {
    font-size: 26px;
  }
  
  .forecast-container {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
  }
  
  .forecast-item {
    flex: 0 0 auto;
    min-width: 90px;
  }
}

@media (max-width: 480px) {
  body {
    justify-content: flex-start;
    padding-top: 10px;
    padding-bottom: 100px;
  }
  
  nav {
    margin: 10px 0 0 10px;
    width: 100%;
  }
  
  .container-fluid {
    padding: 0 15px;
  }
  
  .form-control {
    width: 70%;
  }
  
  .transparent-container, .forecast-panel {
    width: 95%;
    padding: 25px 15px;
    border-radius: 10px;
  }
  
  .place-info {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 15px;
  }
  
  .city-name {
    font-size: 26px;
  }
  
  .weather-condition {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
  }
  
  .condition-text {
    font-size: 14px;
    margin-right: 8px;
    flex: 0 1 auto;
  }
  
  .condition-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    margin-right: 8px;
  }
  
  .local-time {
    flex: 0 0 auto;
    margin-left: 0;
    font-size: 14px;
  }
  
  .weather-details {
    margin-top: 15px;
    margin-bottom: 15px;
  }
  
  .detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }
  
  .detail-item {
    width: auto; /* Remove fixed width */
    min-width: 0; /* Allow shrinking */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    box-sizing: border-box;
    margin: 0;
    overflow: hidden; /* Prevent overflow */
  }
  
  .detail-label {
    display: block;
    width: 100%;
    font-size: 12px;
    margin-bottom: 3px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .detail-value {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .temperature {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .temp-value {
    font-size: 50px;
  }
  
  .temp-value::after {
    font-size: 24px;
    top: 6px;
  }
}

/* For even smaller screens */
@media (max-width: 350px) {
  .transparent-container {
    padding: 20px 12px;
  }
  
  .city-name {
    font-size: 22px;
  }
  
  .condition-text {
    font-size: 12px;
  }
  
  .condition-icon {
    width: 20px;
    height: 20px;
  }
  
  .local-time {
    font-size: 12px;
  }
  
  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .detail-item {
    padding: 8px 6px;
  }
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.mobile-view .forecast-panel {
  transform: translateY(0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-view .forecast-panel.mobile-visible {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

.mobile-view .hover-indicator {
  display: none;
}

/* Permission modal styling */
.permission-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.permission-modal.visible {
  opacity: 1;
}

.permission-dialog {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.permission-modal.visible .permission-dialog {
  transform: translateY(0);
}

.permission-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 10px;
}

.permission-icon {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}

.permission-body {
  margin-bottom: 20px;
  color: #333;
}

.permission-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid #ccc;
  color: #333;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}
