    /* ===== BASE ===== */
    :root {
      --bg: #f8fafc;
      --surface: #ffffff;
      --surface-2: #f1f5f9;
      --text: #1e293b;
      --text-dim: #64748b;
      --text-muted: #94a3b8;
      --primary: #6366f1;
      --primary-hover: #4f46e5;
      --primary-light: #e0e7ff;
      --accent: #ec4899;
      --accent-light: #fce7f3;
      --border: #e2e8f0;
      --success: #10b981;
      --success-light: #d1fae5;
      --warning: #f59e0b;
      --warning-light: #fef3c7;
      --danger: #ef4444;
      --danger-light: #fee2e2;
      --radius: 16px;
      --radius-sm: 8px;
      --radius-lg: 24px;
      --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
      --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
      --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
      --font-size: 16px;
      --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
   /* ===== THEMES ===== */
[data-theme="nature"] {
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: #d1fae5;
  --accent: #06b6d4;
  --accent-light: #cffafe;
}

[data-theme="sunset"] {
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-light: #fed7aa;
  --accent: #8b5cf6;
  --accent-light: #e9d5ff;
}

[data-theme="minimal"] {
  --primary: #1e293b;
  --primary-hover: #0f172a;
  --primary-light: #e2e8f0;
  --accent: #64748b;
  --accent-light: #f1f5f9;
}

[data-theme="nature"][data-theme-mode="dark"] {
  --bg: #064e3b;
  --surface: #065f46;
  --surface-2: #047857;
  --text: #f1f5f9;
  --text-dim: #a7f3d0;
  --text-muted: #6ee7b7;
  --border: #047857;
}

[data-theme="sunset"][data-theme-mode="dark"] {
  --bg: #7c2d12;
  --surface: #9a3412;
  --surface-2: #c2410c;
  --text: #f1f5f9;
  --text-dim: #fed7aa;
  --text-muted: #fdba74;
  --border: #c2410c;
}

[data-theme="minimal"][data-theme-mode="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --text: #f1f5f9;
  --text-dim: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
}
    [data-theme="dark"] {
      --bg: #0f172a;
      --surface: #1e293b;
      --surface-2: #334155;
      --text: #f1f5f9;
      --text-dim: #94a3b8;
      --text-muted: #64748b;
      --primary: #818cf8;
      --primary-hover: #6366f1;
      --primary-light: #312e81;
      --accent: #f472b6;
      --accent-light: #831843;
      --border: #334155;
      --success: #34d399;
      --success-light: #064e3b;
      --warning: #fbbf24;
      --warning-light: #78350f;
      --danger: #f87171;
      --danger-light: #7f1d1d;
      --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
      --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4), 0 10px 10px -5px rgba(0,0,0,0.3);
      --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.5);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'Vazirmatn', Tahoma, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.7;
      font-size: var(--font-size);
      transition: var(--transition);
      min-height: 100vh;
    }
    .container { max-width: 1000px; margin: 0 auto; padding: 20px; }

    /* ===== HEADER ===== */
    header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 20px 0; border-bottom: 2px solid var(--border);
      margin-bottom: 40px; position: sticky; top: 0;
      background: var(--bg); z-index: 100; backdrop-filter: blur(10px);
    }
    .logo {
      font-size: 1.8rem; font-weight: 900;
      background: linear-gradient(135deg, var(--primary), var(--accent));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text; cursor: pointer;
      transition: var(--transition);
    }
    .logo:hover { transform: scale(1.05); }
    .controls { display: flex; gap: 12px; align-items: center; }
    .icon-btn {
      width: 48px; height: 48px; border-radius: 50%;
      background: var(--surface); border: 2px solid var(--border);
      cursor: pointer; font-size: 1.3rem;
      display: flex; align-items: center; justify-content: center;
      transition: var(--transition); box-shadow: var(--shadow);
    }
    .icon-btn:hover { background: var(--primary); color: white; border-color: var(--primary); transform: rotate(180deg); }

    /* ===== BUTTONS ===== */
    .btn {
      background: var(--primary); color: white; border: none;
      padding: 14px 28px; border-radius: 30px; cursor: pointer;
      font-weight: 700; transition: var(--transition);
      font-size: 1rem; font-family: inherit;
      display: inline-flex; align-items: center; gap: 8px;
      box-shadow: var(--shadow);
    }
    .btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
    .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
    .btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
    .btn-success { background: var(--success); }
    .btn-success:hover { background: #059669; }
    .btn-danger { background: var(--danger); }
    .btn-danger:hover { background: #dc2626; }

    /* ===== CARDS & GRID ===== */
    .card {
      background: var(--surface); border: 2px solid var(--border);
      border-radius: var(--radius); padding: 30px; margin-bottom: 24px;
      box-shadow: var(--shadow); transition: var(--transition);
    }
    .card:hover { box-shadow: var(--shadow-lg); }
    .grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 24px; margin-bottom: 30px;
    }
    .test-card {
      cursor: pointer; transition: var(--transition);
      position: relative; overflow: hidden; text-align: center;
    }
    .test-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0;
      height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent));
      transform: scaleX(0); transition: transform 0.3s;
    }
    .test-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--shadow-xl); }
    .test-card:hover::before { transform: scaleX(1); }
    .test-card .icon { font-size: 4rem; margin-bottom: 20px; display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
    .test-card h3 { margin-bottom: 12px; color: var(--primary); font-size: 1.4rem; font-weight: 800; }
    .test-card p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }

    .badge {
      display: inline-block; padding: 6px 16px; border-radius: 20px;
      font-size: 0.85rem; font-weight: 700; background: var(--primary);
      color: white; margin-top: 15px; transition: var(--transition);
    }
    .badge.done { background: var(--success); }
    .badge.pending { background: var(--warning); }

    /* ===== PROGRESS ===== */
    .progress-bar {
      height: 10px; background: var(--surface-2); border-radius: 10px;
      margin: 25px 0; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }
    .progress-fill {
      height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
      border-radius: 10px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative; overflow: hidden;
    }
    .progress-fill::after {
      content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
      animation: shimmer 2s infinite;
    }
    @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

    /* ===== QUESTION ===== */
    .question-card {
      background: var(--surface); border: 2px solid var(--border);
      border-radius: var(--radius); padding: 25px; margin-bottom: 20px;
      transition: var(--transition); animation: slideIn 0.4s ease-out;
    }
    @keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    .question-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
    .question-number {
      display: inline-block; background: var(--primary); color: white;
      width: 36px; height: 36px; border-radius: 50%; text-align: center;
      line-height: 36px; font-weight: 700; margin-left: 12px; font-size: 0.9rem;
    }
    .question-text { font-weight: 600; margin-bottom: 20px; font-size: 1.15rem; line-height: 1.8; color: var(--text); }
    .options {
      display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
    }
    .option {
      width: 56px; height: 56px; border-radius: 50%;
      background: var(--surface-2); border: 3px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; font-weight: 700; transition: var(--transition);
      font-size: 1.1rem; position: relative;
    }
    .option:hover { border-color: var(--primary); transform: scale(1.15); box-shadow: var(--shadow-lg); }
    .option.selected {
      background: var(--primary); color: white; border-color: var(--primary);
      transform: scale(1.1); box-shadow: 0 0 0 4px var(--primary-light);
    }
    .option.selected::after {
      content: '✓'; position: absolute; top: -8px; right: -8px;
      background: var(--success); color: white; width: 24px; height: 24px;
      border-radius: 50%; font-size: 0.8rem;
      display: flex; align-items: center; justify-content: center; font-weight: 900;
    }

    /* ===== RESULT ===== */
    .result-box {
      text-align: center; padding: 40px 30px;
      background: linear-gradient(135deg, var(--surface), var(--surface-2));
      border-radius: var(--radius-lg); border: 3px solid var(--primary);
      box-shadow: var(--shadow-xl); animation: resultReveal 0.6s ease-out;
    }
    @keyframes resultReveal { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
    .result-type {
      font-size: 3.5rem; font-weight: 900;
      background: linear-gradient(135deg, var(--primary), var(--accent));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text; margin: 30px 0; letter-spacing: 2px;
      text-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .result-subtitle { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 30px; font-weight: 500; }

    .chart-bar {
      display: flex; align-items: center; gap: 15px; margin: 16px 0;
      animation: barGrow 0.8s ease-out;
    }
    @keyframes barGrow { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
    .chart-label { width: 40px; font-weight: 800; font-size: 1.1rem; color: var(--primary); }
    .chart-track {
      flex: 1; height: 20px; background: var(--surface-2);
      border-radius: 10px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }
    .chart-fill {
      height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
      border-radius: 10px; transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
    }
    .chart-value { width: 60px; text-align: left; font-weight: 700; color: var(--text); font-size: 0.95rem; }

    .char-card {
      display: flex; align-items: center; gap: 20px; padding: 20px;
      background: var(--surface-2); border-radius: var(--radius);
      margin-bottom: 15px; transition: var(--transition);
      border: 2px solid transparent;
    }
    .char-card:hover { border-color: var(--primary); transform: translateX(-5px); box-shadow: var(--shadow-lg); }
    .char-emoji { font-size: 3.5rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
    .char-info { flex: 1; }
    .char-name { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
    .char-type { font-size: 0.9rem; color: var(--text-dim); }
    .match-score { font-weight: 800; color: var(--accent); font-size: 1.2rem; background: var(--accent-light); padding: 8px 16px; border-radius: 20px; }

    .section-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid var(--border);
    }
    .section-title {
      font-size: 1.8rem; font-weight: 800; color: var(--primary);
      display: flex; align-items: center; gap: 12px;
    }
    .stats-grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px; margin: 30px 0;
    }
    .stat-card {
      background: var(--surface); border: 2px solid var(--border);
      border-radius: var(--radius); padding: 25px; text-align: center;
      transition: var(--transition);
    }
    .stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
    .stat-icon { font-size: 2.5rem; margin-bottom: 10px; }
    .stat-value { font-size: 2rem; font-weight: 900; color: var(--primary); margin-bottom: 5px; }
    .stat-label { font-size: 0.9rem; color: var(--text-dim); font-weight: 600; }
    .stat-card.clickable {
    cursor: pointer;
    transition: var(--transition);
}
.stat-card.clickable:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--surface), var(--primary-light));
}
.stat-card.clickable::after {
    content: '←';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.2rem;
    color: var(--primary);
    opacity: 0;
    transition: var(--transition);
}
.stat-card.clickable:hover::after {
    opacity: 1;
}

    .flex-center { display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; }
    .hidden { display: none !important; }
    .mt-30 { margin-top: 30px; }
    .text-center { text-align: center; }

 @media (max-width: 768px) {
  .container { padding: 15px; }
  header { flex-direction: column; gap: 15px; }
  .logo { font-size: 1.5rem; }
  .grid { grid-template-columns: 1fr; }
  .result-type { font-size: 2.5rem; }
  .option { width: 44px; height: 44px; font-size: 0.95rem; margin: 3px; }
  .card { padding: 20px; }
  .pair-options { flex-direction: column !important; }
  .pair-options .option { width: 100% !important; min-width: 0 !important; }
}
    /* Help Modal */
    .modal {
      display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.7); z-index: 1000;
      align-items: center; justify-content: center; padding: 20px;
    }
    .modal.active { display: flex; }
    .modal-content {
      background: var(--surface); border-radius: var(--radius-lg);
      padding: 40px; max-width: 600px; width: 100%; max-height: 80vh;
      overflow-y: auto; box-shadow: var(--shadow-xl); animation: modalReveal 0.3s ease-out;
    }
    @keyframes modalReveal { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
    .modal-close {
      float: left; background: var(--danger); color: white; border: none;
      width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
      font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
      transition: var(--transition);
    }
    .modal-close:hover { transform: rotate(90deg); background: #dc2626; }
        /* ===== FAQ ===== */
    .faq-section {
      margin: 40px 0;
      padding: 30px;
      background: var(--surface);
      border-radius: var(--radius);
      border: 2px solid var(--border);
    }
    .faq-title {
      font-size: 1.8rem;
      font-weight: 800;
      color: var(--primary);
      margin-bottom: 25px;
      text-align: center;
    }
    .faq-item {
      background: var(--surface-2);
      border: 2px solid var(--border);
      border-radius: 12px;
      margin-bottom: 12px;
      overflow: hidden;
      transition: var(--transition);
    }
    .faq-item[open] {
      border-color: var(--primary);
      box-shadow: var(--shadow-lg);
    }
    .faq-item summary {
      padding: 18px 20px;
      cursor: pointer;
      font-weight: 700;
      font-size: 1.05rem;
      color: var(--text);
      list-style: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: var(--transition);
    }
    .faq-item summary::-webkit-details-marker {
      display: none;
    }
    .faq-item summary:hover {
      background: var(--primary-light);
      color: var(--primary);
    }
    .faq-item summary::after {
      content: '▼';
      font-size: 0.9rem;
      color: var(--primary);
      transition: transform 0.3s;
    }
    .faq-item[open] summary::after {
      transform: rotate(180deg);
    }
    .faq-answer {
      padding: 0 20px 20px;
      color: var(--text-dim);
      line-height: 1.9;
      font-size: 0.95rem;
    }
    .faq-answer strong {
      color: var(--warning);
    }
    .disclaimer-box {
      background: var(--warning-light);
      border: 2px solid var(--warning);
      border-radius: 12px;
      padding: 20px;
      margin-top: 25px;
      text-align: center;
    }
    .disclaimer-box h4 {
      color: var(--warning);
      margin-bottom: 10px;
      font-size: 1.1rem;
    }
    .disclaimer-box p {
      color: var(--text);
      line-height: 1.8;
      font-size: 0.95rem;
    }
        /* ===== MEDALS ===== */
    .medals-section {
      margin: 30px 0;
      padding: 25px;
      background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
      border-radius: var(--radius-lg);
      border: 2px solid var(--border);
    }
    .medals-title {
      text-align: center;
      font-size: 1.5rem;
      font-weight: 800;
      color: var(--primary);
      margin-bottom: 20px;
    }
    .medals-grid {
      display: flex;
      justify-content: center;
      gap: 20px;
      flex-wrap: wrap;
    }
    .medal {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 20px;
      background: var(--surface);
      border-radius: var(--radius);
      min-width: 120px;
      transition: var(--transition);
      border: 2px solid var(--border);
      cursor: pointer;
    }
    .medal:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-lg);
      border-color: var(--primary);
    }
    .medal.locked {
      opacity: 0.4;
      filter: grayscale(100%);
    }
    .medal.unlocked {
      animation: medalUnlock 0.6s ease-out;
    }
    @keyframes medalUnlock {
      0% { transform: scale(0.5); opacity: 0; }
      50% { transform: scale(1.2); }
      100% { transform: scale(1); opacity: 1; }
    }
    .medal-icon {
      font-size: 3rem;
      filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    }
    .medal-name {
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--text);
      text-align: center;
    }
    .medal-desc {
      font-size: 0.8rem;
      color: var(--text-dim);
      text-align: center;
    }
        /* ===== RADAR CHART ===== */
    /* ===== SHARE CARD ===== */
.share-card {
    width: 1080px;
    height: 1080px;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #8b5cf6 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 80px;
    box-sizing: border-box;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: white;
    position: relative;
    overflow: hidden;
}
.share-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.share-card-header {
    text-align: center;
    position: relative;
    z-index: 2;
}
.share-card-logo {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}
.share-card-title {
    font-size: 32px;
    font-weight: 600;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.share-card-body {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.share-card-result {
    font-size: 110px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
    text-shadow: 0 8px 30px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
}
.share-card-desc {
    font-size: 36px;
    font-weight: 500;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.share-card-footer {
    text-align: center;
    position: relative;
    z-index: 2;
    padding-top: 30px;
    border-top: 2px solid rgba(255,255,255,0.3);
}
.share-card-date {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 15px;
    opacity: 0.9;
}
.share-card-url {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
    .radar-polygon {
      animation: radarGrow 1s ease-out;
      transform-origin: center;
    }
    @keyframes radarGrow {
      0% { transform: scale(0); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }
        /* ===== ACCORDION ===== */
    .accordion {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .accordion-item {
      background: var(--surface-2);
      border: 2px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      transition: var(--transition);
    }
    .accordion-item[open] {
      border-color: var(--primary);
      box-shadow: var(--shadow-lg);
    }
    .accordion-header {
      display: flex;
      align-items: center;
      padding: 16px 20px;
      cursor: pointer;
      list-style: none;
      user-select: none;
      transition: var(--transition);
    }
    .accordion-header::-webkit-details-marker {
      display: none;
    }
    .accordion-header:hover {
      background: var(--primary-light);
    }
    .accordion-title {
      flex: 1;
      font-weight: 700;
      font-size: 1.05rem;
      color: var(--text);
    }
    .accordion-count {
      background: var(--primary);
      color: white;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: 700;
      margin-left: 10px;
    }
    .accordion-arrow {
      font-size: 0.9rem;
      color: var(--primary);
      transition: transform 0.3s;
    }
    .accordion-item[open] .accordion-arrow {
      transform: rotate(180deg);
    }
    .accordion-content {
      padding: 15px 20px 20px;
      background: var(--surface);
      animation: slideDown 0.3s ease-out;
    }
    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .accordion-content .char-card {
      margin-bottom: 10px;
    }
    .accordion-content .char-card:last-child {
      margin-bottom: 0;
    }
    @media (max-width: 768px) {
      .accordion-header {
        padding: 12px 15px;
        font-size: 0.95rem;
      }
      .accordion-title {
        font-size: 0.95rem;
      }
      .accordion-count {
        font-size: 0.75rem;
        padding: 3px 10px;
      }
    }
    
  /* ===== PRINT & PDF REPORT ===== */
@media print {
    body { background: white !important; color: #1e293b !important; font-size: 12pt; }
    header, .controls, .btn, .icon-btn, .medals-section, .flex-center, #shareCardModal { display: none !important; }
    .container { max-width: 100%; padding: 0; }
    .card { box-shadow: none !important; border: 1px solid #e2e8f0 !important; page-break-inside: avoid; margin-bottom: 15px; }
    .result-box { page-break-after: always; }
    .report-header { display: block !important; text-align: center; margin-bottom: 30px; border-bottom: 3px solid #6366f1; padding-bottom: 20px; }
    .report-footer { display: block !important; text-align: center; margin-top: 30px; font-size: 10pt; color: #64748b; border-top: 1px solid #e2e8f0; padding-top: 15px; }
    .chart-fill, .progress-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
.report-header, .report-footer { display: none; }
.report-header h1 { font-size: 2rem; color: #6366f1; margin-bottom: 10px; }
.report-header p { color: #64748b; font-size: 1rem; }
.report-section-title { font-size: 1.4rem; color: #6366f1; margin: 25px 0 15px; border-right: 4px solid #6366f1; padding-right: 12px; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin: 20px 0; }
.report-summary-item { background: #f1f5f9; padding: 15px; border-radius: 12px; text-align: center; }
.report-summary-item .value { font-size: 1.8rem; font-weight: 900; color: #6366f1; }
.report-summary-item .label { font-size: 0.9rem; color: #64748b; margin-top: 5px; }
/* ===== ACCESSIBILITY (a11y) & DYNAMIC THEME ===== */
*:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 3px;
    border-radius: 8px;
}
.test-card:focus-visible {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
}
html, body, .card, .btn, .icon-btn, .result-box {
    transition: background-color 0.8s ease, color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease !important;
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 15px;
}
.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}
.skeleton-text {
    height: 16px;
    flex: 1;
}
.skeleton-text-sm {
    height: 12px;
    width: 60%;
    margin-top: 8px;
}
/* ===== STAGGERED ANIMATION (انیمیشن پله‌ای) ===== */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* تنظیم تاخیر پله‌ای برای کارت‌های تست */
.grid .test-card:nth-child(1) { animation-delay: 0.1s; }
.grid .test-card:nth-child(2) { animation-delay: 0.2s; }
.grid .test-card:nth-child(3) { animation-delay: 0.3s; }
.grid .test-card:nth-child(4) { animation-delay: 0.4s; }
.grid .test-card:nth-child(5) { animation-delay: 0.5s; }
.grid .test-card:nth-child(6) { animation-delay: 0.6s; }
.grid .test-card:nth-child(7) { animation-delay: 0.7s; }
.grid .test-card:nth-child(8) { animation-delay: 0.8s; }
.grid .test-card:nth-child(9) { animation-delay: 0.9s; }
.grid .test-card:nth-child(10) { animation-delay: 1.0s; }
.grid .test-card:nth-child(11) { animation-delay: 1.1s; }

/* تنظیم تاخیر برای کارت‌های آمار و مدال‌ها */
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.3s; }
.medals-grid .medal:nth-child(1) { animation-delay: 0.4s; }
.medals-grid .medal:nth-child(2) { animation-delay: 0.5s; }
.medals-grid .medal:nth-child(3) { animation-delay: 0.6s; }
