/* style.css - Clean Blockquote Style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at 30% 10%, #0a0c12 0%, #03050b 100%);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.quote-card {
  max-width: 780px;
  width: 100%;
  background: rgba(18, 22, 35, 0.65);
  backdrop-filter: blur(12px);
  border-radius: 56px;
  border: 1px solid rgba(120, 100, 255, 0.2);
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(185, 150, 255, 0.1) inset;
  padding: 2rem;
  transition: all 0.2s ease;
}

.brand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.2rem;
  border-bottom: 1px dashed rgba(165, 145, 255, 0.3);
  padding-bottom: 0.85rem;
}

.site-name {
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #E0D4FF, #A889FF);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.handle {
  font-family: monospace;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.9rem;
  border-radius: 60px;
  color: #b9adff;
  border: 0.5px solid #3c2f70;
}

.quote-content {
  margin: 2rem 0 1.5rem;
}

.quote-text {
  font-size: 1.8rem;
  line-height: 1.45;
  font-weight: 500;
  transition: opacity 0.3s ease;
  color: #E0D4FF;
  letter-spacing: -0.01em;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  position: relative;
  padding: 0.5rem 0 0.5rem 1.8rem;
  border-left: 4px solid #a28eff;
}

/* Remove quote marks */
.quote-text::before,
.quote-text::after {
  content: none;
}

.hash-section {
  margin: 1.8rem 0 1rem;
  text-align: left;
}

.hashtag-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 18, 40, 0.7);
  backdrop-filter: blur(4px);
  padding: 0.7rem 1.6rem;
  border-radius: 60px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  font-family: monospace;
  border: 1px solid rgba(165, 140, 255, 0.5);
  transition: all 0.2s;
  color: #cdc3ff;
}

.hashtag-link:hover {
  background: #2c266b;
  border-color: #b89eff;
  transform: scale(1.02);
}

.trending-section {
  margin: 1.2rem 0 1rem;
  background: rgba(10, 8, 20, 0.5);
  border-radius: 28px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(165, 140, 255, 0.2);
}

.trending-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #a28eff;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  justify-content: space-between;
}

.trending-refresh {
  background: none;
  border: none;
  color: #a28eff;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 20px;
  transition: all 0.2s;
}

.trending-refresh:hover {
  background: rgba(165, 140, 255, 0.2);
  transform: rotate(180deg);
}

.trending-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.trending-list span {
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-family: monospace;
  color: #cdc3ff;
  border: 0.5px solid #4a3f8a;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.2rem 0 0.8rem;
}

.ctrl-btn {
  background: rgba(12, 10, 25, 0.75);
  border: 1px solid #40407a;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #e2d9ff;
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.ctrl-btn:hover {
  background: #312d66;
  border-color: #b194ff;
  transform: translateY(-2px);
}

.settings-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px dashed rgba(100, 80, 180, 0.3);
  border-bottom: 1px dashed rgba(100, 80, 180, 0.3);
}

.analytics-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: #8a7bcb;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 1.2rem;
  border-radius: 40px;
}

.analytics-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0 0.8rem;
}

.social-icon {
  background: rgba(20, 18, 40, 0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #cdc3ff;
  font-size: 1.4rem;
  transition: all 0.2s;
  border: 1px solid rgba(165, 140, 255, 0.3);
}

.social-icon:hover {
  background: #2c266b;
  color: white;
  transform: translateY(-3px);
}

.disclaimer {
  text-align: center;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.65rem;
  color: #5d569b;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.footnote {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: #5d569b;
  padding-top: 0.5rem;
}

@keyframes gentlePulse {
  0% { opacity: 0.7; transform: scale(0.99); }
  100% { opacity: 1; transform: scale(1); }
}

.quote-update {
  animation: gentlePulse 0.28s ease-out;
}

.toast-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c266b;
  color: white;
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 0.85rem;
  z-index: 1000;
  animation: fadeOut 2s ease forwards;
  pointer-events: none;
  font-family: monospace;
}

@keyframes fadeOut {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); visibility: hidden; }
}

@media (max-width: 560px) {
  .quote-card { padding: 1.5rem; }
  .quote-text { font-size: 1.55rem; padding-left: 1.2rem; }
  .button-group { gap: 0.6rem; }
  .ctrl-btn { padding: 0.45rem 0.9rem; font-size: 0.75rem; }
  .analytics-stats { font-size: 0.6rem; gap: 0.8rem; }
  .disclaimer { font-size: 0.55rem; }
}

/* ===== Imrando V2 additions ===== */
.quote-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  color: #665e9f;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.ctrl-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.ctrl-btn:disabled:hover {
  background: rgba(12, 10, 25, 0.75);
  border-color: #40407a;
  transform: none;
}

.footer-links {
  display: inline-block;
  margin-left: 0.6rem;
}

.footer-links a,
.about-card a:not(.ctrl-btn) {
  color: #8f82d2;
  text-decoration: none;
}

.footer-links a:hover,
.about-card a:not(.ctrl-btn):hover {
  text-decoration: underline;
}

.about-card h1,
.about-card h2 {
  color: #e0d4ff;
  margin-bottom: 0.8rem;
}

.about-card h1 { font-size: 2rem; }
.about-card h2 { font-size: 1rem; margin-top: 1.8rem; }
.about-card p {
  color: #a7a0c9;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.about-back { margin-top: 2rem; }

.image-size-modal[hidden] { display: none; }
.image-size-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.image-size-dialog {
  position: relative;
  width: min(520px, 100%);
  background: #101321;
  border: 1px solid rgba(165, 140, 255, 0.3);
  border-radius: 32px;
  padding: 1.6rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}

.image-size-dialog h2 { color: #e0d4ff; margin-bottom: 0.45rem; }
.image-size-dialog p { color: #8f89ae; font-size: 0.85rem; margin-bottom: 1.2rem; }
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  border: 0;
  background: transparent;
  color: #aaa2c7;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.image-size-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.size-btn {
  min-height: 100px;
  border: 1px solid #40407a;
  border-radius: 20px;
  background: rgba(12, 10, 25, 0.75);
  color: #e2d9ff;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.size-btn:hover { background: #312d66; border-color: #b194ff; transform: translateY(-2px); }
.size-btn strong { font-size: 1.15rem; }
.size-btn span { color: #8f89ae; font-size: 0.72rem; }
.modal-open { overflow: hidden; }

/* Hidden off-screen render stage: no visible capture modal during image generation. */
.capture-render-stage {
  position: fixed;
  left: -100000px;
  top: 0;
  pointer-events: none;
  opacity: 1;
  z-index: -1;
}
.capture-card {
  width: auto;
  max-width: none;
  min-width: 0;
  height: auto;
  background: linear-gradient(135deg, #080a12 0%, #1a1a2e 100%);
  border-radius: 48px;
  padding: 8% 9%;
  text-align: left;
  box-shadow: none;
  border: 1px solid rgba(165, 140, 255, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.capture-brand { font-size: clamp(34px, 4vw, 58px); }
.capture-id { font-family: monospace; color: #665e9f; font-size: 20px; letter-spacing: 0.12em; margin-bottom: 2%; }
.capture-quote { font-size: clamp(34px, 4.2vw, 64px); line-height: 1.35; color: #E0D4FF; margin: 5% 0; font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.capture-hashtag { font-family: monospace; font-size: clamp(25px, 2.5vw, 40px); color: #a28eff; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed rgba(165, 140, 255, 0.3); }
.capture-footer { margin-top: 5%; font-size: 18px; color: #5d569b; }

@media (max-width: 560px) {
  .image-size-options { grid-template-columns: 1fr; }
  .size-btn { min-height: 68px; flex-direction: row; justify-content: flex-start; padding: 0 1.2rem; }
  .footer-links { display: block; margin: 0.5rem 0 0; }
}
