/* ============================
   Root Palette
============================ */
:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --border: #27272a;
  --text: #ffffff;
  --text-muted: #b5b5b5;
  --accent: #818cf8;
  --accent-strong: #666fc9;
  --danger: #ff4f4f;
  --danger-bg: rgba(255, 90, 90, 0.2);
}

/* ============================
   Base Reset & Typography
============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* width */
::-webkit-scrollbar {
  width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: transparent;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

html,
body {
  background: var(--bg);
  font-family: "Inter", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: none;
}

/* Container */
.container {
  width: min(1200px, 92%);
  margin: auto;
}

/* ============================
   Header
============================ */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
}

.logo svg {
  width: 22px;
}

/* ============================
   Hero
============================ */
.hero {
  text-align: center;
  padding: 40px 0 70px;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
}

.hero-strong {
  color: var(--accent);
}

.hero-sub {
  color: var(--text-muted);
  margin-top: 10px;
}

/* ============================
   Main Grid
============================ */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 30px;
  margin-bottom: 80px;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================
   Glass Card
============================ */
.card {
  padding: 22px;
  border-radius: 14px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 12px;
}

/* ============================
   Inputs
============================ */
.input-label {
  margin-top: 14px;
  display: block;
  font-weight: 500;
}

.input {
  margin-top: 6px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
}

.input:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 2px rgba(121, 85, 255, 0.3);
}

/* ============================
   PREVIEW AREA
============================ */

.preview-wrap {
  margin-top: 18px;
  min-height: 220px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Spinner */
.spinner {
  display: flex;
  gap: 7px;
}
.spinner.hidden {
  display: none;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-strong);
  animation: spinDot 0.9s infinite ease-in-out;
  opacity: 0.9;
}
.dot2 {
  animation-delay: 0.15s;
}
.dot3 {
  animation-delay: 0.3s;
}

@keyframes spinDot {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Error Box */
.error-box {
  display: flex;
  gap: 12px;
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  padding: 14px;
  border-radius: 8px;
  width: 100%;
}

.error-box.hidden {
  display: none;
}

.err-icon {
  font-size: 22px;
  color: var(--danger);
}

/* Image Preview */
.api-image-preview {
  width: 820px;
  height: 200px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.api-image-preview.hidden {
  display: none;
}

.api-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

/* ============================
   Buttons
============================ */
.btn {
  background: var(--bg);
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: 0.15s;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn:hover {
  background: #1f1f1f;
}

.btn.ghost {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  background: #1f1f1f;
}

.row {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Image URL box */
.image-url {
  margin-top: 10px;
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid #202020;
}

/* ============================
   Donate Section
============================ */
.donate-section .donate-options {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.donate-option {
  flex: 1;
  background: var(--bg);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: 0.2s;
}

/* Animated Icons */
.donate-icon {
  color: var(--accent);
  font-size: 30px;
  margin-bottom: 8px;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
}

.donate-btn {
  margin-top: 10px;
  display: inline-block;
  background: #101010;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  transition: 0.15s;
}

.donate-btn:hover {
  background: #313131;
}

/* Crypto */
.crypto-title {
  margin-top: 20px;
  margin-bottom: 10px;
}

.crypto-row {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.crypto-label {
  color: var(--accent);
  font-weight: 600;
  width: 40px;
}

.crypto-value {
  flex: 1;
  word-break: break-all;
  font-size: 13px;
  opacity: 0.9;
}

.crypto-copy {
  background: #222;
  border: 1px solid #333;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: 0.15s;
}

.crypto-copy:hover {
  background: #333;
}

/* ============================
   About Section
============================ */
.creator-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.creator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================
   Footer
============================ */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 25px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
