/* assets/report-card.css — کارنامه‌ی هوشمند
   عیناً کپی‌شده از app/globals.css و کلاس‌هایِ app/page.tsx خودِ پروژه‌ی v0 (طبقِ خواستِ
   سینا: «همه چیزو از همون کد بردار ظاهری») — فقط importهایِ Tailwind/shadcn و بلاکِ
   @theme (که مخصوصِ Next.jsه) حذف شدن، چون اینجا لازم نیستن (هیچ‌کدوم از رنگ‌هایِ زیر
   از طریقِ اون متغیرها resolve نمی‌شدن، مستقیم hex/rgba هستن). فونتِ Vazirmatn هم از
   همون @font-face که تو assets/exam.css تعریف شده میاد (این فایل به‌عنوانِ dependency
   صف شده). */

* { box-sizing: border-box; }
html { background: #1a1030; }
body.iexam-standalone-page { margin: 0; background: #1a1030; color: #f8f4ff; font-family: 'Vazirmatn', sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.search-shell, .report-shell { min-height: 100vh; overflow: hidden; background: #1a1030; position: relative; direction: rtl; }
.search-shell { display: flex; flex-direction: column; align-items: center; padding: 28px 20px 22px; }
.ambient { position: absolute; border-radius: 999px; pointer-events: none; filter: blur(2px); opacity: .5; }
.ambient-one { width: 360px; height: 360px; top: -170px; right: -100px; background: radial-gradient(circle, rgba(124,63,174,.45), transparent 70%); }
.ambient-two { width: 420px; height: 420px; bottom: -240px; left: -160px; background: radial-gradient(circle, rgba(91,42,134,.5), transparent 70%); }
.brand-mark { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: #eee6f8; z-index: 1; }
.brand-mark.compact { font-size: 14px; }
.brand-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #ffc107; background: linear-gradient(135deg, #5b2a86, #7c3fae); box-shadow: 0 8px 24px rgba(91,42,134,.35); }
.compact .brand-icon { width: 32px; height: 32px; border-radius: 10px; }
.search-content { width: 100%; max-width: 510px; margin: auto; padding: 72px 0 64px; text-align: center; animation: rc-rise .75s ease both; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #bca9cb; font-size: 12px; letter-spacing: .02em; }
.eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: #ffc107; box-shadow: 0 0 12px #ffc107; }
.search-shell h1, .report-shell h1 { margin: 17px 0 12px; font-size: clamp(36px, 9vw, 60px); line-height: 1.25; letter-spacing: -.02em; font-weight: 800; color: #f8f4ff; }
.search-shell h1 em, .report-shell h1 em { color: #ffc107; font-style: normal; }
.hero-copy { margin: 0 auto 35px; max-width: 420px; color: #aa9ab9; font-size: 15px; line-height: 1.9; }
.glass-card { background: linear-gradient(145deg, rgba(85,47,112,.43), rgba(40,24,68,.62)); border: 1px solid rgba(197,158,224,.18); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.search-card { padding: 25px; text-align: right; }
.card-heading, .section-title, .analysis-head, .report-header, .welcome, .mistake-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-heading h2, .section-title h2, .analysis-head h2 { margin: 4px 0 0; font-size: 18px; color: #f8f4ff; }
.card-heading p { margin: 5px 0 0; color: #a99bb9; font-size: 12px; }
.heading-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; color: #d8b4f2; background: rgba(124,63,174,.3); border: 1px solid rgba(197,158,224,.22); border-radius: 13px; }
.heading-icon.gold { color: #ffc107; background: rgba(255,193,7,.1); border-color: rgba(255,193,7,.25); }
.search-form { display: grid; gap: 15px; margin-top: 25px; }
.search-form label { display: grid; gap: 8px; color: #ded4e8; font-size: 12px; }
.search-form input { width: 100%; border: 1px solid rgba(219,198,235,.15); border-radius: 11px; padding: 13px 14px; color: #fff; background: rgba(15,7,28,.28); outline: none; transition: .2s; }
.search-form input::placeholder { color: #837392; }
.search-form input:focus { border-color: #a46bc9; box-shadow: 0 0 0 3px rgba(124,63,174,.18); }
.primary-button, .secondary-button { display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 11px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.primary-button { min-height: 48px; color: #22112d; background: linear-gradient(100deg, #ffc107, #f6d36d); box-shadow: 0 10px 25px rgba(255,193,7,.15); width: 100%; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:disabled { opacity: .7; cursor: wait; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; color: #867594; font-size: 11px; }
.privacy-note svg { color: #7c3fae; }
.error-message { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; color: #ffd2d2; background: rgba(204,71,91,.13); border: 1px solid rgba(230,101,119,.2); font-size: 12px; line-height: 1.8; }
.error-message svg { flex: 0 0 auto; color: #ff8c9b; margin-top: 2px; }
.search-footer { color: #776684; font-size: 11px; z-index: 1; }

.report-shell { padding: 25px 18px 40px; }
.report-inner { max-width: 1050px; margin: auto; position: relative; z-index: 1; }
.report-header { border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 20px; }
.text-button { display: flex; align-items: center; gap: 7px; color: #bca9cb; border: 0; background: none; font-size: 12px; }
.welcome { align-items: flex-end; margin: 46px 0 24px; }
.welcome h1 { margin: 12px 0 5px; font-size: clamp(28px, 6vw, 45px); }
.welcome p { margin: 0; color: #a99bb9; font-size: 13px; }
.date-chip-group { display: flex; flex-direction: column; gap: 10px; }
.date-chip { color: #9685a7; font-size: 11px; text-align: left; line-height: 1.9; white-space: nowrap; }
.date-chip strong { display: block; color: #ded4e8; font-weight: 500; }
.date-chip.secondary strong { color: #c9b7dd; }
.score-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 25px 30px; margin-bottom: 18px; }
.score-card h2 { margin: 9px 0 6px; font-size: 21px; }
.score-card p { margin: 0; color: #a99bb9; font-size: 12px; }

/* «سطحِ کلی» — تحلیلِ ترکیبی که نمودارهایِ خام رو معنی‌دار می‌کنه */
.level-card { padding: 24px 28px; margin-bottom: 20px; }
.trend-badge { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 12px; flex: none; }
.trend-badge.up { color: #73d4a0; background: rgba(54,165,111,.14); border: 1px solid rgba(54,165,111,.25); }
.trend-badge.down { color: #ff8795; background: rgba(205,61,83,.12); border: 1px solid rgba(205,61,83,.22); }
.trend-badge.flat { color: #d6b7eb; background: rgba(124,63,174,.16); border: 1px solid rgba(124,63,174,.25); }
.level-ladder { display: flex; gap: 6px; margin: 22px 0 18px; }
.level-step { flex: 1; position: relative; text-align: center; padding: 14px 4px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.level-step .level-dot { display: block; width: 8px; height: 8px; margin: 0 auto 8px; border-radius: 50%; background: rgba(255,255,255,.15); }
.level-step b { display: block; font-size: 11.5px; color: #cdbfd9; font-weight: 500; }
.level-step small { display: block; font-size: 9px; color: #7c6a8c; margin-top: 2px; }
.level-step.current { background: rgba(255,193,7,.12); border-color: rgba(255,193,7,.4); }
.level-step.current .level-dot { background: #ffc107; box-shadow: 0 0 10px rgba(255,193,7,.6); }
.level-step.current b { color: #ffe9a8; }
.level-step.start { border-color: rgba(124,63,174,.5); }
.level-step.start .level-dot { background: #a875cf; }
.level-flag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 8.5px; padding: 2px 7px; border-radius: 10px; background: #ffc107; color: #281844; font-weight: 700; white-space: nowrap; }
.level-step.start .level-flag { background: #a875cf; color: #fff; }
.level-summary { color: #d7cbe2; font-size: 12.5px; line-height: 1.9; background: rgba(124,63,174,.1); border-radius: 12px; padding: 14px 16px; margin: 0; }
@media (max-width: 640px) { .level-ladder { flex-wrap: wrap; } .level-step { flex: 1 1 30%; } }
.section-kicker { color: #b69acb; font-size: 11px; }
.score-wrap { display: flex; align-items: center; gap: 15px; flex: 0 0 auto; }
.score-ring { width: 135px; height: 135px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#ffc107 var(--score, 0deg), rgba(255,255,255,.1) 0); position: relative; transform: rotate(-90deg); animation: rc-scale-in .7s ease both; }
.score-ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #2b1943; }
.score-center { transform: rotate(90deg); display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.score-center svg { color: #ffc107; margin-bottom: 2px; }
.score-center strong { font-size: 25px; line-height: 1.15; }
.score-center span { color: #a99bb9; font-size: 10px; }
.score-caption { display: flex; flex-direction: column; gap: 4px; }
.score-caption b { color: #ffc107; font-size: 20px; }
.score-caption span { color: #9886a6; font-size: 11px; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 35px; }
.charts-grid .glass-card { padding: 22px; }
.section-title svg { color: #ffc107; }
.chart-box { height: 270px; margin-top: 15px; position: relative; }
.radar-box { height: 285px; }

.mistakes-section { margin-bottom: 35px; }
.section-title.outside { margin-bottom: 15px; }
.count-badge, .weak-badge { padding: 6px 10px; border-radius: 20px; color: #ffd966; background: rgba(255,193,7,.1); border: 1px solid rgba(255,193,7,.2); font-size: 11px; }
.mistakes-list { display: grid; gap: 12px; }
.toggle-header { cursor: pointer; user-select: none; }
.toggle-header-right { display: flex; align-items: center; gap: 8px; }
.toggle-chevron { display: flex; color: #ffc107; transition: transform .3s ease; flex: none; }
.toggle-header.open .toggle-chevron { transform: rotate(180deg); }
.collapsible-body { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, opacity .3s ease; }
.collapsible-body.open { max-height: 4000px; opacity: 1; }

/* گروه‌هایِ تودرتو — گروهِ ماهیِ تکالیف و کارنامه‌هایِ قبلی تو بخشِ تاریخچه */
.month-group { background: rgba(124,63,174,.08); border: 1px solid rgba(255,255,255,.06); border-radius: 16px; padding: 16px 18px; margin-bottom: 12px; }
.month-group:last-child { margin-bottom: 0; }
.month-group .section-title.outside { margin-bottom: 0; }
.month-group .collapsible-body.open { margin-top: 14px; }
.month-group .section-title h2 { font-size: 14.5px; }
.history-section .month-group .section-kicker { color: #9c87ad; }

/* بازآراییِ تحلیلِ AI وقتی داخلِ یه کشوییِ کارنامه‌یِ قبلیه (کوچیک‌تر، بدونِ هدرِ بزرگ) */
.analysis-inline.compact { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.1); }
.analysis-inline.compact .summary { font-size: 12.5px; padding: 12px; margin: 10px 0; }
.mistake-card { padding: 19px 21px; }
.mistake-top { margin-bottom: 13px; }
.question-number { color: #9c87ad; font-size: 11px; }
.skill-tag { color: #d6b7eb; background: rgba(124,63,174,.25); border-radius: 20px; padding: 5px 10px; font-size: 10px; }
.mistake-card h3 { margin: 0 0 16px; font-size: 14px; line-height: 1.8; font-weight: 600; color: #f8f4ff; }
.answer-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; margin-top: 7px; border-radius: 10px; }
.answer-row svg { margin-top: 2px; flex: 0 0 auto; }
.answer-row small { display: block; margin-bottom: 3px; color: #a99bb9; font-size: 10px; }
.answer-row p { margin: 0; font-size: 12px; color: #e1d8e9; }
.answer-row.wrong { color: #ff8795; background: rgba(205,61,83,.1); }
.answer-row.right { color: #72d3a1; background: rgba(54,165,111,.1); }

.analysis-card { padding: 24px; margin-bottom: 35px; }
.analysis-head { justify-content: flex-start; }
.analysis-head .weak-badge { margin-right: auto; }
.summary { color: #eee6f8; font-size: 14px; line-height: 2; background: rgba(124,63,174,.13); border-radius: 12px; padding: 15px; margin: 20px 0 14px; }
.tips-list { display: grid; gap: 8px; }
.tip { display: flex; align-items: center; gap: 10px; color: #d7cbe2; font-size: 12px; }
.tip span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; color: #ffc107; background: rgba(255,193,7,.12); font-size: 11px; flex: none; }
.tip p { margin: 0; flex: 1; }
.tip svg { color: #73d4a0; }
.tip-rich { align-items: flex-start; }
.tip-rich > div { flex: 1; }
.tip-rich b { display: block; color: #ffe9a8; font-size: 12.5px; margin-bottom: 3px; }
.tip-rich p { color: #d7cbe2; font-size: 12px; line-height: 1.9; }
.tip-rich .tip-based-on { color: #a99bb9; font-size: 10.5px; margin-top: 4px; font-style: normal; }
.tip-rich svg { margin-top: 2px; }
.hw-explain { color: #a99bb9; font-size: 11.5px; margin: 10px 0 0; line-height: 1.8; }
.report-footer { display: flex; flex-direction: column; align-items: center; gap: 13px; padding-top: 4px; }
.secondary-button { color: #dfd0ea; background: rgba(124,63,174,.22); border: 1px solid rgba(197,158,224,.2); padding: 11px 17px; font-size: 12px; }
.report-footer p { color: #766484; font-size: 10px; }

.spin { animation: rc-spin 1s linear infinite; }
@keyframes rc-spin { to { transform: rotate(360deg); } }
@keyframes rc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rc-scale-in { from { opacity: 0; transform: rotate(-90deg) scale(.8); } to { opacity: 1; transform: rotate(-90deg) scale(1); } }
@keyframes rc-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.report-inner > * { animation: rc-fade-up .5s ease both; }

@media (max-width: 700px) {
  .search-content { padding-top: 60px; }
  .score-card { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .score-wrap { justify-content: center; }
  .score-card h2 { font-size: 18px; }
  .charts-grid { grid-template-columns: 1fr; }
  .welcome { align-items: flex-start; flex-direction: column; gap: 15px; }
  .date-chip { text-align: right; }
  .analysis-head { flex-wrap: wrap; }
  .analysis-head .weak-badge { margin-right: 0; width: 100%; text-align: center; }
  .report-shell { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
