/* ====== Base styles ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
  padding: 20px;
}

/* Logo styling */
.logo {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 1000;
  animation: fadeIn 1s ease-out 0.3s forwards, float 3s ease-in-out infinite;
  margin: 20px auto;
  padding: 0 10px;
  max-width: 100%;
  word-wrap: break-word;
  opacity: 0;
}

.logo-title {
  font-family: 'Pacifico', cursive;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-color);
  line-height: 1.4;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.logo-subtitle {
  font-size: 1.3rem;
  color: var(--text-color);
  margin: 5px 0;
  font-weight: 500;
}

.logo-author {
  font-size: 1rem;
  color: var(--text-color);
}

.logo-author a {
  color: var(--text-color);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo-author a:hover {
  color: #007bff;
}

/* ==== Container ==== */
.container {
  background: var(--container-bg);
  padding: 30px 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* ==== Typography ==== */
h1 {
  margin-bottom: 20px;
  font-size: 2.5rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--primary-color);
}

.quote-box {
  margin-bottom: 25px;
}

#quote {
  font-size: 1.6rem;
  font-style: italic;
  margin-bottom: 15px;
  min-height: 90px;
  line-height: 1.4;
}

#author {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--secondary-color);
}

/* ==== Buttons ==== */
.buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

button {
  background-color: var(--primary-color);
  border: none;
  color: white;
  padding: 12px 22px;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

button img {
  width: 18px;
  height: 18px;
}

button:hover {
  background-color: var(--primary-color-dark);
}

button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* ==== Loader ==== */
#loader {
  margin-top: 20px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-color);
  user-select: none;
}

.hidden {
  display: none;
}

/* ==== Animations ==== */
.fade-in {
  animation: fadeInAnim 0.5s ease forwards;
}

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

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

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

/* ==== Light/Dark mode variables ==== */
:root {
  --bg-color: #f9f9f9;
  --text-color: #222;
  --primary-color: #007bff;
  --primary-color-dark: #0056b3;
  --secondary-color: #555;
  --container-bg: #fff;
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  --link-color: #007acc;
}

body.dark-mode {
  --bg-color: #121212;
  --text-color: #e1e1e1;
  --primary-color: #66b2ff;
  --primary-color-dark: #3399ff;
  --secondary-color: #bbb;
  --container-bg: #1e1e1e;
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  --link-color: #66ccff;
}

/* ==== Responsive ==== */
@media (max-width: 600px) {
  .container {
    padding: 25px 20px;
  }

  h1 {
    font-size: 1.8rem;
  }

  #quote {
    font-size: 1.3rem;
  }

  #author {
    font-size: 1rem;
  }

  button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .logo-title {
    font-size: 1.6rem;
  }

  .logo-subtitle {
    font-size: 1.1rem;
  }

  .logo-author {
    font-size: 0.95rem;
  }
}
