    * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
            background: #f8fafc;
            color: #1e293b;
            min-height: 100vh;
            overflow: hidden;
        }
        
        /* ===== لودینگ ===== */
        #loadingScreen {
            position: fixed;
            inset: 0;
            background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
            z-index: 99999;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: all 1.2s cubic-bezier(0.77, 0, 0.18, 1);
        }
        #loadingScreen.fade-out { opacity: 0; transform: scale(1.1); pointer-events: none; }
        #loadingScreen.hidden { display: none !important; }
        
        .loader-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            animation: fadeUp 0.8s ease;
        }
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(40px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .loader-logo {
            position: relative;
            width: 140px;
            height: 140px;
            margin-bottom: 30px;
        }
        .loader-logo .logo-icon {
            width: 140px;
            height: 140px;
            background: linear-gradient(135deg, #f97316, #ef4444);
            border-radius: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 64px;
            color: white;
            transform: rotate(-8deg);
            animation: logoAnim 1.8s ease-in-out infinite;
            box-shadow: 0 0 80px rgba(249, 115, 22, 0.3);
            position: relative;
            z-index: 2;
        }
        @keyframes logoAnim {
            0%, 100% { transform: rotate(-8deg) scale(1); box-shadow: 0 0 60px rgba(249, 115, 22, 0.3); }
            50% { transform: rotate(-8deg) scale(1.06); box-shadow: 0 0 100px rgba(249, 115, 22, 0.6); }
        }
        .loader-logo .ring1 {
            position: absolute;
            inset: -18px;
            border: 3px solid rgba(249, 115, 22, 0.15);
            border-radius: 45px;
            animation: spin1 4s linear infinite;
            z-index: 1;
        }
        .loader-logo .ring2 {
            position: absolute;
            inset: -32px;
            border: 2px solid rgba(239, 68, 68, 0.1);
            border-radius: 55px;
            animation: spin2 5s linear infinite reverse;
            z-index: 1;
        }
        .loader-logo .ring3 {
            position: absolute;
            inset: -46px;
            border: 2px dashed rgba(249, 115, 22, 0.08);
            border-radius: 65px;
            animation: spin3 6s linear infinite;
            z-index: 1;
        }
        @keyframes spin1 { from { transform: rotate(0); } to { transform: rotate(360deg); } }
        @keyframes spin2 { from { transform: rotate(0); } to { transform: rotate(360deg); } }
        @keyframes spin3 { from { transform: rotate(0); } to { transform: rotate(360deg); } }
        
        .loader-title {
            color: #e2e8f0;
            font-size: 38px;
            font-weight: 900;
            letter-spacing: 3px;
            margin-bottom: 4px;
            position: relative;
        }
        .loader-title span {
            background: linear-gradient(135deg, #f97316, #ef4444);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .loader-title::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(90deg, transparent, #f97316, #ef4444, transparent);
            animation: glowLine 2s ease-in-out infinite;
        }
        @keyframes glowLine {
            0%, 100% { transform: scaleX(0.3); opacity: 0.5; }
            50% { transform: scaleX(1); opacity: 1; }
        }
        
        .loader-sub {
            color: #64748b;
            font-size: 13px;
            font-weight: 400;
            letter-spacing: 6px;
            margin-top: 4px;
            text-transform: uppercase;
        }
        .loader-bar-wrap { width: 280px; margin-top: 30px; position: relative; }
        .loader-bar {
            width: 100%;
            height: 4px;
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(249, 115, 22, 0.05);
        }
        .loader-bar .bar-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #f97316, #ef4444, #f97316);
            background-size: 200% 100%;
            border-radius: 10px;
            animation: fillBar 2.8s ease-in-out forwards, shimmer 1.5s ease-in-out infinite;
        }
        @keyframes fillBar { 0% { width: 0%; } 100% { width: 100%; } }
        @keyframes shimmer { 0% { background-position: 0% 0%; } 100% { background-position: 200% 0%; } }
        
        .loader-percent {
            color: #94a3b8;
            font-size: 13px;
            margin-top: 12px;
            font-weight: 600;
            letter-spacing: 3px;
            font-family: 'Courier New', monospace;
            text-align: center;
        }
        .loader-dots {
            display: flex;
            gap: 8px;
            margin-top: 20px;
        }
        .loader-dots span {
            width: 8px;
            height: 8px;
            background: #f97316;
            border-radius: 50%;
            animation: dotAnim 1.4s ease-in-out infinite;
        }
        .loader-dots span:nth-child(2) { animation-delay: 0.2s; }
        .loader-dots span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes dotAnim {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
            30% { transform: translateY(-12px); opacity: 1; }
        }
        
        /* ===== ناوبری ===== */
        .navbar {
            background: #ffffff;
            padding: 10px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 3px solid #e2e8f0;
            flex-wrap: wrap;
            gap: 10px;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(10px);
            background: rgba(255,255,255,0.95);
        }
        .navbar .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }
        .navbar .brand .icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #f97316, #ef4444);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 20px;
        }
        .navbar .brand h1 { font-size: 22px; }
        .navbar .brand h1 span { color: #f97316; }
        .navbar .brand small { display: block; font-size: 9px; color: #94a3b8; }
        .nav-links {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        .nav-links a {
            padding: 6px 16px;
            border-radius: 8px;
            text-decoration: none;
            font-size: 13px;
            font-weight: 600;
            color: #64748b;
            transition: 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .nav-links a:hover { color: #1e293b; background: #f1f5f9; }
        .nav-links a.active { color: #f97316; background: #fff7ed; }
        
        .tools {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        .tools button {
            padding: 6px 14px;
            border: 2px solid #e2e8f0;
            background: #fff;
            border-radius: 8px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 700;
            transition: 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Vazirmatn', sans-serif;
        }
        .tools button:hover { border-color: #f97316; color: #f97316; background: #fff7ed; }
        .tools button.primary {
            background: linear-gradient(135deg, #f97316, #ef4444);
            color: #fff;
            border: none;
        }
        .tools button.primary:hover { transform: scale(1.05); }
        
        /* ===== صفحه خانه ===== */
        #homePage {
            display: none;
            padding: 40px 32px;
            max-width: 1400px;
            margin: 0 auto;
            animation: fadeIn 0.6s ease;
        }
        #homePage.active { display: block; }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .home-hero {
            text-align: center;
            padding: 60px 20px 40px;
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            border-radius: 30px;
            margin-bottom: 40px;
        }
        .home-hero h1 { font-size: 48px; font-weight: 900; margin-bottom: 12px; }
        .home-hero h1 span { color: #f97316; }
        .home-hero p { font-size: 18px; color: #475569; max-width: 600px; margin: 0 auto 20px; }
        .home-hero .badge {
            display: inline-block;
            background: #ef4444;
            color: #fff;
            padding: 4px 20px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
        }
        .home-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }
        .stat-card {
            background: #fff;
            padding: 25px;
            border-radius: 16px;
            text-align: center;
            border: 1px solid #e2e8f0;
            transition: 0.3s;
        }
        .stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
        .stat-card .num { font-size: 32px; font-weight: 900; color: #f97316; }
        .stat-card .label { font-size: 14px; color: #94a3b8; margin-top: 4px; }
        
        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }
        .feature-card {
            background: #fff;
            padding: 30px;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            transition: 0.3s;
            text-align: center;
        }
        .feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
        .feature-card .icon { font-size: 40px; margin-bottom: 12px; display: block; }
        .feature-card h3 { font-size: 18px; margin-bottom: 6px; }
        .feature-card p { font-size: 14px; color: #64748b; }
        
        /* ===== صفحه ویرایشگر ===== */
        #editorPage {
            display: none;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease;
        }
        #editorPage.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }
        
        .editor-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            padding: 24px 32px;
            max-width: 1600px;
            margin: 0 auto;
        }
        .editor-panel {
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.04);
            border: 1px solid #e2e8f0;
            overflow: hidden;
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
        }
        .editor-panel:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
        .panel-header {
            padding: 8px 18px;
            background: #fafbfc;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            font-weight: 700;
            color: #475569;
            flex-shrink: 0;
        }
        .panel-header .dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-left: 6px;
        }
        .dot.html-dot { background: #e44d26; }
        .dot.css-dot { background: #264de4; }
        .dot.preview-dot { background: #22c55e; animation: pulse-dot 2s infinite; }
        @keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
        
        .editor-panel textarea {
            flex: 1;
            width: 100%;
            min-height: 280px;
            padding: 18px 20px;
            border: none;
            background: #fafcff;
            font-family: 'Cascadia Code', 'Consolas', monospace;
            font-size: 14px;
            line-height: 1.9;
            resize: vertical;
            outline: none;
            color: #1e293b;
        }
        .editor-panel textarea:focus { background: #ffffff; }
        .editor-panel textarea::selection { background: #fde68a; }
        
        .preview-panel { grid-row: span 2; }
        .preview-panel iframe {
            flex: 1;
            width: 100%;
            min-height: 620px;
            border: none;
            background: #ffffff;
            transition: all 0.3s;
        }
        
        .tab-bar {
            display: flex;
            gap: 4px;
            padding: 4px 18px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            flex-shrink: 0;
        }
        .tab-bar .tab {
            padding: 4px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            color: #94a3b8;
            cursor: pointer;
            transition: 0.3s;
            border: none;
            background: transparent;
            font-family: 'Vazirmatn', sans-serif;
        }
        .tab-bar .tab:hover { color: #1e293b; background: #e2e8f0; }
        .tab-bar .tab.active-tab { color: #f97316; background: #fff7ed; }
        
        /* ===== نوار پایین ===== */
        .footer-bar {
            background: #ffffff;
            padding: 8px 32px;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: #94a3b8;
            flex-wrap: wrap;
            gap: 8px;
        }
        .footer-bar .info-item { display: flex; align-items: center; gap: 6px; }
        .status-badge {
            background: #dcfce7;
            color: #16a34a;
            padding: 2px 14px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 11px;
        }
        .status-badge.error { background: #fee2e2; color: #dc2626; }
        
        /* ===== نوتیف ===== */
        .notification {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: #1e293b;
            color: #f1f5f9;
            padding: 14px 24px;
            border-radius: 14px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.25);
            opacity: 0;
            transform: translateY(30px) scale(0.95);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 999;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            pointer-events: none;
            border: 1px solid rgba(255,255,255,0.05);
        }
        .notification.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
        .notification i { color: #f97316; font-size: 18px; }
        
        /* ===== مودال ===== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(12px);
            z-index: 1000;
            display: none;
            justify-content: center;
            align-items: center;
        }
        .modal-overlay.active { display: flex; }
        .modal-box {
            background: #ffffff;
            border-radius: 28px;
            padding: 40px;
            max-width: 450px;
            width: 90%;
            box-shadow: 0 30px 80px rgba(0,0,0,0.35);
            animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        @keyframes modalIn {
            from { transform: scale(0.85) translateY(30px); opacity: 0; }
            to { transform: scale(1) translateY(0); opacity: 1; }
        }
        .modal-box .modal-icon { font-size: 48px; margin-bottom: 10px; display: block; }
        .modal-box h2 { font-size: 24px; font-weight: 900; color: #1e293b; margin-bottom: 6px; }
        .modal-box p { color: #64748b; margin-bottom: 24px; line-height: 1.8; font-size: 14px; }
        .modal-box .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
        .modal-box .modal-actions button {
            padding: 10px 24px;
            border-radius: 10px;
            border: none;
            font-weight: 700;
            cursor: pointer;
            transition: 0.3s;
            font-family: 'Vazirmatn', sans-serif;
            font-size: 13px;
        }
        .modal-box .modal-actions .btn-confirm {
            background: linear-gradient(135deg, #f97316, #ef4444);
            color: white;
            box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
        }
        .modal-box .modal-actions .btn-confirm:hover { transform: scale(1.05); }
        .modal-box .modal-actions .btn-cancel { background: #f1f5f9; color: #475569; }
        .modal-box .modal-actions .btn-cancel:hover { background: #e2e8f0; }
        
        /* ===== واکنش‌گرا ===== */
        @media (max-width: 1024px) {
            .editor-container { grid-template-columns: 1fr; padding: 16px; }
            .preview-panel { grid-row: span 1; }
            .preview-panel iframe { min-height: 400px; }
            .navbar { padding: 10px 16px; }
        }
        @media (max-width: 640px) {
            .navbar .brand h1 { font-size: 18px; }
            .navbar .brand .icon { width: 32px; height: 32px; font-size: 16px; }
            .nav-links a { font-size: 11px; padding: 4px 10px; }
            .tools button { padding: 4px 10px; font-size: 10px; }
            .tools button span { display: none; }
            .editor-panel textarea { min-height: 150px; font-size: 12px; padding: 10px 12px; }
            .footer-bar { padding: 6px 12px; font-size: 10px; }
            .home-hero h1 { font-size: 28px; }
            .home-hero { padding: 30px 16px; }
        }