@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

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

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

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  /* Removido opacity: 0 e transform para garantir visibilidade */
  opacity: 1;
  transform: translateY(0);
}

main {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.api-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Removido opacity: 0 e transform para garantir visibilidade */
  opacity: 1;
  transform: translateY(0);
}

.api-section h3 {
  color: #764ba2;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

input {
  padding: 0.8rem 1.2rem;
  border: 2px solid #e0e6ed;
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  min-width: 200px;
}

input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  transform: scale(1.02);
}

button {
  padding: 0.8rem 1.5rem;
  border: none;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.result {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 1.5rem;
  border-radius: 15px;
  margin-top: 1rem;
  color: white;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
  opacity: 1;
  transform: scale(1);
}

.user-card, .cep-card, .joke-card, .post-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  opacity: 1;
  transform: translateX(0);
  color: #333;
  animation: slideIn 0.5s ease-out;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-right: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.dog-image {
  max-width: 300px;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.dog-image:hover {
  transform: scale(1.05) rotate(2deg);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

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

.error {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  opacity: 1;
  transform: translateX(0);
  animation: slideIn 0.5s ease-out;
}

.success {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  border: 2px solid #00b894;
}

.floating {
  animation: float 3s ease-in-out infinite;
}

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

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { 
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); 
  }
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
  }
  
  input, button {
    width: 100%;
  }
  
  header h1 {
    font-size: 2rem;
  }
}