/* ==========================================================================
   Apex (اپکس) - سیستم هوشمند مشاوره کنکور
   طراحی اختصاصی تم دارک نئونی، گلس‌مورفیسم و فونت فارسی وزیرمتن
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --apex-purple-primary: #a855f7;
  --apex-purple-glow: rgba(168, 85, 247, 0.45);
  --apex-purple-dark: #6b21a8;
  --apex-orange-accent: #f97316;
  --apex-orange-glow: rgba(249, 115, 22, 0.4);
  --apex-blue-dark: #0f172a;
  --apex-blue-deep: #070a12;
  --apex-cyan: #06b6d4;
  --apex-red-flag: #ef4444;
  --apex-green-check: #10b981;
}

* {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

body {
  background-color: var(--apex-blue-deep);
  color: #f1f5f9;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: 
    radial-gradient(at 10% 20%, rgba(126, 34, 206, 0.18) 0px, transparent 40%),
    radial-gradient(at 90% 15%, rgba(249, 115, 22, 0.15) 0px, transparent 40%),
    radial-gradient(at 50% 85%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
}

/* تصویر و افکت پس‌زمینه هیرو */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 60% 40%, rgba(168, 85, 247, 0.18) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(7, 10, 18, 0.75) 0%, rgba(7, 10, 18, 0.95) 100%),
    url('../images/hero-art.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.35;
  pointer-events: none;
  border-radius: 2rem;
  z-index: 0;
}

/* اسکرول بار شیک و نئونی */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #0b0f19;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
}

/* گلس مورفیسم */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(168, 85, 247, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel-subtle {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-glow {
  background: rgba(26, 21, 53, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.2);
}

.glass-panel-orange {
  background: rgba(30, 20, 15, 0.75);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
}

/* افکت‌های نئونی */
.neon-text-purple {
  color: #d8b4fe;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.75);
}

.neon-text-orange {
  color: #fdba74;
  text-shadow: 0 0 12px rgba(249, 115, 22, 0.75);
}

.neon-glow-purple {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}

.neon-glow-orange {
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.35);
}

.neon-glow-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

.neon-border-purple {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35), inset 0 0 10px rgba(168, 85, 247, 0.15);
}

/* دکمه‌های پرانرژی */
.btn-neon-purple {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #ffffff;
  border: 1px solid rgba(216, 180, 254, 0.3);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-neon-purple:hover {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
  transform: translateY(-2px);
}

.btn-neon-orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: 1px solid rgba(253, 186, 116, 0.3);
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-neon-orange:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.7);
  transform: translateY(-2px);
}

/* پالس قرمز ردفلگ */
@keyframes redFlagPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.9);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
    border-color: rgba(239, 68, 68, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    border-color: rgba(239, 68, 68, 0.9);
  }
}

.red-flag-pulse {
  animation: redFlagPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* انیمیشن موج‌های صوتی ویس انگیزشی */
.wave-bar {
  display: inline-block;
  width: 3px;
  background-color: #f97316;
  border-radius: 9999px;
  margin: 0 1.5px;
  transition: height 0.15s ease;
}

@keyframes soundWave {
  0%, 100% {
    height: 6px;
  }
  50% {
    height: 24px;
  }
}

.wave-bar.playing {
  animation: soundWave 0.8s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.25s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.15s; }
.wave-bar:nth-child(6) { animation-delay: 0.3s; }
.wave-bar:nth-child(7) { animation-delay: 0.5s; }
.wave-bar:nth-child(8) { animation-delay: 0.2s; }
.wave-bar:nth-child(9) { animation-delay: 0.35s; }
.wave-bar:nth-child(10) { animation-delay: 0.1s; }

/* کارت‌های گیمیفیکیشن و دستاورد */
.badge-locked {
  filter: grayscale(100%) opacity(40%);
  transition: all 0.3s ease;
}

.badge-locked:hover {
  filter: grayscale(40%) opacity(70%);
}

.badge-unlocked {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.badge-unlocked::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: rotate(25deg);
  animation: sheen 3.5s infinite;
}

@keyframes sheen {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  20%, 100% {
    transform: translateX(100%) rotate(25deg);
  }
}

/* ترنزیشن نرم برای تب‌ها */
.tab-transition {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* انیمیشن باز شدن مودال */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-modal {
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* سکوی مدال قهرمانان لیگ */
.podium-first {
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(234, 179, 8, 0.6);
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.25);
}

.podium-second {
  background: linear-gradient(180deg, rgba(203, 213, 225, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(203, 213, 225, 0.5);
  box-shadow: 0 0 20px rgba(203, 213, 225, 0.15);
}

.podium-third {
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(217, 119, 6, 0.5);
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.15);
}

/* انیمیشن شناور آرت‌ورک هیرو */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.8deg);
  }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

/* هاله نئونی سکوی هیرو */
.hero-platform-glow {
  position: relative;
}
.hero-platform-glow::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 45px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.75) 0%, rgba(6, 182, 212, 0.4) 45%, transparent 80%);
  filter: blur(18px);
  border-radius: 50%;
  pointer-events: none;
}

/* کارت‌های شیشه‌ای هایپرلوکس ماک‌آپ */
.glass-metric-card {
  background: rgba(10, 15, 30, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.glass-metric-card:hover {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 12px 35px rgba(168, 85, 247, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* دکمه ارزیابی رایگان گرادیانتی مطابق طرح */
.btn-apex-hero-eval {
  background: linear-gradient(90deg, #0284c7 0%, #a855f7 50%, #d946ef 100%);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-apex-hero-eval:hover {
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-2px) scale(1.02);
}

/* انیمیشن نرم و جذاب تغییر وضعیت باکس‌های گزارش‌کار */
@keyframes reportBoxDoneAnim {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(6, 78, 59, 0.5);
  }
}

@keyframes reportBoxFailedAnim {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 rgba(244, 63, 94, 0);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(136, 19, 55, 0.5);
  }
}

.report-box-done-animate {
  animation: reportBoxDoneAnim 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.report-box-failed-animate {
  animation: reportBoxFailedAnim 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ==========================================================================
   Apex (اپکس) - سیستم استایل‌دهی تم روشن مدرن و لوکس (Light Mode Theme)
   طراحی اختصاصی مینیمال، کنتراست بالا و تمیز با حفظ هویت بصری بنفش و نارنجی
   ========================================================================== */

body.theme-light {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  background-image: 
    radial-gradient(at 10% 15%, rgba(168, 85, 247, 0.08) 0px, transparent 45%),
    radial-gradient(at 90% 12%, rgba(249, 115, 22, 0.07) 0px, transparent 40%),
    radial-gradient(at 50% 90%, rgba(6, 182, 212, 0.06) 0px, transparent 50%) !important;
}

.theme-light header#main-navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06) !important;
}

.theme-light header#main-navbar #nav-link-home {
  color: #0f172a !important;
}

.theme-light #landing-nav-links a {
  color: #475569 !important;
}

.theme-light #landing-nav-links a:hover {
  color: #7c3aed !important;
}

/* کارت‌ها و پنل‌های شیشه‌ای در تم روشن */
.theme-light .glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.02) !important;
}

.theme-light .glass-panel-subtle {
  background: rgba(248, 250, 252, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.theme-light .glass-panel-glow {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  box-shadow: 0 10px 30px -5px rgba(168, 85, 247, 0.12) !important;
}

.theme-light .glass-panel-orange {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(249, 115, 22, 0.35) !important;
  box-shadow: 0 10px 30px -5px rgba(249, 115, 22, 0.12) !important;
}

/* کانتینرهای تیره پیش‌فرض */
.theme-light .bg-slate-950,
.theme-light .bg-slate-900,
.theme-light .bg-\[\#070a12\],
.theme-light .bg-\[\#0b0f19\],
.theme-light .bg-\[\#0f172a\],
.theme-light .bg-slate-900\/90,
.theme-light .bg-slate-900\/80,
.theme-light .bg-slate-900\/70,
.theme-light .bg-slate-900\/60,
.theme-light .bg-slate-900\/50,
.theme-light .bg-slate-950\/90,
.theme-light .bg-slate-950\/80,
.theme-light .bg-slate-950\/70 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.theme-light .bg-slate-950\/40,
.theme-light .bg-slate-900\/40,
.theme-light .bg-slate-900\/30,
.theme-light .bg-slate-800\/50,
.theme-light .bg-slate-800 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* المان‌های بنفش تیره در تم روشن */
.theme-light .bg-purple-950\/40,
.theme-light .bg-purple-950\/50,
.theme-light .bg-purple-950\/60,
.theme-light .bg-purple-950\/80 {
  background-color: #faf5ff !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
}

.theme-light .bg-cyan-950\/40,
.theme-light .bg-cyan-950\/50,
.theme-light .bg-cyan-950\/60 {
  background-color: #ecfeff !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
}

.theme-light .bg-orange-950\/40,
.theme-light .bg-orange-950\/50 {
  background-color: #fff7ed !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
}

/* رنگ متون در تم روشن */
.theme-light .text-white {
  color: #0f172a !important;
}

.theme-light .text-slate-100,
.theme-light .text-slate-200 {
  color: #1e293b !important;
}

.theme-light .text-slate-300 {
  color: #334155 !important;
}

.theme-light .text-slate-400 {
  color: #64748b !important;
}

.theme-light .text-slate-500 {
  color: #94a3b8 !important;
}

/* حفظ رنگ متن دکمه‌های رنگی و بج‌ها */
.theme-light .btn-neon-purple,
.theme-light .btn-neon-purple *,
.theme-light .btn-neon-orange,
.theme-light .btn-neon-orange *,
.theme-light .bg-purple-600,
.theme-light .bg-purple-600 *,
.theme-light .bg-indigo-600,
.theme-light .bg-indigo-600 *,
.theme-light .bg-emerald-600,
.theme-light .bg-emerald-600 *,
.theme-light .bg-red-600,
.theme-light .bg-red-600 *,
.theme-light button.bg-purple-600 {
  color: #ffffff !important;
}

.theme-light .bg-clip-text {
  -webkit-text-fill-color: transparent !important;
}

/* خطوط و کادرها */
.theme-light .border-slate-800,
.theme-light .border-slate-700,
.theme-light .border-slate-600 {
  border-color: #e2e8f0 !important;
}

/* فرم‌ها، اینپوت‌ها و سلکت‌ها در تم روشن */
.theme-light input,
.theme-light select,
.theme-light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.theme-light input::placeholder,
.theme-light textarea::placeholder {
  color: #94a3b8 !important;
}

.theme-light input:focus,
.theme-light select:focus,
.theme-light textarea:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15) !important;
}

/* منوی شناور موبایل دانش‌آموز */
.theme-light #student-mobile-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
}

/* برگه پلنر A4 */
.theme-light #apex-a4-weekly-planner-card {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.theme-light #apex-a4-weekly-planner-card .bg-slate-950,
.theme-light #apex-a4-weekly-planner-card .bg-slate-900 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* مودال‌ها در تم روشن */
.theme-light #modal-auth > div,
.theme-light #modal-add-package > div,
.theme-light #modal-edit-package > div,
.theme-light #modal-calendar-picker > div,
.theme-light #modal-change-consultant > div,
.theme-light #modal-support-ticket > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* ==========================================================================
   استایل اختصاصی چاپ برگه پلنر هفتگی در سایز استاندارد A4 (PRINT STYLES)
   ========================================================================== */
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* پنهان کردن کلیه بخش‌های اضافه سایت هنگام چاپ */
  header, footer, nav, #announcement-banner, #view-home, #view-auth, 
  #panel-consultant, #panel-admin, .stu-tab-content > div:not(#apex-a4-weekly-planner-card),
  button, select, input, .no-print {
    display: none !important;
  }

  #panel-student, #stu-content-lobby {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #apex-a4-weekly-planner-card {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #111827 !important;
    border: 2px solid #374151 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
  }

  #apex-a4-weekly-planner-card * {
    color: #111827 !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  #apex-a4-weekly-planner-card .text-white,
  #apex-a4-weekly-planner-card .text-slate-300,
  #apex-a4-weekly-planner-card .text-slate-200 {
    color: #111827 !important;
  }

  #apex-a4-weekly-planner-card .text-slate-400,
  #apex-a4-weekly-planner-card .text-slate-500 {
    color: #4b5563 !important;
  }

  #apex-a4-weekly-planner-card .bg-slate-950,
  #apex-a4-weekly-planner-card .bg-slate-900,
  #apex-a4-weekly-planner-card .glass-panel-glow {
    background: #f9fafb !important;
    border: 1px solid #d1d5db !important;
  }

  #apex-a4-weekly-planner-card .border-purple-500\/40,
  #apex-a4-weekly-planner-card .border-purple-500\/30,
  #apex-a4-weekly-planner-card .border-purple-500\/20,
  #apex-a4-weekly-planner-card .border-slate-800 {
    border-color: #9ca3af !important;
  }

  #stu-weekly-planner-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

/* بهینه‌سازی موبایل و مخفی‌سازی اسکرول‌بار اضافی در نوارهای افقی */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* افزایش محدوده لمس و نرمی اسکرول در صفحات موبایل */
@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
  }
  input, select, textarea, button {
    touch-action: manipulation;
  }
}

