/* css reset */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* end of css reset */

* {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #0E0514;
  padding: 1rem;
  opacity: 1;
  background-image: radial-gradient(#271732 0.8500000000000001px, #0E0514 0.8500000000000001px);
  background-size: 17px 17px;
  width: 100%;
  height: 100vh;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 2rem;
}

button {
  cursor: pointer;
}

.gif-container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  width: 450px;
  height: 450px;
  border: 5px solid;
  border-image-slice: 1;
  border-image-source: linear-gradient(0deg,rgba(82, 0, 103, 1) 0%, rgba(246, 83, 98, 1) 100%);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

img {
  max-height: 100%;
}

.refresh-btn {
  position: absolute;
  background: #f65362;
  color: white;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  aspect-ratio: 1;
  padding: 0.4rem;
  bottom: 1rem;
  right: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  transition: all 200ms ease-out;
}

.refresh-btn:hover {
  transform: rotate(180deg);
}

.search {
  display: flex;
  gap: 1rem;
  width: 450px;
  height: 3rem;
}

.search-btn {
  height: 100%;
  aspect-ratio: 1;
  background: #873097;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.7rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.search-input {
  flex: 1;
  color: #222;
  font-size: 1.2rem;
  padding: 1rem;
  border: none;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.search-input:focus-visible {
  outline: none;
  box-shadow: 0 0 4px 2px #f65362;
}

footer {
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.credit {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.115);
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

.credit a {
  color: white;
  font-size: 1rem;
  display: flex;
  text-wrap: nowrap;
  gap: 0.3rem;
  text-decoration: none;
  font-weight: bold;
}

.credit a:hover {
  color: #f65362;
}

.credit svg {
  width: 1.5rem;
}

.giphy-attribution a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-underline-offset: 0.2rem;
  color: white;
}

.giphy-attribution img {
  height: 2.5rem;
  width: auto;
}