/* ============================================================
   Agency SEO & Site Checker – Head and Code Brand Design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  /* Head and Code Brand Colors */
  --hc-violet:      #2e2382;   /* Blauviolett Primary */
  --hc-violet-60:   #9184be;   /* 60% */
  --hc-violet-30:   #e8e6f4;   /* 30% */
  --hc-coral:       #ff6b6b;   /* Coral/Salmon accent */
  --hc-yellow:      #ffdd00;   /* Brand Yellow */
  --hc-magenta:     #e5007d;   /* Gradient end */

  /* UI Surfaces – dark theme built on brand violet */
  --asc-bg:       #0e0c2a;     /* deep violet-dark */
  --asc-surface:  #18154a;     /* elevated surface */
  --asc-surface2: #211d5c;     /* card hover */
  --asc-border:   #2e2382;     /* violet border */
  --asc-border-s: rgba(46,35,130,.4);
  --asc-text:     #f1f0fa;
  --asc-muted:    #9184be;
  --asc-accent:   #ff6b6b;     /* coral CTA */
  --asc-accent2:  #2e2382;     /* violet secondary */

  /* Status */
  --asc-pass:     #22c55e;
  --asc-warn:     #f59e0b;
  --asc-fail:     #ef4444;
  --asc-info:     #9184be;

  --asc-radius:   12px;
  --asc-font:     'Montserrat', sans-serif;
  --asc-mono:     'Montserrat', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

#asc-app {
  font-family: var(--asc-font);
  background: var(--asc-bg);
  min-height: 100vh;
  color: var(--asc-text);
  padding: 0 0 60px;
}

/* ---- HEADER ---- */
.asc-header {
  background: linear-gradient(135deg, #0e0c2a 0%, #2e2382 60%, #1a1060 100%);
  border-bottom: 1px solid var(--asc-border-s);
  padding: 28px 40px 24px;
  position: relative;
  overflow: hidden;
}
/* Decorative blob */
.asc-header::after {
  content: '';
  position: absolute; top: -40px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,107,107,.18) 0%, transparent 70%);
  pointer-events: none;
}
.asc-header-inner { max-width: 1200px; margin: 0 auto; position: relative; }

.asc-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 5px;
}
/* HC Logomark SVG in header */
.asc-logo-mark {
  display: flex; align-items: center; gap: 0;
}
.asc-tagline { color: var(--hc-violet-60); font-size: 13px; font-weight: 500; letter-spacing: .3px; }

/* ---- FORM ---- */
.asc-form-wrap { padding: 24px 40px 0; max-width: 1200px; margin: 0 auto; }

.asc-form-card {
  background: var(--asc-surface);
  border: 1px solid var(--asc-border-s);
  border-radius: var(--asc-radius);
  padding: 22px 24px;
}

.asc-form-row {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
}

.asc-input-group { display: flex; flex-direction: column; gap: 6px; }
.asc-input-group label {
  font-size: 10px; font-weight: 700; color: var(--hc-violet-60);
  text-transform: uppercase; letter-spacing: 1.2px;
}

.asc-url-group { flex: 1 1 360px; }
.asc-url-group input {
  height: 46px; padding: 0 16px;
  background: rgba(14,12,42,.8); border: 1.5px solid var(--asc-border-s);
  border-radius: 8px; color: var(--asc-text);
  font-family: var(--asc-font); font-size: 13px; font-weight: 500;
  width: 100%; outline: none; transition: border-color .2s;
}
.asc-url-group input:focus { border-color: var(--hc-coral); }
.asc-url-group input::placeholder { color: #4a4480; }

/* Type toggle */
.asc-type-toggle { display: flex; gap: 6px; }
.asc-type-btn {
  display: flex; align-items: center; gap: 7px;
  height: 46px; padding: 0 16px;
  background: rgba(14,12,42,.8); border: 1.5px solid var(--asc-border-s);
  border-radius: 8px; color: var(--asc-muted);
  font-family: var(--asc-font); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; text-transform: uppercase; letter-spacing: .5px;
}
.asc-type-btn.active {
  background: rgba(46,35,130,.3);
  border-color: var(--hc-coral);
  color: var(--hc-coral);
}
.asc-type-btn:hover:not(.active) { border-color: var(--hc-violet-60); color: var(--asc-text); }

/* Run Button */
#asc-run-btn {
  height: 46px; padding: 0 28px;
  background: var(--hc-coral);
  border: none; border-radius: 8px;
  color: #fff; font-family: var(--asc-font);
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(255,107,107,.3);
}
#asc-run-btn:hover  { background: #ff5252; box-shadow: 0 6px 28px rgba(255,107,107,.45); }
#asc-run-btn:active { transform: scale(.98); }
#asc-run-btn:disabled { background: #2e2382; box-shadow: none; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }

/* ---- SCREENSHOT ---- */
.asc-screenshot-bar {
  max-width: 1200px; margin: 0 auto;
  padding: 20px 40px 0;
}
.asc-screenshot-card {
  background: var(--asc-surface);
  border: 1px solid var(--asc-border-s);
  border-radius: var(--asc-radius);
  overflow: hidden;
}
.asc-screenshot-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(14,12,42,.6);
  border-bottom: 1px solid var(--asc-border-s);
}
.asc-screenshot-dots { display: flex; gap: 6px; }
.asc-screenshot-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.asc-screenshot-dots span:nth-child(1) { background: #ef4444; }
.asc-screenshot-dots span:nth-child(2) { background: #f59e0b; }
.asc-screenshot-dots span:nth-child(3) { background: #22c55e; }
.asc-screenshot-url-bar {
  flex: 1; height: 26px; padding: 0 12px;
  background: rgba(14,12,42,.8); border: 1px solid var(--asc-border-s);
  border-radius: 5px; color: var(--asc-muted); font-size: 11px;
  display: flex; align-items: center; gap: 6px; font-family: var(--asc-mono);
}
.asc-screenshot-url-bar svg { flex-shrink: 0; color: var(--asc-pass); }
.asc-screenshot-body {
  height: 380px; position: relative; overflow: hidden;
  background: #0a0820;
}
.asc-screenshot-body img {
  width: 100%;
  height: auto;        /* natural height – don't stretch */
  display: block;
  position: absolute;
  top: 0; left: 0;
  object-fit: unset;
}
.asc-screenshot-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--asc-muted); font-size: 13px;
}
.asc-screenshot-loading .spin { color: var(--hc-coral); }
.asc-screenshot-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--asc-surface), transparent);
}

/* ---- SCORE BAR ---- */
.asc-score-bar {
  padding: 16px 40px 0;
  max-width: 1200px; margin: 0 auto;
}
.asc-score-inner {
  background: var(--asc-surface); border: 1px solid var(--asc-border-s);
  border-radius: var(--asc-radius); padding: 22px 26px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}

.asc-score-left { display: flex; align-items: center; gap: 18px; }

.asc-score-circle { position: relative; width: 86px; height: 86px; }
.asc-score-circle svg { width: 86px; height: 86px; transform: rotate(-90deg); }
.asc-score-arc { transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1), stroke .5s; }

.asc-score-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; letter-spacing: -1px;
}

.asc-score-label strong { display: block; font-size: 15px; font-weight: 700; }
.asc-score-label span { color: var(--asc-muted); font-size: 11px; }

.asc-score-legend { display: flex; flex-direction: column; gap: 6px; margin-left: auto; }
.asc-leg-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--asc-muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.pass { background: var(--asc-pass); }
.dot.warn { background: var(--asc-warn); }
.dot.fail { background: var(--asc-fail); }

.asc-meta { margin-left: auto; text-align: right; color: var(--asc-muted); font-size: 11px; line-height: 1.8; }
#asc-type-badge {
  display: inline-block; padding: 2px 10px;
  background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3);
  border-radius: 20px; color: var(--hc-coral); font-size: 10px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
}

/* ---- SECTIONS ---- */
#asc-sections {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 14px;
}

.asc-section {
  background: var(--asc-surface); border: 1px solid var(--asc-border-s);
  border-radius: var(--asc-radius); overflow: hidden;
  transition: border-color .2s;
}
.asc-section:hover { border-color: rgba(46,35,130,.7); }

.asc-section-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer;
  border-bottom: 1px solid transparent; transition: background .15s;
}
.asc-section-head:hover { background: rgba(255,255,255,.02); }
.asc-section-head.open { border-bottom-color: var(--asc-border-s); }

.asc-section-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.asc-section-icon.pass { background: rgba(34,197,94,.12); color: var(--asc-pass); }
.asc-section-icon.warn { background: rgba(245,158,11,.12); color: var(--asc-warn); }
.asc-section-icon.fail { background: rgba(239,68,68,.12);  color: var(--asc-fail); }
.asc-section-icon.info { background: rgba(145,132,190,.1); color: var(--hc-violet-60); }

.asc-section-title { flex: 1; font-size: 13px; font-weight: 700; letter-spacing: .2px; }

.asc-section-badge {
  font-size: 10px; font-weight: 700; padding: 2px 9px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}
.asc-section-badge.pass { background: rgba(34,197,94,.12); color: var(--asc-pass); }
.asc-section-badge.warn { background: rgba(245,158,11,.12); color: var(--asc-warn); }
.asc-section-badge.fail { background: rgba(239,68,68,.12);  color: var(--asc-fail); }
.asc-section-badge.info { background: rgba(145,132,190,.1); color: var(--hc-violet-60); }

.asc-section-summary { font-size: 10px; color: var(--asc-muted); }
.asc-chevron { color: var(--asc-muted); transition: transform .25s; }
.asc-chevron.open { transform: rotate(180deg); }

/* Items */
.asc-items { padding: 6px 10px 10px; display: none; }
.asc-items.open { display: block; }

.asc-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px; border-radius: 7px; transition: background .15s;
}
.asc-item:hover { background: rgba(255,255,255,.025); }

.asc-item-icon { flex-shrink: 0; margin-top: 1px; }

.asc-status-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.asc-status-dot.pass { background: var(--asc-pass); box-shadow: 0 0 5px rgba(34,197,94,.5); }
.asc-status-dot.warn { background: var(--asc-warn); box-shadow: 0 0 5px rgba(245,158,11,.5); }
.asc-status-dot.fail { background: var(--asc-fail); box-shadow: 0 0 5px rgba(239,68,68,.5); }
.asc-status-dot.info { background: var(--hc-violet-60); }

.asc-item-label { font-size: 12px; font-weight: 600; color: var(--asc-text); line-height: 1.4; }
.asc-item-value { font-size: 11px; color: var(--asc-muted); margin-top: 2px; word-break: break-word; line-height: 1.4; }

/* Error */
.asc-error-msg {
  max-width: 1200px; margin: 20px auto; padding: 14px 18px;
  color: var(--asc-fail); font-size: 13px;
  background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--asc-radius);
}

/* Responsive */
@media (max-width: 900px) {
  .asc-header, .asc-form-wrap, .asc-score-bar, #asc-sections,
  .asc-screenshot-bar, .asc-email-wrap { padding-left: 16px; padding-right: 16px; }
  #asc-sections { grid-template-columns: 1fr; }
  .asc-form-row { flex-direction: column; }
  .asc-url-group, .asc-type-group, .asc-btn-group { width: 100%; }
  #asc-run-btn { width: 100%; justify-content: center; }
}
