:root {
  --primary: #ff6b6b;
  --secondary: #4ecdc4;
  --background: #f5f5f5;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  height: 100vh;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: manipulation;
}

.container {
  width: 100%;
  max-width: 600px;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.joke-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  width: 85%;
  min-height: 200px;
  margin-top: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
}

.joke-card.loading::after {
  content: "🤪";
  font-size: 2.5rem;
  position: absolute;
  animation: loading 1s infinite;
}
.joke-card.loading .joke-text {
  display: none;
}

.joke-card.loading::before {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  position: absolute;
  animation: spin 1s linear infinite;
}

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

@keyframes loading {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

.joke-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #333;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.joke-text.show {
  opacity: 1;
  transform: translateY(0);
}

.fab {
  position: fixed;
  bottom: 2rem;
  background: var(--primary);
  border-radius: 20px;
  padding: 15px;
  border: none;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.footer {
  position: fixed;
  bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .joke-card {
    width: 90%;
    min-height: 160px;
    padding: 1.5rem;
  }

  .joke-text {
    font-size: 1.2rem;
  }
}
