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

:root{
  --primary-color:#c38af8;
  --secondary-color:#e8eaed;
  --tertiary-color:#9aa0a6;
  --bg-color:#2a2836;
  --footer-height:72px;
}

*{box-sizing:border-box}

html,body{height:100%}

body{
  margin:0;
  background:var(--bg-color);
  color:var(--secondary-color);
  font-family:'Quicksand',sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  padding:2rem 1rem;
}

header h1{
  margin:0;
  font-size:2rem;
  color:var(--secondary-color);
  text-align:center;
  font-weight:600;
}

.search-group{
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  align-items:center;
  background:rgba(255,255,255,0.02);
  padding:0.6rem;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,0.45);
}

.search-row{
  display:flex;
  gap:0.75rem;
  align-items:center;
}

.random-row{display:flex;justify-content:center;width:100%}

header input{
  padding:0.6rem 1rem;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.06);
  background:transparent;
  color:var(--secondary-color);
  font-size:1rem;
  min-width:420px;
}

header input::placeholder{color:var(--tertiary-color);font-weight:300}

#botao-busca, #random{
  padding:0.6rem 1rem;
  border-radius:12px;
  border:none;
  cursor:pointer;
  background:var(--primary-color);
  color:var(--bg-color);
  font-weight:600;
  box-shadow:0 6px 18px rgba(195,138,248,0.16);
}

#botao-busca:hover, #random:hover{transform:translateY(-2px)}

#botao-busca:active, #random:active{transform:scale(0.98)}

main{
  max-width:80rem;
  margin:2rem auto;
  padding:1rem;
  padding-bottom:calc(var(--footer-height) + 1rem);
}

.card-container{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:1rem;
}

article.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:12px;
  padding:1rem;
  box-shadow:0 8px 24px rgba(0,0,0,0.45);
  transition:transform 0.18s ease, box-shadow 0.18s ease;
  border:1px solid rgba(255,255,255,0.04);
}

article.card:hover{transform:translateY(-6px);box-shadow:0 18px 40px rgba(0,0,0,0.6)}

article.card h2{margin:0 0 0.4rem 0;color:var(--primary-color);font-size:1.2rem}

article.card p{margin:0.25rem 0;color:var(--secondary-color);line-height:1.4}

article.card a{color:var(--primary-color);text-decoration:none;font-weight:600}

.footer{
  position:fixed;
  left:0;
  bottom:0;
  width:100%;
  height:var(--footer-height);
  display:flex;
  justify-content:center;
  align-items:center;
  padding:0.75rem 1rem;
  background:rgba(42,40,54,0.95);
  color:var(--tertiary-color);
  z-index:100;
  border-top:1px solid rgba(255,255,255,0.04);
  backdrop-filter:blur(6px);
}

.footer-links{list-style:none;display:flex;gap:1rem;padding:0;margin:0}
.footer-links li{margin:0}
.footer-links a{color:var(--secondary-color);text-decoration:none;padding:0.25rem 0.5rem;border-radius:8px;transition:background 0.15s,transform 0.12s}
.footer-links a:hover{background:rgba(195,138,248,0.08);transform:translateY(-2px)}

@media (max-width:768px){
  header h1{font-size:1.5rem}
  .search-group{width:95vw;justify-content:center}
  header input{min-width:60%}
  .card-container{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
}

@media (max-width:480px){
  header{padding:1rem}
  header h1{font-size:1.2rem}
  header input{min-width:55%}
  main{margin:1rem}
}
