
    /* تنظیمات کلی و فونت */
    :root {
        --bg-color: #050505;
        --card-bg: rgba(30, 30, 35, 0.85);
        --text-main: #e0e0e0;
        --text-muted: #b0b0b0;
        
        /* رنگ‌های نئونی اصلاح شده */
        --neon-gold: #ffd700;
        --neon-blue: #00f3ff;
        --neon-purple: #bc13fe;
        --neon-green: #0aff0a;
        --neon-orange: #ff9100;
        --neon-red: #ff0055;
        
        --font-family: "Vazirmatn", sans-serif; /* حتماً فونت را در HTML لینک کنید */
        --header-height: 80px;
    }

    /* تنظیمات پایه */
    html {
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: var(--neon-gold) #111;
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        outline: none;
        /* text-align: center حذف شد تا چیدمان به هم نریزد */
    }

    body {
        background-color: var(--bg-color);
        color: var(--text-main);
        font-family: var(--font-family);
        overflow-x: hidden;
        line-height: 1.6;
    }

    /* اسکرول بار سفارشی */
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #111;
    }
    ::-webkit-scrollbar-thumb {
        background: #444; /* کمی روشن‌تر برای دیده شدن */
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: var(--neon-gold);
    }

    /* هدر */
       /* هدر */
    header {
        position: fixed;
        top: 14px;
        left: 50%;
        transform: translateX(-50%); /* وسط‌چین کردن دقیق */
        width: 96%;
        max-width: 1200px;
        height: var(--header-height); /* ارتفاع ثابت برای جلوگیری از پرش */
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 25px;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 1000;
        border: 1px solid var(--neon-gold);
        border-radius: 14px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        transition: all 0.3s ease;
    }

    @supports not (backdrop-filter: blur(12px)) {
        header {
            background: #0a0a0a;
        }
    }

    /* گروه سمت چپ (لوگو) */
    .header-left-group {
        display: flex;
        align-items: center;
        gap: 15px;
        z-index: 2; /* برای اینکه روی بک‌گراند باشد */
    }

    .logo-container {
        display: flex;
        align-items: center;
        cursor: pointer;
        gap: 10px;
        transition: transform 0.3s ease;
    }
    .logo-container:hover {
        transform: scale(1.05);
    }
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    .logo-text {
        font-size: 1.2rem;
        font-weight: 800;
        background: linear-gradient(45deg, var(--neon-gold), #ffaa00);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* ویجت ساعت و تاریخ (وسط هدر - آپسولوت) */
    .header-datetime {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* دقیقاً در مرکز */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(218, 165, 32, 0.3);
        border-radius: 8px;
        padding: 6px 15px;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1;
        white-space: nowrap; /* جلوگیری از شکستن خط */
    }
    .time-display {
        font-size: 0.9rem;
        color: var(--neon-gold);
        font-weight: 700;
        line-height: 1.1;
    }
    .date-display {
        font-size: 0.7rem;
        color: var(--text-muted);
        line-height: 1.1;
    }

    /* کنترل‌های هدر (راست) */
    .header-controls {
        display: flex;
        align-items: center;
        gap: 15px;
        z-index: 2;
    }
    .lang-btn {
        background: transparent;
        border: 1px solid var(--neon-blue);
        color: var(--neon-blue);
        padding: 8px 16px;
        border-radius: 8px;
        cursor: pointer;
        font-family: inherit;
        font-weight: bold;
        transition: all 0.3s ease;
        font-size: 0.9rem;
    }
    .lang-btn:hover {
        background: var(--neon-blue);
        color: #000;
        box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
    }
    .lang-btn:active {
        transform: scale(0.95);
    }
    /* بخش هیرو */
    #hero {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: relative;
        padding-top: calc(var(--header-height) + 60px);
        padding-bottom: 40px;
        overflow: hidden;
    }

    /* پس‌زمینه متحرک */
    #hero::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 60%);
        animation: rotateBg 20s linear infinite;
        z-index: -1;
    }
    @keyframes rotateBg {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .hero-content {
        z-index: 2;
        animation: fadeInUp 1s ease-out;
        margin-bottom: 40px;
        padding: 0 20px;
    }
    .hero-title {
        font-size: 3rem;
        color: var(--neon-gold);
        margin-bottom: 15px;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 1.2rem;
        color: var(--text-muted);
        max-width: 700px;
        margin: 0 auto;
    }

    /* جستجو و دکمه */
    .hero-actions {
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        width: 100%;
        max-width: 600px;
        animation: fadeInUp 1.4s ease-out;
        padding: 0 20px;
    }
    .search-box {
        position: relative;
        width: 100%;
        max-width: 500px;
    }
    .search-input {
        width: 100%;
        padding: 15px 50px 15px 20px;
        border-radius: 30px;
        border: 1px solid rgba(255, 215, 0, 0.3);
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
        font-family: inherit;
        font-size: 1rem; /* اصلاح شده: قبلا 0.5rem بود */
        transition: all 0.3s ease;
        text-align: center;
    }
    .search-input:focus {
        border-color: var(--neon-gold);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
        background: rgba(255, 255, 255, 0.1);
    }
    .search-icon {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }
    .explore-btn {
        padding: 12px 40px;
        background: linear-gradient(45deg, var(--neon-gold), #ff9100);
        border: none;
        border-radius: 30px;
        color: #000;
        font-weight: bold;
        font-size: 1.1rem;
        cursor: pointer;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-decoration: none;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    .explore-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    }

    /* استایل کارت‌های ابزارها */
    section {
        position: relative;
        min-height: 80vh;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 80px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    /* سیستم تم هوشمند با رنگ‌های اصلاح شده */
    #tool1 { --theme-color: var(--neon-gold); }
    #tool2 { --theme-color: var(--neon-green); }
    #tool3 { --theme-color: var(--neon-blue); }
    #tool4 { --theme-color: var(--neon-green); }
    #tool5 { --theme-color: #0077ff; }
    #tool6 { --theme-color: var(--neon-gold); }
    #tool7 { --theme-color: var(--neon-purple); }
    #tool8 { --theme-color: var(--neon-red); }
    #tool9 { --theme-color: #00c23a; }

    .bg-glow {
        position: absolute;
        width: 350px;
        height: 350px;
        border-radius: 50%;
        filter: blur(100px);
        opacity: 0.15;
        z-index: 0;
        background: var(--theme-color);
        transition: all 0.5s ease;
    }
    .tool-card {
        position: relative;
        z-index: 1;
        background: var(--card-bg);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 40px;
        border-radius: 20px;
        max-width: 500px;
        width: 100%;
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .tool-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
        border-color: var(--theme-color);
    }
    .tool-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 25px;
        color: var(--theme-color);
        transition: transform 0.3s ease;
    }
    .tool-card:hover .tool-icon {
        transform: scale(1.1) rotate(5deg);
    }
    .tool-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        color: #fff;
    }
    .tool-desc {
        color: var(--text-muted);
        margin-bottom: 35px;
        font-size: 1rem;
        line-height: 1.7;
    }
    .tool-btn {
        display: inline-block;
        padding: 12px 35px;
        background: transparent;
        color: var(--theme-color);
        text-decoration: none;
        border-radius: 30px;
        font-weight: bold;
        transition: all 0.3s ease;
        border: 1px solid var(--theme-color);
        position: relative;
        overflow: hidden;
    }
    .tool-btn:hover {
        background: var(--theme-color);
        color: #000;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    /* انیمیشن‌ها */
    @keyframes fadeInUp {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* مدیا کوئری برای موبایل */
       @media (max-width: 768px) {
        header {
            top: 10px;
            width: 94%;
            height: auto;
            min-height: 70px;
            padding: 10px 15px;
            flex-direction: row; /* برعکس کردن جهت: راست به چپ */
            justify-content: space-between; /* فاصله‌گذاری بین آیتم‌ها */
            align-items: center;
        }

        .header-left-group {
            order: 1; /* لوگو در سمت راست */
        }

        .header-datetime {
            position: static; /* ساعت در جریان عادی قرار می‌گیرد */
            transform: none;
            order: 2; /* ساعت در وسط */
            flex: 1; /* پر کردن فضای خالی وسط */
            margin: 0 10px;
            padding: 4px 8px;
            background: transparent;
            border: none;
            display: none;
        }

        .time-display {
            font-size: 0.9rem;
        }
        .date-display {
            font-size: 0.7rem;
            display: none;
            
        }

        .header-controls {
            order: 3; /* دکمه در سمت چپ */
        }

        .lang-btn {
            padding: 6px 12px;
            font-size: 0.8rem;
        }

        .logo-icon {
            width: 30px;
            height: 30px;
        }
        .logo-text {
            font-size: 1rem;
        }

        .hero-title { font-size: 2rem; }
        .hero-subtitle { font-size: 1rem; }
        .tool-card { padding: 30px 20px; }
        section { min-height: auto; padding: 60px 15px; }
        #hero { padding-top: 120px; }
    }

