:root {
  --bg-primary: #0B1022;
  /* Canvas Dark */
  --bg-secondary: #1C243E;
  /* Surface Card Dark */
  --bg-dark: #070A15;
  /* Deepest Navy */
  --panel-bg: #1C243E;
  /* Surface Card Dark */
  --panel-elevated: #161E32;
  /* Surface Elevated Dark */

  --border-color: rgba(171, 196, 255, 0.12);
  /* Divider bg */
  --border-hover: #22D1F8;
  /* Primary Cyan */

  --accent-color: #22D1F8;
  /* Vibrant Cyan */
  --accent-active: #39D0D8;
  /* Cyan Hover */
  --accent-gradient: linear-gradient(272.03deg, #39D0D8 2.63%, #22D1F8 95.31%);
  /* Solid button gradient */
  --outline-bg: linear-gradient(272.03deg, rgba(57, 208, 216, 0.08) 2.63%, rgba(34, 209, 248, 0.08) 95.31%);
  --brand-gradient: linear-gradient(244deg, #7748FC 8.17%, #39D0D8 101.65%);
  /* Purple-to-Cyan */
  --progress-gradient: linear-gradient(270deg, #8C6EEF 0%, #4F53F3 100%);
  /* Purple-to-indigo */

  --text-primary: #ECF5FF;
  /* Off-white */
  --text-secondary: #ABC4FF;
  /* Muted Strong */
  --text-muted: #ABC4FF80;
  /* Muted */

  --radius-xs: 4px;
  --radius-sm: 8px;
  /* Buttons, inputs */
  --radius-md: 12px;
  /* Tooltips, dropdowns */
  --radius-lg: 20px;
  /* Cards, panels */
  --radius-xl: 24px;
  /* Modals */
  --radius-pill: 100px;

  --shadow-flat: none;
  --shadow-card: 0px 8px 24px rgba(79, 83, 243, 0.12);
  /* Purple-tinted shadow */
  --shadow-hover: 0px 12px 32px rgba(79, 83, 243, 0.2);
  --shadow-high: 0px 15px 40px rgba(0, 0, 0, 0.4);

  --font-sans: 'Space Grotesk', 'Inter', sans-serif;
  --font-display: 'Space Grotesk', 'Outfit', sans-serif;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: linear-gradient(29.71deg, #121C34 -18.98%, #050D17 14.6%, #070A15 56.26%, rgba(9, 14, 29, 0.97) 85.27%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* Header styling */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 16, 34, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

/* ── Wordmark block ── */
.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.logo-wordmark-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.logo-redesign {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #22D1F8 0%, #39D0D8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.inverted-r {
  display: inline-block;
  transform: scaleX(-1);
  background: linear-gradient(90deg, #22D1F8 0%, #39D0D8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-dot-md {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  /* keep it plain — not part of the gradient */
  -webkit-text-fill-color: initial;
}

.logo-tagline {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #22D1F8 0%, #39D0D8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.75;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 209, 248, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(34, 209, 248, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 209, 248, 0);
  }
}

/* Hero Section */
.hero {
  padding: 5rem 0 3rem 0;
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 500;
  /* Raydium style standard heading weight */
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

/* Input Form Box - Glass DeFi Container */
.input-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(171, 196, 255, 0.05);
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--panel-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  width: 100%;
  transition: border-color var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--accent-color);
}

.input-icon {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.input-wrapper input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  flex: 1;
  padding: 0.75rem 0;
  outline: none;
  font-weight: 400;
}

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

.glow-button {
  background: var(--accent-gradient);
  border: none;
  color: #0B1022;
  /* Text on Cyan */
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity var(--transition-fast);
}

.glow-button:hover {
  opacity: 0.9;
}

.glow-button:active {
  transform: scale(0.98);
}

/* Error Boundary Styling (Pink Sell/Error colors) */
.error-container {
  max-width: 700px;
  margin: 2rem auto;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-content {
  background: rgba(255, 78, 163, 0.08);
  border: 1px solid rgba(255, 78, 163, 0.25);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow-card);
}

.error-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.error-icon {
  color: #FF4EA3;
}

.error-content h3 {
  color: #FF4EA3;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}

#error-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.error-close-btn {
  align-self: flex-end;
  background: rgba(255, 78, 163, 0.15);
  color: #FF4EA3;
  border: 1px solid rgba(255, 78, 163, 0.3);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.error-close-btn:hover {
  background: rgba(255, 78, 163, 0.3);
}

/* Panel Cards & Grid Layout */
.results-container {
  margin: 3rem 0 6rem 0;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.results-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
}

.panel-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(171, 196, 255, 0.05);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-card);
}

.sticky-panel {
  position: sticky;
  top: 100px;
}

.panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.badge {
  font-size: 0.7rem;
  background: rgba(34, 209, 248, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(34, 209, 248, 0.25);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  text-transform: uppercase;
}

.badge.cached {
  background: rgba(140, 110, 239, 0.15);
  color: #8C6EEF;
  border-color: rgba(140, 110, 239, 0.3);
}

/* Sidebar Details */
.screenshot-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-primary);
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.screenshot-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.screenshot-container:hover img {
  transform: scale(1.02);
}

.screenshot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.screenshot-container:hover .screenshot-overlay {
  opacity: 1;
}

.screenshot-overlay i {
  color: #FFFFFF;
  width: 24px;
  height: 24px;
}

.metadata-list {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-val {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
}

.link-val {
  color: var(--accent-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition-fast);
}

.link-val:hover {
  color: var(--accent-active);
}

.link-val i {
  width: 14px;
  height: 14px;
}

/* Copy & Save Buttons (Outline gradient backgrounds) */
.icon-button {
  background: var(--outline-bg);
  border: 1px solid rgba(34, 209, 248, 0.25);
  color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.icon-button:hover {
  border-color: var(--accent-color);
  background: rgba(34, 209, 248, 0.15);
}

/* Markdown Rendering Custom Styles */
.markdown-body {
  padding: 2.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.markdown-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.markdown-body h2:first-of-type {
  margin-top: 0;
}

.markdown-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.markdown-body ul {
  list-style-type: none;
  margin-bottom: 1.5rem;
}

.markdown-body li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
}

.markdown-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
}

.markdown-body p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.markdown-body code {
  background: var(--panel-elevated);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  font-family: monospace;
  font-size: 0.9em;
  color: var(--accent-color);
  /* Cyan code text */
  border: 1px solid var(--border-color);
}

.markdown-body strong {
  color: var(--text-primary);
  font-weight: 500;
}

.markdown-body blockquote {
  border-left: 3px solid #8C6EEF;
  /* Purple-tinted quotes */
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.markdown-body th {
  background: var(--panel-elevated);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  font-weight: 500;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.markdown-body td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Disclaimer notice inside output */
.disclaimer-notice {
  margin: 1.5rem 2.25rem 2.25rem 2.25rem;
  padding: 1rem 1.25rem;
  background: rgba(254, 211, 58, 0.08);
  border: 1px solid rgba(254, 211, 58, 0.25);
  border-radius: var(--radius-sm);
  color: #FED33A;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.disclaimer-notice i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

/* Skeleton Loading Screens */
.skeleton-container {
  margin: 3rem 0;
}

.skeleton-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
}

.skeleton-preview-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(171, 196, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skeleton-media {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-xs);
  background: #232D4C;
}

.skeleton-meta-lines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-content-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(171, 196, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Shimmer Keyframe Animation (For Dark Navy Theme) */
.shimmer {
  background: linear-gradient(90deg,
      #1C243E 25%,
      #293457 37%,
      #1C243E 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.skeleton-line {
  height: 14px;
  border-radius: var(--radius-xs);
  background: #232D4C;
}

.skeleton-title {
  height: 24px;
  border-radius: var(--radius-xs);
  width: 35%;
  margin-bottom: 0.5rem;
  background: #232D4C;
}

.w-40 {
  width: 40%;
}

.w-60 {
  width: 60%;
}

.w-70 {
  width: 70%;
}

.w-75 {
  width: 75%;
}

.w-80 {
  width: 80%;
}

.w-85 {
  width: 85%;
}

.w-90 {
  width: 90%;
}

.mt-4 {
  margin-top: 1.5rem;
}

/* Footer styling */
footer {
  background-color: var(--bg-dark);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 6rem;
  border-top: 1px solid var(--border-color);
}

footer p {
  color: var(--text-muted);
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Responsive adjust */
@media(max-width: 1024px) {

  .skeleton-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: relative;
    top: 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

@media(max-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .input-wrapper {
    flex-wrap: wrap;
    padding: 0.75rem;
  }

  .glow-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }
}

/* Color Swatches Grid */
.color-palette-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.color-swatch-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  background: var(--panel-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 0;
  transition: all var(--transition-fast);
}

.color-swatch-item:hover {
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.color-swatch-item.copied {
  border-color: var(--accent-color);
  background: rgba(34, 209, 248, 0.1);
}

.color-swatch-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.color-swatch-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.color-swatch-label {
  font-size: 0.8rem;
  font-weight: 500;
  font-family: monospace;
  color: var(--text-primary);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-swatch-type {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Form Options & Checkbox */
.form-options {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.75rem 0.5rem 0.1rem 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  accent-color: var(--accent-color);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Progress Card styles */
.progress-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(171, 196, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 600px;
  margin: 2rem auto;
  box-shadow: var(--shadow-card);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
}

.spin-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-color);
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#progress-percent {
  color: var(--accent-color);
  font-weight: 500;
  font-size: 1rem;
  font-family: var(--font-display);
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--panel-elevated);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: var(--progress-gradient);
  /* Purple-to-indigo progress bar fill */
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}