/* =====================
   ANALYZER PAGE
===================== */
.analyzer-page {
  min-height: 100vh;
  padding-top: 68px;
  background: var(--bg);
}

.analyzer-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* =====================
   PAGE HERO
===================== */
.analyzer-hero {
  text-align: center;
  margin-bottom: 40px;
}

.analyzer-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.analyzer-hero h1 span { color: var(--green-dark); }

.analyzer-hero p {
  font-size: 16px;
  color: var(--text-3);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =====================
   INPUT GRID
===================== */
.analyzer-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* =====================
   INPUT CARDS
===================== */
.input-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-card:focus-within {
  border-color: var(--green-muted);
}

.input-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-card-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--green-pale);
  border: 1px solid var(--green-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.input-card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.input-card-subtitle {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.input-card-body {
  padding: 16px 20px;
}

/* Job description textarea */
.jd-textarea {
  width: 100%;
  height: 260px;
  padding: 12px;
  border: 1.5px solid var(--border-2);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.jd-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46,204,113,0.1);
}

.jd-textarea::placeholder { color: var(--text-3); }

.char-count {
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
  margin-top: 6px;
}

/* Resume upload area */
.resume-upload-area {
  height: 260px;
  border: 2px dashed var(--border-2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  text-align: center;
  padding: 20px;
}

.resume-upload-area:hover,
.resume-upload-area.drag-over {
  border-color: var(--green);
  background: var(--green-pale);
}

.resume-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon { font-size: 40px; line-height: 1; }

.upload-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.upload-hint {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

/* Uploaded file state */
.file-uploaded {
  border-color: var(--green);
  background: var(--green-pale);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--green-muted);
  border-radius: 10px;
  width: 100%;
}

.file-info-icon { font-size: 24px; flex-shrink: 0; }

.file-info-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.file-info-size {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 16px;
  padding: 0;
  transition: color 0.15s;
  flex-shrink: 0;
}

.file-remove:hover { color: #dc2626; }

/* =====================
   ANALYZE BUTTON
===================== */
.analyze-btn-wrap {
  text-align: center;
  margin-bottom: 36px;
}

.btn-analyze {
  padding: 15px 48px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  letter-spacing: -0.2px;
}

.btn-analyze:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,204,113,0.35);
}

.btn-analyze:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-analyze .analyze-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-analyze.loading .analyze-btn-text { display: none; }
.btn-analyze.loading .analyze-spinner  { display: block; }
.btn-analyze.loading { pointer-events: none; }

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

/* =====================
   RESULTS SECTION
===================== */
.results-section {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.results-section.visible { display: block; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Results header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

/* =====================
   SCORE CARD
===================== */
.score-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
  align-items: center;
}

/* Circular score */
.score-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.score-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.score-circle svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.score-circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.score-circle-fill {
  fill: none;
  stroke: var(--green);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.2s ease;
}

.score-circle-fill.poor   { stroke: #ef4444; }
.score-circle-fill.fair   { stroke: #f59e0b; }
.score-circle-fill.good   { stroke: #3b82f6; }
.score-circle-fill.great  { stroke: var(--green); }

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  gap: 1px;
}

.score-pct {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  align-self: flex-start;
  margin-top: 6px;
}

.score-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Score details */
.score-details {}

.score-verdict {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.score-summary-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.score-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.score-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.score-meta-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.score-meta-dot.green  { background: var(--green); }
.score-meta-dot.red    { background: #ef4444; }
.score-meta-dot.yellow { background: #f59e0b; }

/* =====================
   RESULTS CARDS
===================== */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.result-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.result-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.result-card-icon.green  { background: var(--green-pale);  border: 1px solid var(--green-muted); }
.result-card-icon.red    { background: #fef2f2; border: 1px solid #fecaca; }
.result-card-icon.blue   { background: #eff6ff; border: 1px solid #bfdbfe; }
.result-card-icon.yellow { background: #fffbeb; border: 1px solid #fde68a; }

.result-card-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.result-card-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 20px;
}

.result-card-body {
  padding: 14px 18px;
}

/* Keyword chips */
.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyword-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.keyword-chip.found {
  background: var(--green-pale);
  color: var(--green-darker);
  border: 1px solid var(--green-muted);
}

.keyword-chip.missing {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Suggestions list */
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.suggestion-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green-pale);
  border: 1px solid var(--green-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--green-darker);
  flex-shrink: 0;
  margin-top: 1px;
}

/* =====================
   FULL WIDTH SUGGESTIONS
===================== */
.suggestions-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}

/* =====================
   ACTION BUTTONS
===================== */
.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================
   TOAST
===================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--dark);
  color: white;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.3s;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast.show    { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green-dark); }
.toast.error   { background: #dc2626; }

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .analyzer-input-grid { grid-template-columns: 1fr; }
  .results-grid         { grid-template-columns: 1fr; }
  .score-grid           { grid-template-columns: 1fr; justify-items: center; }
}

@media (max-width: 480px) {
  .analyzer-layout { padding: 24px 14px 60px; }
  .btn-analyze      { width: 100%; justify-content: center; }
}

/* =====================
   AD SLOTS
   Hidden by default — only shown when
   an actual ad is loaded (AdSense sets
   data-ad-status="filled" on the <ins> tag,
   or you manually add class "ad-active").
===================== */

/* All ad wrappers hidden by default */
.ad-wrapper {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 28px 0;
}

/* Show wrapper only when ad is active */
.ad-wrapper.ad-active {
  display: flex;
}

.ad-wrapper .ad-disclosure {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.ad-slot {
  background: var(--bg-2);
  border: 1.5px dashed var(--border-2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow: hidden;
  position: relative;
}

.ad-slot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  opacity: 0.6;
}

/* Leaderboard 728x90 */
.ad-slot-leaderboard {
  width: 100%;
  height: 90px;
  max-width: 728px;
  margin: 0 auto;
}

/* Rectangle 300x250 */
.ad-slot-rectangle {
  width: 100%;
  max-width: 300px;
  height: 250px;
}

/* Large rectangle 336x280 */
.ad-slot-large-rect {
  width: 100%;
  max-width: 336px;
  height: 280px;
}

/* Half page 300x600 */
.ad-slot-halfpage {
  width: 100%;
  max-width: 300px;
  height: 600px;
}

/* Banner 468x60 */
.ad-slot-banner {
  width: 100%;
  max-width: 468px;
  height: 60px;
  margin: 0 auto;
}

/* =====================
   SEO CONTENT SECTIONS
===================== */
.seo-section {
  padding: 56px 0 0;
}

.seo-section-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.seo-section-intro {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 720px;
  margin-bottom: 32px;
}

/* How it works steps */
.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.hiw-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}

.hiw-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hiw-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--dark);
  color: var(--green);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.hiw-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.hiw-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.faq-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.15s;
}

.faq-question:hover { background: var(--bg); }

.faq-chevron {
  font-size: 12px;
  color: var(--text-3);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}

.faq-item.open .faq-answer { display: block; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: var(--shadow-sm); }

.stat-value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  line-height: 1.4;
}

/* Tips grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.tip-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tip-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--green-pale);
  border: 1px solid var(--green-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tip-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 5px;
}

.tip-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.6;
}

/* CTA band */
.seo-cta-band {
  background: var(--dark);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.seo-cta-band::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,204,113,0.18) 0%, transparent 70%);
  top: -100px; right: -60px;
}

.seo-cta-band h2 {
  font-family: var(--font-head);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
  position: relative;
}

.seo-cta-band h2 span { color: var(--green); }

.seo-cta-band p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  margin-bottom: 20px;
  position: relative;
}

.seo-cta-band .cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* Sidebar removed — centered single-column layout */

@media (max-width: 768px) {
  .hiw-grid   { grid-template-columns: 1fr; }
  .stats-row  { grid-template-columns: 1fr 1fr; }
  .tips-grid  { grid-template-columns: 1fr; }
  .seo-cta-band { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
}