/* ═══════════════════════════════════════════════════ */
/*  SoftSkills — Disagreeing Diplomatically Styles     */
/* ═══════════════════════════════════════════════════ */

/* ---------- Keyframes ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #2c3e50;
  line-height: 1.65;
  padding-bottom: 3rem;
}

/* ---------- Back Link ---------- */
.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 1.5rem 0;
  transition: color 0.2s;
}

.back-link:hover {
  color: #fff;
}

/* ---------- Page Header ---------- */
.page-header {
  text-align: center;
  color: #fff;
  padding: 2rem 1.5rem 2.5rem;
}

.page-header h1 {
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Progress Bar ---------- */
.progress-container {
  max-width: 1100px;
  margin: 0 auto 0;
  padding: 0 1.5rem;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

/* ---------- Section Tabs ---------- */
.section-tabs {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(102, 126, 234, 0.92);
  backdrop-filter: blur(8px);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-radius: 0 0 12px 12px;
}

.tab-btn {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.55rem 1.1rem;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255,255,255,0.28);
}

.tab-btn.active {
  background: #fff;
  color: #667eea;
  border-color: #fff;
}

/* ---------- Container ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

/* ---------- Content Sections ---------- */
.content-section {
  display: none;
  animation: fadeIn 0.45s ease;
}

.content-section.active {
  display: block;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 15px;
  padding: 2rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

.section-intro {
  color: #555;
  font-size: 1rem;
  max-width: 720px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════ */
/*  SECTION 1 — Disagreement Spectrum                 */
/* ═══════════════════════════════════════════════════ */

.spectrum-container {
  margin-top: 1.5rem;
}

.spectrum-labels-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spectrum-bar-track {
  position: relative;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.spectrum-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #a8a8c8, #ffd166, #5cce7b, #ff6b6b, #c0392b);
  border-radius: 9px;
}

.spectrum-marker {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 28px;
  background: #1a1a2e;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  z-index: 2;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.spectrum-zones {
  display: flex;
  height: 100%;
}

.spectrum-zone {
  flex: 1;
}

.spectrum-zone.passive      { flex: 2; }
.spectrum-zone.diplomatic    { flex: 1; background: rgba(92,206,123,0.25); }
.spectrum-zone.aggressive    { flex: 2; }

/* Spectrum Levels (clickable buttons) */
.spectrum-levels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.spectrum-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 0.4rem;
  background: #f4f4f9;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.spectrum-level:hover {
  background: #e8e8f8;
  transform: translateY(-2px);
}

.spectrum-level.active {
  background: #fff;
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102,126,234,0.2);
}

.spectrum-level .level-icon {
  font-size: 1.5rem;
}

.spectrum-level .level-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: #aaa;
}

.spectrum-level .level-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #555;
  line-height: 1.2;
}

/* Spectrum Detail Card */
.spectrum-detail-card {
  background: #f8f8ff;
  border-radius: 15px;
  padding: 1.5rem;
  animation: fadeIn 0.4s ease;
  border-left: 4px solid #667eea;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.detail-icon {
  font-size: 2rem;
}

.detail-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  margin-bottom: 0.25rem;
}

.detail-badge.badge-good {
  background: #d4edda;
  color: #155724;
}

.detail-badge.badge-warn {
  background: #fff3cd;
  color: #856404;
}

.detail-badge.badge-bad {
  background: #f8d7da;
  color: #721c24;
}

.detail-header h3 {
  font-size: 1.15rem;
  color: #1a1a2e;
}

.detail-description {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.detail-example .example-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #667eea;
  letter-spacing: 0.5px;
}

.detail-example blockquote {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-top: 0.4rem;
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════ */
/*  SECTION 2 — Techniques Grid                       */
/* ═══════════════════════════════════════════════════ */

.techniques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.technique-card {
  background: #fff;
  border-radius: 15px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.5s ease both;
  transition: transform 0.3s, box-shadow 0.3s;
}

.technique-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.13);
}

.technique-card:nth-child(2) { animation-delay: 0.08s; }
.technique-card:nth-child(3) { animation-delay: 0.16s; }
.technique-card:nth-child(4) { animation-delay: 0.24s; }
.technique-card:nth-child(5) { animation-delay: 0.32s; }
.technique-card:nth-child(6) { animation-delay: 0.40s; }

.tech-number {
  font-size: 0.7rem;
  font-weight: 800;
  color: #667eea;
  letter-spacing: 1.5px;
  margin-bottom: 0.4rem;
}

.technique-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.tech-pattern {
  position: relative;
  background: #2c3e50;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.pattern-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aab2bd;
  margin-bottom: 0.4rem;
}

.tech-pattern code {
  color: #ecf0f1;
  font-size: 0.88rem;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  line-height: 1.55;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

.copy-btn.copied {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

.tech-why {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.tech-why strong {
  color: #1a1a2e;
}

.tech-example {
  margin-top: auto;
}

.tech-example .example-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #667eea;
  letter-spacing: 0.5px;
}

.tech-example blockquote {
  background: #f4f4f9;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid #667eea;
  color: #2c3e50;
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.6;
  margin-top: 0.3rem;
}

/* ═══════════════════════════════════════════════════ */
/*  SECTION 3 — Anti-Patterns                         */
/* ═══════════════════════════════════════════════════ */

.antipatterns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.antipattern-card {
  background: #fff;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.antipattern-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.ap-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.bad-label {
  background: #fde8e8;
  color: #c0392b;
}

.good-label {
  background: #d4efdf;
  color: #1e8449;
}

.ap-bad blockquote,
.ap-good blockquote {
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
  margin: 0.3rem 0 0.5rem;
}

.ap-bad blockquote {
  border-left-color: #e74c3c;
  color: #7f8c8d;
}

.ap-good blockquote {
  border-left-color: #27ae60;
  color: #2c3e50;
}

.ap-arrow {
  text-align: center;
  font-size: 1.3rem;
  color: #bbb;
  margin: 0.3rem 0;
}

.ap-note {
  font-size: 0.8rem;
  color: #999;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
}

/* ═══════════════════════════════════════════════════ */
/*  SECTION 4 — Scenario Practice                     */
/* ═══════════════════════════════════════════════════ */

.score-display {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  background: #f0f0ff;
  padding: 0.45rem 1rem;
  border-radius: 25px;
}

.score-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.score-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #667eea;
}

.score-outof {
  font-size: 0.85rem;
  color: #888;
}

.scenarios-container {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.scenario-card {
  background: #fff;
  border-radius: 15px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  animation: fadeIn 0.45s ease;
}

.scenario-number {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
}

.scenario-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1rem;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid #e0e0e8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 0.92rem;
  color: #2c3e50;
  transition: all 0.2s;
  line-height: 1.5;
}

.option-btn:hover:not(.disabled) {
  border-color: #667eea;
  background: #f8f8ff;
}

.option-btn.disabled {
  pointer-events: none;
  opacity: 0.85;
}

.option-btn.correct {
  border-color: #27ae60 !important;
  background: #d4efdf !important;
  animation: pulse 0.6s ease;
}

.option-btn.incorrect {
  border-color: #e74c3c !important;
  background: #fde8e8 !important;
  animation: shake 0.5s ease;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f0f8;
  font-weight: 700;
  font-size: 0.8rem;
  color: #667eea;
  flex-shrink: 0;
}

.option-btn.correct .option-letter {
  background: #27ae60;
  color: #fff;
}

.option-btn.incorrect .option-letter {
  background: #e74c3c;
  color: #fff;
}

.feedback-box {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

.feedback-box.correct-fb {
  background: #d4efdf;
  border-left: 4px solid #27ae60;
  color: #155724;
}

.feedback-box.incorrect-fb {
  background: #fde8e8;
  border-left: 4px solid #e74c3c;
  color: #721c24;
}

.feedback-box strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* ═══════════════════════════════════════════════════ */
/*  SECTION 5 — Quick Reference Card                  */
/* ═══════════════════════════════════════════════════ */

.reference-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0,0,0,0.12);
  margin-top: 0.5rem;
  border: 2px solid #e0e0f0;
}

.ref-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 1.25rem 1.75rem;
}

.ref-header h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: #e8e8f0;
}

.ref-item {
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.ref-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ref-item strong {
  display: block;
  font-size: 0.92rem;
  color: #1a1a2e;
  margin-bottom: 0.2rem;
}

.ref-item p {
  font-size: 0.83rem;
  color: #666;
  line-height: 1.5;
}

.ref-footer {
  padding: 1.25rem 1.75rem;
  background: #f8f8ff;
  border-top: 1px solid #e8e8f0;
}

.ref-footer p {
  font-size: 0.95rem;
  color: #2c3e50;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: rgba(255,255,255,0.65);
  padding: 2.5rem 1.5rem 1rem;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════ */
/*  RESPONSIVE — 768px                                */
/* ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 1.7rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .techniques-grid {
    grid-template-columns: 1fr;
  }

  .antipatterns-grid {
    grid-template-columns: 1fr;
  }

  .spectrum-levels {
    grid-template-columns: repeat(3, 1fr);
  }

  .spectrum-levels .spectrum-level:nth-child(4),
  .spectrum-levels .spectrum-level:nth-child(5) {
    grid-column: span 1;
  }

  .spectrum-labels-top {
    font-size: 0.7rem;
  }

  .section-tabs {
    gap: 0.35rem;
  }

  .tab-btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
  }

  .card {
    padding: 1.5rem;
  }

  .ref-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════ */
/*  RESPONSIVE — 480px                                */
/* ═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.4rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .section-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.3rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .section-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }

  .spectrum-levels {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .spectrum-levels .spectrum-level:last-child {
    grid-column: span 2;
  }

  .spectrum-level {
    padding: 0.6rem 0.3rem;
  }

  .spectrum-level .level-name {
    font-size: 0.65rem;
  }

  .technique-card {
    padding: 1.25rem;
  }

  .antipattern-card {
    padding: 1.25rem;
  }

  .scenario-card {
    padding: 1.25rem;
  }

  .card {
    padding: 1.25rem;
  }

  .option-btn {
    font-size: 0.85rem;
    padding: 0.7rem 0.9rem;
  }

  .container {
    padding: 1rem 0.75rem 0;
  }

  .progress-container {
    padding: 0 0.75rem;
  }
}
