  @font-face {
            font-family: IRANSansX;
            font-style: normal;
            font-weight: bold;
            src: url('css/fonts/woff/IRANSansX-Bold.woff') format('woff'),
                 url('css/fonts/woff2/IRANSansX-Bold.woff2') format('woff2');
        }
        @font-face {
            font-family: IRANSansX;
            font-style: normal;
            font-weight: normal;
            src: url('css/fonts/woff/IRANSansX-Regular.woff') format('woff'),
                 url('css/fonts/woff2/IRANSansX-Regular.woff2') format('woff2');
        }

   
        * { box-sizing: border-box; margin: 0; padding: 0; font-family: IRANSansX, 'Vazirmatn', sans-serif; }

        body {
            background-color: var(--bg-main);
            background-image: radial-gradient(circle at 20% 80%, rgba(30, 41, 59, 0.4) 0%, transparent 40%),
                              radial-gradient(circle at 80% 20%, rgba(44, 30, 62, 0.4) 0%, transparent 40%);
            color: var(--text-light);
            min-height: 100vh;
            overflow-x: hidden;
            display: flex;
            flex-direction: column;
        }

        /* --- استایل‌های هدر (دقیقاً طبق کد شما) --- */
        header {
            background: linear-gradient(135deg, var(--bg-header-start), var(--bg-header-end));
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
            border-bottom: 1px solid rgba(255,255,255,0.05);
            padding: 0.8rem 0; 
        }

        .navbar {
            display: flex;
            justify-content: space-between; 
            align-items: center;
            width: 100%; 
            max-width: 100%; 
            padding: 0.5rem 3rem; 
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
            font-size: 1.9rem;
            font-weight: 900;
            background: linear-gradient(to right, #ffffff, var(--accent-gold));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
            white-space: nowrap;
        }

        .logo-img { max-height: 50px; width: auto; }

        .nav-links { list-style: none; display: flex; gap: 30px; margin: 0; }
        
        .nav-links li a { 
            text-decoration: none; 
            color: var(--text-light); 
            font-size: 1.1rem; 
            font-weight: 500;
            position: relative;
            padding: 5px 0;
            transition: all 0.3s ease;
        }
        
        .nav-links li a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
            transition: width 0.4s ease-in-out;
            box-shadow: 0 0 8px var(--accent-gold);
        }

        .nav-links li a:hover::after,
        .nav-links li a.active::after { width: 100%; }

        .nav-links li a:hover,
        .nav-links li a.active { 
            color: var(--accent-gold); 
            text-shadow: 0 0 8px var(--glow-shadow); 
        }

        .hamburger { display: none; font-size: 2rem; cursor: pointer; color: var(--text-light); transition: 0.3s; }
        .hamburger.rotate { transform: rotate(90deg); color: var(--accent-gold); }

        /* --- ریسپانسیو هدر --- */
        @media (max-width: 992px) {
            .navbar { padding: 0.8rem 1rem; }
            .nav-links {
                display: none;
                flex-direction: column;
                width: 100%;
                position: absolute;
                top: 100%;
                right: 0;
                background: linear-gradient(var(--bg-header-start), var(--bg-header-end));
                text-align: center;
                gap: 0;
                box-shadow: 0 10px 20px rgba(0,0,0,0.5);
                border-bottom: 1px solid var(--accent-gold);
                z-index: 999;
            }
            .nav-links.active { display: flex; }
            .nav-links li { width: 100%; border-top: 1px solid rgba(255,255,255,0.05); }
            .nav-links li a { display: block; padding: 1.2rem; width: 100%; }
            .nav-links li a::after { display: none; }
            .nav-links li a:hover, .nav-links li a.active {
                background-color: rgba(255,255,255,0.05);
            }
            .hamburger { display: block; }
        }
        
        @media (max-width: 768px) {
            .logo { font-size: 1.5rem; gap: 10px; }
            .logo-img { max-height: 40px; }
        }

        /* --- استایل‌های اختصاصی ماشین حساب --- */
        main.main-content {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px 20px;
        }

        .widget-container {
            background: var(--bg-card);
            width: 100%;
            max-width: 450px;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
            border: 1px solid rgba(212, 175, 55, 0.15);
            overflow: hidden;
            text-align: center;
            position: relative;
            min-height: 350px;
        }

        /* لودینگ */
        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-card);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 10;
            transition: opacity 0.5s ease, visibility 0.5s;
        }
        .loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid rgba(212, 175, 55, 0.1);
            border-top: 4px solid var(--accent-gold);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* محتوای ماشین حساب */
        .widget-header {
            background: linear-gradient(135deg, #1e2a45, #0f172a);
            padding: 25px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .widget-header h2 { margin: 0; font-size: 1.6rem; color: var(--accent-gold); }
        .widget-header p { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-muted); }

        .widget-content { padding: 25px; }

        .big-price-box {
            background: rgba(212, 175, 55, 0.05);
            padding: 20px;
            border-radius: 15px;
            border: 1px solid var(--accent-gold);
            margin-bottom: 25px;
            box-shadow: 0 0 20px var(--glow-shadow);
        }
        .big-price-box .label { display: block; margin-bottom: 10px; color: var(--text-muted); font-size: 0.9rem; }
        .big-price-box .value { font-size: 2rem; font-weight: bold; color: var(--text-light); }
        .big-price-box .unit { font-size: 0.9rem; color: var(--accent-gold); }

        .price-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;

            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .price-row:last-child { border-bottom: none; margin-bottom: 0; }
        .price-row .label { color: var(--text-muted); font-size: 0.95rem; }
        .price-row .value { font-weight: bold; font-size: 1.1rem; color: #fff; }
        .price-row .unit { font-size: 0.75rem; color: #777; margin-right: 5px; }

        .widget-footer {
            background: #0f172a;
            padding: 12px 25px;
            font-size: 0.8rem;
            color: #666;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        #status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 5px; }

        /* --- استایل‌های فوتر (دقیقاً طبق کد شما) --- */
        footer {
            background: linear-gradient(135deg, var(--bg-header-start), var(--bg-header-end));
            border-top: 1px solid var(--accent-gold);
            padding: 4rem 1rem 1rem 1rem;
            margin-top: auto; /* چسبیدن به پایین صفحه */
            direction: rtl;
        }

        .footer-container {
            max-width: 90%;
            display: grid;
            margin: auto;
            grid-template-columns: repeat(4, 1fr);
            gap: 2rem;
            text-align: center; 
        }

        .footer-col h4, .footer-col .footer-logo-title {
            color: var(--accent-gold);
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 1.5rem;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--accent-gold);
            display: inline-block;
        }

        .footer-links { list-style: none; padding: 0; text-align: center; }

        .footer-links li { 
            margin-bottom: 15px; 
            display: flex; 
            align-items: center; 
            gap: 10px;
            justify-content:center;
        }

        .contact-icon-box {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            flex-shrink: 0;
        }
        .contact-icon-box img { width: 100%; height: 100%; object-fit: contain; }
        .contact-icon-box svg { width: 100%; height: 100%; fill: var(--accent-gold); }

        .footer-links a, .footer-links span { 
            color: var(--text-muted); 
            font-size: 0.95rem; 
            transition: all 0.3s;
            text-decoration: none;
        }
        .footer-links a:hover { 
            color: var(--text-light); 
            padding-right: 8px;
            text-shadow: 0 0 5px var(--glow-shadow);
        }

        .license-box { display: flex; gap: 10px; justify-content: center; }

        .footer-bottom {
            border-top: 1px solid var(--border-light);
            margin-top: 3rem;
            padding-top: 2rem;
            display: flex;
            justify-content: space-between;
            color: var(--text-muted);
            font-size: 0.85rem;
            flex-wrap: wrap;
            gap: 15px;
        }

        @media (max-width: 1024px) {
            .footer-container {
                grid-template-columns: repeat(2, 1fr);
                text-align: center;
            }
            .footer-col {
                display: flex;
                flex-direction: column;
                align-items: center;
            }
        }

        @media (max-width: 768px) {
            .footer-container { 
                grid-template-columns: 1fr;
                text-align: center; 
            }
            .footer-bottom { 
                justify-content: center; 
                text-align: center; 
            }
            .footer-links a:hover { padding-right: 0; }
        }