/*
╔══════════════════════════════════════════════════════════════╗
║  🔍 IMAGE TAG EXPLORER — style.css                          ║
║                                                              ║
║  BASIC EXERCISES (change a value):                           ║
║  EX 1 — Change the accent blue colour      → line ~18       ║
║  EX 2 — Change the dark background colour  → line ~27       ║
║  EX 3 — Change the hero headline size      → line ~138      ║
║  EX 4 — Change the CTA button radius       → line ~148      ║
║  EX 5 — Change the tag pill radius         → line ~195      ║
║                                                              ║
║  CHALLENGES (write the full CSS rule yourself):              ║
║  CH A — Style the active screen-nav dot    → line ~75       ║
║  CH B — Write the scan line @keyframes     → line ~111      ║
║  CH C — Style the upload zone on hover     → line ~178      ║
║  CH D — Style the selected tag pill        → line ~208      ║
║  CH E — Style the CTA button on hover      → line ~155      ║
║  CH F — Animate the confidence bar width   → line ~231      ║
║  CH G — Add hover highlight to result rows → line ~264      ║
╚══════════════════════════════════════════════════════════════╝
*/


/* ── CSS Variables ─────────────────────────────────── */
:root {

  /* ════════════════════════════════════
    EX 1 — Change the accent blue colour 🔵
    This colour appears everywhere: dots, tags,
    confidence bars, glows, and buttons.
    Change ALL three blue shades to stay consistent.
    Try:
      #a855f7 / #c084fc / #7e22ce  → purple
      #10b981 / #34d399 / #065f46  → emerald
  ════════════════════════════════════ */
  --blue:  #a855f7;   /* ✏️ main accent */
  --blue2: #c084fc;   /* ✏️ lighter shade */
  --blue3: #7e22ce;   /* ✏️ darker shade */

  /* ════════════════════════════════════
    EX 2 — Change the dark background colour 🌑
    Try:
      #0a0f1e  → deep navy   (current)
      #0f0f0f  → near black
      #0d1117  → GitHub dark
  ════════════════════════════════════ */
  --bg:      #0a0f1e;  /* ✏️ change this */
  --surface: #0f172a;
  --card:    #141e33;
  --card2:   #1a2540;
  --text:    #e2e8f0;
  --muted:   #475569;
  --muted2:  #64748b;
  --border:  #1e2d47;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Outfit', sans-serif; background: #060d1a; min-height: 100vh; display: flex; flex-direction: column; }


/* ══ PROTOTYPE NAV BAR ══════════════════════════════ */
.proto-bar    { background: var(--bg); color: white; padding: 12px 32px; display: flex; align-items: center; gap: 16px; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.proto-label  { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.proto-title  { font-size: 14px; font-weight: 700; color: var(--text); }
.proto-screens { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.proto-screen-name { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); margin-right: 4px; }

/* Base dot — inactive state ✅ already done */
.proto-dot {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted);
  transition: all .2s;
}
/* Hover is wired — use as syntax reference! */

/* ════════════════════════════════════
  CH A — Style the ACTIVE screen-nav dot 🔵
  When script.js adds  .active  to a dot, it should
  visually pop: blue background, white bold number.

  YOUR TASK: Write a CSS rule for  .proto-dot.active  that sets:
    background   → var(--blue3)
    border-color → var(--blue)
    color        → white
    font-weight  → 700

  HINT: Look at  .proto-dot:hover  just above for syntax.
        The selector you need is  .proto-dot.active { }
════════════════════════════════════ */
/* ✏️ Write .proto-dot.active { } here */
.proto-dot:hover:not(.active) { background: var(--card); }
.proto-dot.active {
  background: var(--blue3);
  border-color: var(--blue);
  color: white;
  font-weight: 700;
}


/* ══ SCREEN SHOW / HIDE ════════════════════════════ */
.main          { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.screen        { display: none; flex: 1; flex-direction: column; overflow: hidden; animation: fadeIn .25s ease; }
.screen.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.proto-viewport { flex: 1; display: flex; flex-direction: column; overflow: auto; background: #050b16; }
.desktop-frame  { flex: 1; display: flex; flex-direction: column; min-height: 0; }


/* ══ GUIDE PANEL (collapsible strip) ═══════════════ */
.guide-toggle { background: var(--bg); color: var(--muted); border: none; border-top: 1px solid var(--border); cursor: pointer; padding: 12px 32px; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; flex-shrink: 0; }
.guide-toggle .arrow       { transition: transform .25s; font-size: 12px; margin-left: auto; color: var(--muted); }
.guide-toggle.open .arrow  { transform: rotate(180deg); }
.guide-panel               { background: var(--surface); color: white; max-height: 0; overflow: hidden; transition: max-height .35s ease; flex-shrink: 0; }
.guide-panel.open          { max-height: 300px; overflow-y: auto; }
.guide-inner               { padding: 24px 32px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.guide-step                { border-left: 2px solid var(--border); padding-left: 14px; }
.gs-num   { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--blue2); letter-spacing: .1em; margin-bottom: 5px; }
.gs-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; color: var(--text); }
.gs-body  { font-size: 12px; color: var(--muted2); line-height: 1.6; }
.gs-body code { font-family: 'DM Mono', monospace; font-size: 10px; background: var(--card2); padding: 1px 5px; border-radius: 2px; color: var(--blue2); }


/* ══════════════════════════════════════════════════
   SCREEN 1 — LANDING
══════════════════════════════════════════════════ */

.s1-logo-row { display: flex; align-items: center; gap: 9px; }
.s1-icon     { width: 36px; height: 36px; background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.3); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.s1-logo     { font-size: 18px; font-weight: 700; color: var(--text); }
.s1-ver      { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; }

/* Left panel: scan animation */
.s1-left { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 80px 60px; border-right: 1px solid var(--border); background: radial-gradient(ellipse at center, rgba(29,78,216,.08) 0%, transparent 70%); }

.s1-scan-anim {
  width: 220px; height: 220px;
  border: 1px solid rgba(59,130,246,.2); border-radius: 24px;
  position: relative; display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,.04); overflow: hidden;
}

/* This line references @keyframes scanLine — write it in CH B! */
.s1-scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  animation: scanLine 2.4s ease-in-out infinite;   /* ← needs CH B */
  opacity: .6;
}

/* ════════════════════════════════════
  CH B — Write the scan line @keyframes ✨
  The scan line above won't move until you write this!

  WHAT @keyframes does:
    It defines an animation frame by frame.
    Use percentages (0%, 50%, 100%) to describe positions.

  HOW IT SHOULD WORK:
    The scan line travels from the TOP of the box to the BOTTOM
    and fades in/out at the edges.

  YOUR TASK: Write  @keyframes scanLine  with these steps:
    0%   → top: 0;                    opacity: 0;
    10%  → opacity: .6;
    50%  → top: calc(100% - 2px);
    90%  → opacity: .6;
    100% → top: calc(100% - 2px);    opacity: 0;

  SYNTAX STARTER:
    @keyframes scanLine {
      0%   { top: 0; opacity: 0; }
      ...
    }
════════════════════════════════════ */
/* ✏️ Write @keyframes scanLine { } here */
@keyframes scanLine {
  0%   { top: 0; opacity: 0; }
  10%  { opacity: .6; }
  50%  { top: calc(100% - 2px); }
  90%  { opacity: .6; }
  100% { top: calc(100% - 2px); opacity: 0; }
}


/* Corner bracket decoration (::before top-left, ::after bottom-right) */
.s1-scan-corners { position: absolute; inset: 0; }
.s1-scan-corners::before, .s1-scan-corners::after { content: ''; position: absolute; width: 24px; height: 24px; border-color: var(--blue); border-style: solid; opacity: .6; }
.s1-scan-corners::before { top: 12px; left: 12px;    border-width: 2px 0 0 2px; }
.s1-scan-corners::after  { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }
.s1-cam-icon { font-size: 64px; opacity: .25; }

/* Right panel: headline + CTA + features */
.s1-right { display: flex; flex-direction: column; justify-content: center; padding: 80px 60px; gap: 28px; }

/* ════════════════════════════════════
  EX 3 — Change the hero headline size 🔠
  Try:  36px (smaller)  |  72px (bigger)
════════════════════════════════════ */
.s1-tagline { font-size: 72px; /* ✏️ change this */ font-weight: 800; color: var(--text); line-height: 1.05; letter-spacing: -.5px; }
.s1-tagline span { color: var(--blue2); }
.s1-desc { font-size: 16px; color: var(--muted2); line-height: 1.65; max-width: 420px; }

/* ════════════════════════════════════
  EX 4 — Change the CTA button corner radius 🟦
  Try:  6px (square-ish)  |  50px (full pill)
════════════════════════════════════ */
.s1-cta {
  background: var(--blue3); color: white; border: none;
  border-radius: 50px;    /* ✏️ change this */
  padding: 18px 32px; font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; letter-spacing: -.2px; transition: all .2s;
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
}

/* ════════════════════════════════════
  CH E — Style the CTA button on hover 🖱️
  Nothing happens when you hover "Start Scanning" right now.

  YOUR TASK: Write a CSS rule for  .s1-cta:hover  that:
    background → var(--blue)          (lighter shade, pre-defined)
    transform  → translateY(-2px)     (lifts the button up)

  HINT: The transition on .s1-cta makes it smooth automatically.
  Selector:  .s1-cta:hover { }
════════════════════════════════════ */
/* ✏️ Write .s1-cta:hover { } here */
.sl-cta:hover {
  background: var(--blue);
  transform: translateY(-2px);
}


.s1-features  { display: flex; gap: 14px; }
.s1-feat      { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.s1-feat-icon { font-size: 24px; }
.s1-feat-text { font-size: 13px; color: var(--muted2); line-height: 1.4; font-weight: 500; }


/* ══════════════════════════════════════════════════
   SCREEN 2 — SCANNER
══════════════════════════════════════════════════ */

.s2-wrap     { display: flex; flex-direction: column; flex: 1; }
.s2-hdr      { background: #080f1e; border-bottom: 1px solid var(--border); padding: 16px 40px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.s2-back     { background: none; border: none; color: var(--muted2); font-size: 20px; cursor: pointer; }
.s2-hdr-icon { width: 28px; height: 28px; background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.3); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.s2-hdr-name { font-size: 16px; font-weight: 700; color: var(--text); }
.s2-hdr-ver  { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); margin-left: auto; border: 1px solid var(--border); border-radius: 3px; padding: 2px 8px; }

/* Three-column layout */
.s2-body { display: grid; grid-template-columns: 340px 1fr 320px; flex: 1; overflow: hidden; }

/* Column 1: Upload */
.s2-upload-col  { border-right: 1px solid var(--border); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; background: var(--surface); }
.s2-col-label   { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

.s2-upload-zone {
  border: 1.5px dashed var(--border); border-radius: 14px;
  padding: 32px 16px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}

/* ════════════════════════════════════
  CH C — Style the upload zone on hover 📂
  Right now hovering the dashed box does nothing.

  YOUR TASK: Write  .s2-upload-zone:hover { }  that sets:
    border-color → var(--blue)
    background   → rgba(59, 130, 246, 0.04)

  The transition on .s2-upload-zone above animates it for free.
════════════════════════════════════ */
/* ✏️ Write .s2-upload-zone:hover { } here */
.s2-upload-zone:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.04);
}


.s2-uz-icon { width: 44px; height: 44px; background: var(--card2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.s2-uz-text { font-size: 12px; color: var(--muted2); text-align: center; line-height: 1.6; }
.s2-uz-btn  { background: var(--card2); border: 1px solid var(--border); color: var(--muted2); border-radius: 8px; padding: 8px 16px; font-size: 12px; cursor: pointer; font-family: 'Outfit', sans-serif; transition: all .15s; }
.s2-uz-btn:hover { border-color: var(--blue); color: var(--blue2); }

.s2-preview-area { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); min-height: 180px; display: flex; align-items: center; justify-content: center; position: relative; }
.s2-preview-img  { width: 100%; height: 100%; object-fit: cover; display: none; }
.s2-preview-ph   { font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; text-align: center; padding: 16px; }

.s2-view-results-btn       { background: var(--blue3); color: white; border: none; border-radius: 10px; padding: 13px 0; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; width: 100%; transition: background .2s; }
.s2-view-results-btn:hover { background: var(--blue); }

/* Column 2: Tags */
.s2-tags-col    { border-right: 1px solid var(--border); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.s2-section-lbl { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.s2-tags        { display: flex; flex-wrap: wrap; gap: 8px; }

/* ════════════════════════════════════
  EX 5 — Change the tag pill corner radius 💊
  Try:  8px (more rectangular)  |  0px (square)
════════════════════════════════════ */
.s2-tag {
  padding: 8px 16px;
  border-radius: 0px;    /* ✏️ change this */
  border: 1px solid var(--border); font-size: 13px; font-weight: 600;
  color: var(--muted2); cursor: pointer; background: var(--card);
  transition: all .15s; user-select: none;
}
/* Hover is already done — use as a reference! */
.s2-tag:hover { border-color: var(--blue); color: var(--blue2); }

/* ════════════════════════════════════
  CH D — Style the SELECTED (active) tag pill ✅
  When a tag is clicked, script.js adds  .active  to it.
  Right now selected tags look the same as unselected ones.

  YOUR TASK: Write  .s2-tag.active { }  that makes it look selected:
    background   → var(--blue3)
    border-color → var(--blue)
    color        → white

  HINT: Look at .s2-tag:hover above as your syntax reference.
════════════════════════════════════ */
/* ✏️ Write .s2-tag.active { } here */
.s2-tag.active {
  background: var(--blue3);
  border-color: var(--blue);
  color: white;
}


/* Column 3: Results */
.s2-results-col  { padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; background: var(--surface); }
.s2-result-box   { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; flex: 1; }
.s2-result-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.s2-result-dot   { width: 8px; height: 8px; background: var(--blue); border-radius: 50%; animation: pulseDot 1.5s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
.s2-result-lbl   { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--blue2); letter-spacing: .14em; text-transform: uppercase; }
.s2-result-text  { font-size: 14px; color: var(--muted2); line-height: 1.6; font-style: italic; }
.s2-result-text.found { color: var(--text); font-style: normal; }

.s2-confidence  { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.s2-conf-row    { display: flex; align-items: center; gap: 10px; }
.s2-conf-label  { font-size: 11px; color: var(--muted2); width: 52px; text-align: right; font-family: 'DM Mono', monospace; }
.s2-conf-bar    { flex: 1; height: 5px; background: var(--card2); border-radius: 3px; overflow: hidden; }

.s2-conf-fill {
  height: 100%;
  background: var(--blue3);
  border-radius: 3px;
  width: 0%;
  /* ════════════════════════════════════
    CH F — Animate the confidence bar fill 📊
    script.js changes width from 0% → a number% when a tag
    is selected. Right now the bar JUMPS instantly.

    YOUR TASK: Add one property here to make it animate:
      transition: width 0.6s ease;

    WHAT IS transition?
      It tells CSS to smoothly change a property over time.
      Format:  transition: [property] [duration] [easing];
      This only works on numeric properties like width, opacity.
  ════════════════════════════════════ */
  /* ✏️ Add   transition: width 0.6s ease;   here */
  transition: width 0.6s ease;
}

.s2-conf-pct { font-size: 11px; color: var(--blue2); font-family: 'DM Mono', monospace; min-width: 32px; }


/* ══════════════════════════════════════════════════
   SCREEN 3 — RESULTS
══════════════════════════════════════════════════ */

.s3-wrap      { display: flex; flex-direction: column; flex: 1; }
.s3-hdr       { background: #080f1e; border-bottom: 1px solid var(--border); padding: 16px 40px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.s3-back-btn  { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25); color: var(--blue2); border-radius: 10px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Outfit', sans-serif; }
.s3-hdr-title { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; }

.s3-body      { flex: 1; display: grid; grid-template-columns: 1fr 400px; overflow: auto; }
.s3-main      { padding: 40px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--border); }

.s3-image-card      { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.s3-img-placeholder { height: 200px; background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(99,102,241,.1)); display: flex; align-items: center; justify-content: center; font-size: 64px; border-bottom: 1px solid var(--border); }
.s3-img-meta        { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.s3-img-name        { font-size: 14px; font-weight: 600; color: var(--text); }
.s3-img-size        { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted2); }

.s3-detected-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.s3-tag-results    { display: flex; flex-direction: column; gap: 10px; }

/* transition is ready — write the hover rule in CH G! */
.s3-tag-result { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 16px; transition: border-color .15s; }

/* ════════════════════════════════════
  CH G — Highlight result rows on hover 🖱️
  Hovering a result card should give it a blue border glow.

  YOUR TASK: Write  .s3-tag-result:hover { }  that sets:
    border-color → var(--blue3)

  The transition on .s3-tag-result above animates it for free!
════════════════════════════════════ */
/* ✏️ Write .s3-tag-result:hover { } here */
.s3-tag-result:hover {
  border-color: var(--blue3);
}


.s3-tr-emoji { font-size: 26px; flex-shrink: 0; }
.s3-tr-info  { flex: 1; }
.s3-tr-name  { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.s3-tr-desc  { font-size: 12px; color: var(--muted2); line-height: 1.5; }
.s3-tr-conf  { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 120px; }
.s3-tr-pct   { font-family: 'DM Mono', monospace; font-size: 18px; font-weight: 500; color: var(--blue2); }
.s3-tr-bar   { width: 100px; height: 5px; background: var(--card2); border-radius: 3px; overflow: hidden; }
.s3-tr-fill  { height: 100%; background: var(--blue3); border-radius: 3px; }

/* Results sidebar */
.s3-sidebar             { padding: 40px 32px; background: var(--surface); display: flex; flex-direction: column; gap: 28px; }
.s3-sidebar-section-lbl { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.s3-summary-card        { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.s3-summary-row         { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted2); }
.s3-summary-row:last-child { border-bottom: none; }
.s3-summary-val         { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--blue2); }
.s3-reset-btn           { width: 100%; background: var(--card2); border: 1px solid var(--border); color: var(--muted2); border-radius: 12px; padding: 14px 0; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; }
.s3-reset-btn:hover     { background: var(--card); color: var(--text); }
.s3-api-tip             { background: rgba(59,130,246,.06); border: 1px solid rgba(59,130,246,.2); border-radius: 12px; padding: 16px; }
.s3-api-tip-title       { font-size: 13px; font-weight: 700; color: var(--blue2); margin-bottom: 6px; }
.s3-api-tip-body        { font-size: 12px; color: var(--muted2); line-height: 1.6; }
