* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f0e17;
  --card: #1a1828;
  --accent: #e8c97e;
  --accent2: #c97eb0;
  --text: #fffffe;
  --muted: #a7a9be;
  --border: rgba(232, 201, 126, 0.15);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bg-blur {
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201, 126, 176, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 620px;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 36px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232, 201, 126, 0.1);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

h1 {
  font-family: 'lora', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px 36px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
  min-height: 240px;
}

.card:hover {
  transform: translateY(-3px);
}

.quote-icon {
  font-family: 'lora', serif;
  font-size: 6rem;
  line-height: 0.5;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: 28px;
  left: 32px;
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-style: italic;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 24px;
  padding-top: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.5s ease forwards;
}

.quote-author {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.1s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-new {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0f0e17;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
}

.btn-new:hover {
  background: #f0d890;
  transform: scale(1.02);
}

.btn-new:active {
  transform: scale(0.98);
}

.btn-icon {
  font-size: 1.1rem;
  display: inline-block;
  transition: transform 0.4s ease;
}

.btn-new:hover .btn-icon {
  transform: rotate(180deg);
}

.btn-copy {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(167,169,190,0.3);
  padding: 12px 20px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.btn-copy.copied {
  border-color: #7ecfa0;
  color: #7ecfa0;
}

.loader {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.loader.active {
  display: flex;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 0.6s infinite alternate;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  from { transform: translateY(0); opacity: 0.4; }
  to   { transform: translateY(-8px); opacity: 1; }
}

.error-msg {
  color: #e07070;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 16px;
  min-height: 20px;
}

footer {
  text-align: center;
  margin-top: 28px;
  font-size: 0.78rem;
  color: var(--muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}