Untitled

 avatar
unknown
plain_text
9 months ago
6.2 kB
12
Indexable
* {
  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;
  color: #333;
}
 
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
 
.header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}
 
.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
 
.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}
 
.main-content {
  display: grid;
  gap: 30px;
}
 
.search-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
 
.input-group {
  display: flex;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
}
 
#cep-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
 
#cep-input:focus {
  outline: none;
  border-color: #667eea;
}
 
#search-btn {
  padding: 15px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
 
#search-btn:hover {
  transform: translateY(-2px);
}
 
#search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
 
.loading {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
 
.loading i {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 15px;
}
 
.error-message {
  background: #fee;
  border: 2px solid #fcc;
  color: #c33;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}
 
.error-message i {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
 
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
 
.location-card,
.weather-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
 
.location-card h2,
.weather-card h2 {
  color: #667eea;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
 
.location-info p {
  margin-bottom: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
 
.location-info p:last-child {
  border-bottom: none;
}
 
.favorite-btn {
  width: 100%;
  padding: 12px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
 
.favorite-btn:hover {
  background: #ff5252;
}
 
.favorite-btn.favorited {
  background: #4caf50;
}
 
.favorite-btn.favorited i {
  color: #fff;
}
 
.weather-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}
 
.weather-icon img {
  width: 80px;
  height: 80px;
}
 
.weather-temp {
  font-size: 3rem;
  font-weight: bold;
  color: #667eea;
}
 
.weather-desc {
  font-size: 1.2rem;
  color: #666;
  text-transform: capitalize;
}
 
.weather-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}
 
.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  text-align: center;
}
 
.detail-item i {
  font-size: 1.5rem;
  color: #667eea;
  margin-bottom: 8px;
}
 
.history-section,
.favorites-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
 
.history-section h2,
.favorites-section h2 {
  color: #667eea;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
 
.history-list,
.favorites-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
 
.history-item,
.favorite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}
 
.history-item:hover,
.favorite-item:hover {
  background: #e9ecef;
}
 
.item-info {
  flex: 1;
}
 
.item-info strong {
  color: #667eea;
}
 
.item-actions {
  display: flex;
  gap: 10px;
}
 
.item-actions button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: color 0.3s ease;
}
 
.item-actions button:hover {
  color: #667eea;
}
 
.clear-btn {
  width: 100%;
  padding: 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s ease;
}
 
.clear-btn:hover {
  background: #c82333;
}
 
.empty-message {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}
 
.hidden {
  display: none !important;
}
 
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
 
  .header h1 {
    font-size: 2rem;
  }
 
  .input-group {
    flex-direction: column;
  }
 
  .weather-main {
    flex-direction: column;
    text-align: center;
  }
 
  .weather-temp {
    font-size: 2.5rem;
  }
 
  .results {
    grid-template-columns: 1fr;
  }
 
  .weather-details {
    grid-template-columns: 1fr;
  }
 
  .history-item,
  .favorite-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
 
  .item-actions {
    align-self: flex-end;
  }
}
 
@media (max-width: 480px) {
  .search-section {
    padding: 20px;
  }
 
  .location-card,
  .weather-card {
    padding: 20px;
  }
 
  .weather-details {
    grid-template-columns: repeat(2, 1fr);
  }
}
Editor is loading...
Leave a Comment