   @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Fira+Code:wght@400;500;600&display=swap');

   :root {
       --bg: #0a0a0f;
       --card-bg: rgba(20, 20, 30, 0.6);
       --primary: #8b5cf6;
       --secondary: #ec4899;
       --accent: #06b6d4;
       --text: #ffffff;
       --text-dim: #94a3b8;
       --border: rgba(255, 255, 255, 0.08);
       --glow-primary: rgba(139, 92, 246, 0.5);
       --glow-secondary: rgba(236, 72, 153, 0.3);
   }

   * {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
   }

   html {
       scroll-behavior: smooth;
       font-size: 16px;
   }

   body {
       background: var(--bg);
       color: var(--text);
       font-family: 'Cairo', sans-serif;
       line-height: 1.7;
       direction: rtl;
       overflow-x: hidden;
       position: relative;
       min-height: 100vh;
   }

   /* خلفية متحركة Aurora */
   .aurora-bg {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       z-index: -1;
       overflow: hidden;
   }

   .aurora-bg::before,
   .aurora-bg::after {
       content: '';
       position: absolute;
       width: 150%;
       height: 150%;
       top: -25%;
       left: -25%;
       background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
       animation: aurora 20s ease-in-out infinite;
       opacity: 0.4;
       filter: blur(80px);
   }

   .aurora-bg::after {
       background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
       animation-delay: -10s;
       animation-duration: 25s;
   }

   @keyframes aurora {

       0%,
       100% {
           transform: translate(0, 0) rotate(0deg) scale(1);
       }

       33% {
           transform: translate(5%, 5%) rotate(120deg) scale(1.1);
       }

       66% {
           transform: translate(-5%, 2%) rotate(240deg) scale(0.9);
       }
   }

   /* Grid خلفية دقيقة */
   .grid-pattern {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background-image:
           linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
           linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
       background-size: 50px 50px;
       z-index: -1;
       mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
   }

   .luxury-container {
       max-width: 1100px;
       margin: 0 auto;
       padding: clamp(20px, 5vw, 40px);
       position: relative;
       z-index: 1;
   }

   /* الترويسة الفاخرة */
   .main-header {
       text-align: center;
       margin-bottom: clamp(60px, 10vw, 100px);
       padding: clamp(40px, 8vw, 80px) 20px;
       position: relative;
   }

   .badge-new {
       display: inline-flex;
       align-items: center;
       gap: 8px;
       padding: 8px 20px;
       background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
       border: 1px solid rgba(139, 92, 246, 0.3);
       border-radius: 50px;
       font-size: clamp(0.75rem, 2vw, 0.85rem);
       font-weight: 600;
       color: var(--primary);
       margin-bottom: 30px;
       backdrop-filter: blur(10px);
       animation: pulse 2s ease-in-out infinite;
   }

   @keyframes pulse {

       0%,
       100% {
           box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
       }

       50% {
           box-shadow: 0 0 20px 5px rgba(139, 92, 246, 0.2);
       }
   }

   .main-header h1 {
       font-size: clamp(2rem, 6vw, 3.5rem);
       font-weight: 900;
       background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #ec4899 100%);
       -webkit-background-clip: text;
       -webkit-text-fill-color: transparent;
       background-clip: text;
       margin-bottom: 20px;
       line-height: 1.2;
       text-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
   }

   .hero-text {
       font-size: clamp(1rem, 2.5vw, 1.25rem);
       color: var(--text-dim);
       max-width: 700px;
       margin: 0 auto;
       line-height: 1.8;
   }

   .hero-text span {
       color: var(--accent);
       font-weight: 700;
       position: relative;
   }

   .hero-text span::after {
       content: '';
       position: absolute;
       bottom: -2px;
       left: 0;
       width: 100%;
       height: 2px;
       background: var(--accent);
       opacity: 0.5;
   }

   /* البطاقات الفاخرة */
   .mega-card {
       background: var(--card-bg);
       backdrop-filter: blur(20px);
       -webkit-backdrop-filter: blur(20px);
       border: 1px solid var(--border);
       border-radius: 24px;
       padding: clamp(30px, 5vw, 40px);
       margin-bottom: 40px;
       position: relative;
       overflow: hidden;
       transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
   }



   .mega-card::before {
       content: '';
       position: absolute;
       top: 0;
       left: 0;
       right: 0;
       height: 1px;
       background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
   }

   .mega-card:hover {
       transform: translateY(-5px);
       border-color: rgba(139, 92, 246, 0.3);
       box-shadow:
           0 20px 40px rgba(0, 0, 0, 0.4),
           0 0 0 1px rgba(139, 92, 246, 0.1),
           inset 0 1px 0 rgba(255, 255, 255, 0.05);
   }

   .card-icon {
       position: absolute;
       top: 2px;
       right: 30px;
       width: 50px;
       height: 50px;
       background: linear-gradient(135deg, var(--primary), var(--secondary));
       border-radius: 12px;
       display: flex;
       align-items: center;
       justify-content: center;
       font-weight: 900;
       font-size: 1.2rem;
       box-shadow:
           0 10px 30px rgba(139, 92, 246, 0.4),
           0 0 0 1px rgba(255, 255, 255, 0.1);
       z-index: 10;
       transition: all 0.3s ease;
   }

   .mega-card:hover .card-icon {
       transform: scale(1.1) rotate(5deg);
       box-shadow:
           0 15px 40px rgba(139, 92, 246, 0.5),
           0 0 0 2px rgba(255, 255, 255, 0.2);
   }

   /* العناوين */
   .section-title {
       margin-bottom: 30px;
       margin-top: 10px;
   }

   .main-label {
       font-size: clamp(1.5rem, 4vw, 2rem);
       font-weight: 800;
       color: var(--text);
       display: block;
       margin-bottom: 8px;
       position: relative;
       padding-right: 15px;
   }

   .main-label::before {
       content: '';
       position: absolute;
       right: 0;
       top: 50%;
       transform: translateY(-50%);
       width: 4px;
       height: 70%;
       background: linear-gradient(to bottom, var(--primary), var(--secondary));
       border-radius: 2px;
   }

   .sub-label {
       font-size: clamp(0.9rem, 2vw, 1.1rem);
       color: var(--text-dim);
       font-weight: 400;
       display: block;
   }

   /* صناديق المحتوى */
   .analogy-box {
       background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
       border: 1px solid rgba(6, 182, 212, 0.2);
       border-right: 4px solid var(--accent);
       border-radius: 16px;
       padding: 25px;
       margin-bottom: 25px;
       display: flex;
       align-items: center;
       gap: 20px;
       position: relative;
       overflow: hidden;
   }

   .analogy-box::before {
       content: '';
       position: absolute;
       top: -50%;
       right: -50%;
       width: 200%;
       height: 200%;
       background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
       opacity: 0;
       transition: opacity 0.3s;
   }

   .analogy-box:hover::before {
       opacity: 1;
   }

   .analogy-box .icon {
       font-size: 2.5rem;
       flex-shrink: 0;
       filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.3));
   }

   .analogy-box .text {
       font-size: clamp(0.95rem, 2.2vw, 1.1rem);
       line-height: 1.7;
       color: #e2e8f0;
       position: relative;
       z-index: 1;
   }

   .rule-box {
       background: rgba(255, 255, 255, 0.02);
       border-radius: 12px;
       padding: 20px;
       margin-bottom: 25px;
       border: 1px solid rgba(255, 255, 255, 0.05);
   }

   .rule-box p {
       margin: 0;
       font-size: clamp(0.9rem, 2vw, 1.05rem);
       line-height: 1.8;
       color: #cbd5e1;
   }

   .highlight-pink {
       color: var(--secondary);
       font-weight: 700;
       text-decoration: none;
       background: linear-gradient(to bottom, transparent 60%, rgba(236, 72, 153, 0.2) 60%);
       padding: 0 4px;
       border-radius: 4px;
   }

   .badge-index {
       background: rgba(139, 92, 246, 0.15);
       color: #c4b5fd;
       padding: 4px 12px;
       border-radius: 8px;
       font-weight: 700;
       font-size: 0.9rem;
       border: 1px solid rgba(139, 92, 246, 0.3);
       display: inline-block;
       margin: 0 4px;
       transition: all 0.2s;
   }

   .badge-index:hover {
       background: rgba(139, 92, 246, 0.3);
       transform: translateY(-2px);
   }

   /* الكود الاحترافي */
   .code-terminal {
       background: #0d0d12;
       border-radius: 16px;
       border: 1px solid rgba(255, 255, 255, 0.08);
       overflow: hidden;
       position: relative;
       box-shadow:
           inset 0 1px 0 rgba(255, 255, 255, 0.05),
           0 10px 30px rgba(0, 0, 0, 0.5);
   }

   .code-header {
       background: rgba(255, 255, 255, 0.03);
       padding: 12px 16px;
       display: flex;
       align-items: center;
       gap: 8px;
       border-bottom: 1px solid rgba(255, 255, 255, 0.05);
   }

   .code-header span {
       width: 12px;
       height: 12px;
       border-radius: 50%;
       display: block;
   }

   .code-header span:nth-child(1) {
       background: #ff5f57;
   }

   .code-header span:nth-child(2) {
       background: #febc2e;
   }

   .code-header span:nth-child(3) {
       background: #28c840;
   }

   .code-title {
       margin-right: auto;
       margin-left: 15px;
       font-size: 0.8rem;
       color: var(--text-dim);
       font-family: 'Fira Code', monospace;
   }

   pre {
       margin: 0;
       padding: 20px;
       overflow-x: auto;
       direction: ltr;
       text-align: left;
   }

   code {
       font-family: 'Fira Code', monospace;
       font-size: clamp(0.8rem, 2vw, 0.95rem);
       line-height: 1.6;
       color: #e2e8f0;
   }

   /* Syntax Highlighting Colors */
   .code-comment {
       color: #64748b;
       font-style: italic;
   }

   .code-keyword {
       color: #c084fc;
       font-weight: 600;
   }

   .code-string {
       color: #4ade80;
   }

   .code-number {
       color: #f472b6;
   }

   .code-function {
       color: #60a5fa;
   }

   .code-operator {
       color: #fbbf24;
   }

   /* البطاقات الفرعية */
   .sub-grid {
       display: grid;
       gap: 25px;
       margin-top: 25px;
   }

   .sub-card {
       background: rgba(255, 255, 255, 0.02);
       border: 1px solid rgba(255, 255, 255, 0.06);
       border-radius: 20px;
       padding: 30px;
       position: relative;
       overflow: hidden;
       transition: all 0.3s ease;
   }

   .sub-card::after {
       content: '';
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 3px;
       background: linear-gradient(90deg, var(--primary), var(--secondary));
       opacity: 0;
       transition: opacity 0.3s;
   }

   .sub-card:hover::after {
       opacity: 1;
   }

   .sub-card.safe-method {
       background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
       border-color: rgba(16, 185, 129, 0.2);
   }

   .sub-card.safe-method:hover {
       border-color: rgba(16, 185, 129, 0.4);
       transform: translateY(-3px);
       box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1);
   }

   .sub-card.danger {
       background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
       border-color: rgba(239, 68, 68, 0.2);
   }

   .sub-card.danger:hover {
       border-color: rgba(239, 68, 68, 0.4);
       box-shadow: 0 10px 30px rgba(239, 68, 68, 0.1);
   }

   .method-header {
       display: flex;
       align-items: center;
       gap: 12px;
       margin-bottom: 20px;
   }

   .status-badge {
       width: 28px;
       height: 28px;
       background: linear-gradient(135deg, #10b981, #059669);
       border-radius: 50%;
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 0.85rem;
       box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
   }

   .sub-card.danger .status-badge {
       background: linear-gradient(135deg, #ef4444, #dc2626);
       box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
   }

   .method-header h3 {
       font-size: 1.2rem;
       color: #10b981;
       margin: 0;
   }

   .sub-card.danger h3 {
       color: #ef4444;
       font-size: 1.2rem;
       margin-bottom: 10px;
       display: flex;
       align-items: center;
       gap: 8px;
   }

   /* صندوق المقارنة */
   .comp-box {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
       gap: 20px;
       margin: 25px 0;
   }

   .tool {
       background: rgba(255, 255, 255, 0.03);
       border: 1px solid rgba(255, 255, 255, 0.08);
       border-radius: 16px;
       padding: 25px;
       text-align: center;
       transition: all 0.3s ease;
       position: relative;
       overflow: hidden;
   }

   .tool::before {
       content: '';
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
       opacity: 0;
       transition: opacity 0.3s;
   }

   .tool:hover {
       border-color: rgba(139, 92, 246, 0.3);
       transform: translateY(-3px);
   }

   .tool:hover::before {
       opacity: 1;
   }

   .tool span {
       display: block;
       font-family: 'Fira Code', monospace;
       font-weight: 600;
       color: var(--accent);
       margin-bottom: 10px;
       font-size: 1.1rem;
   }

   .tool p {
       color: var(--text-dim);
       margin: 0;
       font-size: 0.95rem;
       line-height: 1.6;
       position: relative;
       z-index: 1;
   }

   /* منطقة السحر */
   .magic-zone {
       background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.05));
       border: 1px solid rgba(139, 92, 246, 0.2);
       border-radius: 20px;
       padding: 30px;
       margin-top: 25px;
       position: relative;
       overflow: hidden;
   }

   .magic-zone::before {
       content: '🪄';
       position: absolute;
       top: 20px;
       left: 20px;
       font-size: 2rem;
       opacity: 0.2;
   }

   .magic-zone h3 {
       color: #c4b5fd;
       margin-bottom: 20px;
       font-size: 1.3rem;
       display: flex;
       align-items: center;
       gap: 10px;
   }

   /* Info Glow محسن */
   .info-glow {
       background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
       border-right: 4px solid var(--accent);
       border-radius: 12px;
       padding: 20px 25px;
       margin-bottom: 25px;
       position: relative;
       font-size: clamp(0.9rem, 2vw, 1.05rem);
       line-height: 1.7;
       color: #e2e8f0;
   }

   .info-glow::before {
       content: '💡';
       position: absolute;
       top: 15px;
       right: 15px;
       font-size: 1.5rem;
       opacity: 0.3;
   }

   /* الفوتر الفاخر */
   .final-summary {
       background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
       border: 1px solid rgba(255, 255, 255, 0.1);
       border-radius: 30px;
       padding: clamp(40px, 6vw, 60px);
       margin-top: 80px;
       text-align: center;
       position: relative;
       overflow: hidden;
   }

   .final-summary::before {
       content: '';
       position: absolute;
       top: 0;
       left: 0;
       right: 0;
       height: 1px;
       background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
   }

   .final-summary h2 {
       font-size: clamp(1.5rem, 4vw, 2rem);
       margin-bottom: 30px;
       background: linear-gradient(135deg, #fff, #c4b5fd);
       -webkit-background-clip: text;
       -webkit-text-fill-color: transparent;
       background-clip: text;
   }

   .grid-summary {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
       gap: 20px;
       text-align: right;
   }

   .item {
       background: rgba(0, 0, 0, 0.2);
       border: 1px solid rgba(255, 255, 255, 0.08);
       border-radius: 16px;
       padding: 25px;
       font-size: clamp(0.85rem, 2vw, 0.95rem);
       line-height: 1.7;
       color: #cbd5e1;
       transition: all 0.3s ease;
       position: relative;
       padding-right: 50px;
   }

   .item::before {
       content: '✓';
       position: absolute;
       right: 20px;
       top: 50%;
       transform: translateY(-50%);
       width: 24px;
       height: 24px;
       background: linear-gradient(135deg, var(--primary), var(--secondary));
       border-radius: 50%;
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 0.8rem;
       color: white;
       font-weight: bold;
   }

   .item:hover {
       background: rgba(255, 255, 255, 0.05);
       border-color: rgba(139, 92, 246, 0.3);
       transform: translateY(-3px);
   }

   /* Animations */
   .reveal {
       opacity: 0;
       transform: translateY(30px);
       transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
   }

   .reveal.active {
       opacity: 1;
       transform: translateY(0);
   }

   /* Scrollbar styling */
   ::-webkit-scrollbar {
       width: 10px;
       height: 10px;
   }

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

   ::-webkit-scrollbar-thumb {
       background: linear-gradient(var(--primary), var(--secondary));
       border-radius: 5px;
   }

   ::-webkit-scrollbar-thumb:hover {
       background: linear-gradient(var(--secondary), var(--primary));
   }



   .method-category {
       margin-top: 40px;
       border-bottom: 1px solid var(--border);
       padding-bottom: 15px;
       color: var(--accent);
       font-size: 1.4rem;
   }

   .concept-list {
       list-style: none;
       padding: 0;
   }

   .concept-list li {
       margin-bottom: 10px;
       padding-right: 25px;
       position: relative;
   }

   .concept-list li::before {
       content: "•";
       position: absolute;
       right: 0;
       color: var(--primary);
       font-weight: bold;
   }


   /* Responsive */
   @media (max-width: 768px) {
       .grid-summary {
           grid-template-columns: 1fr;
       }

       .comp-box {
           grid-template-columns: 1fr;
       }

       .analogy-box {
           flex-direction: column;
           text-align: center;
       }

       .item {
           padding-right: 25px;
           padding-left: 25px;
           text-align: center;
       }

       .item::before {
           position: static;
           display: inline-flex;
           transform: none;
           margin-bottom: 10px;
       }
   }

   @media (max-width: 480px) {
       .mega-card {
           padding: 25px 20px;
       }

       .card-icon {
           width: 40px;
           height: 40px;
           font-size: 1rem;
           top: -15px;
           right: 20px;
       }

       .code-terminal {
           border-radius: 12px;
       }

       pre {
           padding: 15px;
       }
   }