/* Reset default spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Elegant body background */
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(255,250,245,0.6), transparent),
              linear-gradient(135deg, #f7f8fb 0%, #eef3f8 100%);
  color: #222;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Header */
.site-header {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.site-header h1 {
  font-family: 'Playfair Display', 'Libre Baskerville', serif;
  font-size: 1.6rem;
  letter-spacing: 0.6px;
  color: #1b1b1b;
}

.tagline {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.85rem;
  color: #556;
  margin-top: 4px;
}

/* Quote box */
/* Quote box (centerpiece) */
.quote-area {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quote-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,250,0.96));
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(20,30,50,0.08), 0 2px 6px rgba(10,15,25,0.04);
  padding: 44px 42px;
  width: 100%;
  text-align: center;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.quote-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(20,30,50,0.12), 0 4px 12px rgba(10,15,25,0.06);
}

blockquote {
  margin: 0;
}

#quote-text {
  font-family: 'Playfair Display', 'Libre Baskerville', serif;
  font-size: 2.1rem;
  line-height: 1.18;
  font-weight: 400;
  color: #161619;
  font-style: italic;
  margin-bottom: 14px;
  opacity: 1;
  transition: opacity 260ms ease;
}

#quote-author {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #5a6470;
  font-weight: 600;
  opacity: 1;
  transition: opacity 260ms ease;
}

/* Controls */
.controls {
  margin-top: 26px;
}

.controls select {
  font-family: inherit;
  background: #f6f8fb;
  border: 1px solid #e6edf6;
  color: #2b3440;
  padding: 10px 14px;
  border-radius: 999px;
  margin-right: 10px;
  font-weight: 600;
  cursor: pointer;
}

.button-group {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
  justify-content: center;
}

.primary-btn {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(180deg, #3b82f6, #3469d9);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(52,105,217,0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-btn:hover {
  transform: translateY(-3px) scale(1.01);
  filter: brightness(1.03);
  box-shadow: 0 18px 36px rgba(52,105,217,0.18);
}

.primary-btn:active {
  transform: translateY(-1px) scale(0.995);
}

.control-btn {
  appearance: none;
  -webkit-appearance: none;
  background: #f8f9fa;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #f3f4f6;
  color: #3b82f6;
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.control-btn:active {
  transform: translateY(0);
}

.control-btn .icon {
  font-size: 1.2rem;
  line-height: 1;
}

.custom-area {
  margin-top: 18px;
  width: 100%;
  max-width: 720px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.custom-area textarea {
  flex: 1 1 auto;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e6edf6;
  font-family: inherit;
  font-size: 0.98rem;
  resize: vertical;
}

.custom-area input[type="text"] {
  width: 240px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6edf6;
  font-family: inherit;
}

/* Footer */
.site-footer {
  margin-top: 36px;
  font-size: 0.92rem;
  color: #8b94a0;
  text-align: center;
  opacity: 0.95;
}

/* Responsive layout */
/* Responsive tweaks */
@media (max-width: 880px) {
  .quote-box {
    padding: 34px 28px;
  }
  #quote-text {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  body { padding: 28px 16px; }
  .site-header { top: 18px; }
  .site-header h1 { font-size: 1.2rem; }
  #quote-text { font-size: 1.25rem; }
  .quote-box { padding: 22px; border-radius: 14px; }
  .controls button { width: 100%; padding: 12px; }
}
