@import url("https://fonts.googleapis.com/css2?family=Cedarville+Cursive&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --background-light: linear-gradient(135deg, #ff416c, #2b5876);
  --background-dark: #2c3e50;
  --text-light: #333;
  --text-dark: #ecf0f1;
  --button-bg-light: #74b9ff;
  --button-bg-dark: #0984e3;
  --button-cat-bg-light: #ff7675;
  --button-cat-bg-dark: #d63031;
  --container-bg-light: rgba(255, 255, 255, 0.8);
  --container-bg-dark: rgba(44, 62, 80, 0.8);
}

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

body {
  font-family: "Cedarville Cursive", cursive;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--background-light);
  color: var(--text-light);
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: var(--background-dark);
  color: var(--text-dark);
}

.container {
  text-align: center;
  background: var(--container-bg-light);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  max-width: 800px;
  width: 100%;
  transition: background 0.3s, color 0.3s;
}

body.dark .container {
  background: var(--container-bg-dark);
}

h1 {
  margin-bottom: 20px;
  font-size: 24px;
}

.button-group {
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
  height: 3rem;
  font-size: 1.5rem;
}

#catButton {
  background: var(--button-cat-bg-light);
  color: #fff;
}

#catButton:hover {
  background: var(--button-cat-bg-dark);
}

#dogButton {
  background: var(--button-bg-light);
  color: #fff;
}

#dogButton:hover {
  background: var(--button-bg-dark);
}

#themeToggle {
  background: #95a5a6;
  color: #ecf0f1;
}

#themeToggle:hover {
  background: #95a5a6;
  color: #ecf0f1;
}

.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  position: relative;
}

#randomImage {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.loader {
  border: 16px solid #f3f3f3;
  border-top: 16px solid #3498db;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
  position: absolute;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive styles */

@media (max-width: 600px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 20px;
  }

  button {
    padding: 8px 16px;
  }

  .loader {
    width: 80px;
    height: 80px;
    border-width: 12px;
  }
}
