/* =========================================================
    MIZAN-E-TAHIR: MASTER DYNAMIC STYLING (Final Theme Fix)
   ========================================================= */

/* =========================================================
    MIZAN-E-TAHIR: COMPREHENSIVE THEME SYSTEM (Full Environment)
   ========================================================= */

/* =========================================================
    MIZAN-E-TAHIR: BALANCED DARK THEMES (Visibility Fix)
   ========================================================= */

:root {
    /* بنیادی ڈارک گولڈن تھیم */
    --bg-base: #1e293b; /* Slate 800 */
    --glass-bg: rgba(15, 23, 42, 0.95);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --neon-gold: #f59e0b;
    --neon-gold-glow: rgba(245, 158, 11, 0.4);
    --neon-cyan: #06b6d4;
}

/* --- فیروزی تھیم (Deep Ocean Dark) --- */
[data-theme="cyan"] {
    --bg-base: #164e63; /* Cyan 800 */
    --glass-bg: rgba(8, 47, 73, 0.95);
    --neon-gold: #06b6d4;
    --neon-gold-glow: rgba(6, 182, 212, 0.4);
    --neon-cyan: #f59e0b;
}

/* --- زمرد تھیم (Deep Forest Dark) --- */
[data-theme="emerald"] {
    --bg-base: #065f46; /* Emerald 800 */
    --glass-bg: rgba(6, 78, 59, 0.95);
    --neon-gold: #10b981;
    --neon-gold-glow: rgba(16, 185, 129, 0.4);
    --neon-cyan: #34d399;
}

/* --- یاقوتی تھیم (Deep Maroon Dark) --- */
[data-theme="rose"] {
    --bg-base: #9f1239; /* Rose 800 */
    --glass-bg: rgba(69, 10, 10, 0.95);
    --neon-gold: #f43f5e;
    --neon-gold-glow: rgba(244, 63, 94, 0.4);
    --neon-cyan: #fb7185;
}

/* --- جامنی تھیم (Deep Amethyst Dark) --- */
[data-theme="purple"] {
    --bg-base: #581c87; /* Purple 800 */
    --glass-bg: rgba(46, 16, 101, 0.95);
    --neon-gold: #a855f7;
    --neon-gold-glow: rgba(168, 85, 247, 0.4);
    --neon-cyan: #c084fc;
}

/* --- نئی گہری اور رنگین ڈارک تھیمز --- */

/* عنابی تھیم (Deep Maroon Dark) */
[data-theme="crimson"] {
    --bg-base: #881337;
    --glass-bg: rgba(63, 0, 12, 0.95);
    --neon-gold: #e11d48;
    --neon-gold-glow: rgba(225, 29, 72, 0.4);
}

/* لیمو تھیم (Forest Lime Dark) */
[data-theme="lime"] {
    --bg-base: #3f6212;
    --glass-bg: rgba(26, 46, 5, 0.95);
    --neon-gold: #a3e635;
    --neon-gold-glow: rgba(163, 230, 53, 0.4);
}

/* ٹیل تھیم (Mid-Ocean Teal Dark) */
[data-theme="teal"] {
    --bg-base: #115e59;
    --glass-bg: rgba(0, 77, 64, 0.95);
    --neon-gold: #26a69a;
    --neon-gold-glow: rgba(38, 166, 154, 0.4);
}

/* کوبالٹ تھیم (Royal Cobalt Blue Dark) */
[data-theme="cobalt"] {
    --bg-base: #1e40af;
    --glass-bg: rgba(10, 25, 49, 0.95);
    --neon-gold: #00bcd4;
    --neon-gold-glow: rgba(0, 188, 212, 0.4);
}

/* --- مزید 10 رنگین تھمز --- */
[data-theme="blue"] { --bg-base: #1e3a8a; --neon-gold: #3b82f6; --neon-gold-glow: rgba(59, 130, 246, 0.4); --glass-bg: rgba(15, 23, 42, 0.95); }
[data-theme="green"] { --bg-base: #064e3b; --neon-gold: #10b981; --neon-gold-glow: rgba(16, 185, 129, 0.4); --glass-bg: rgba(2, 44, 34, 0.95); }
[data-theme="malta"] { --bg-base: #7c2d12; --neon-gold: #fb923c; --neon-gold-glow: rgba(251, 146, 60, 0.4); --glass-bg: rgba(69, 26, 3, 0.95); }
[data-theme="wheat"] { --bg-base: #451a03; --neon-gold: #f59e0b; --neon-gold-glow: rgba(245, 158, 11, 0.4); --glass-bg: rgba(30, 10, 2, 0.95); }
[data-theme="sky"] { --bg-base: #082f49; --neon-gold: #38bdf8; --neon-gold-glow: rgba(56, 189, 248, 0.4); --glass-bg: rgba(7, 34, 55, 0.95); }
[data-theme="pink"] { --bg-base: #831843; --neon-gold: #f472b6; --neon-gold-glow: rgba(244, 114, 182, 0.4); --glass-bg: rgba(60, 10, 30, 0.95); }
[data-theme="yellow"] { --bg-base: #422006; --neon-gold: #facc15; --neon-gold-glow: rgba(250, 204, 21, 0.4); --glass-bg: rgba(30, 15, 2, 0.95); }
[data-theme="muddy"] { --bg-base: #27272a; --neon-gold: #a1a1aa; --neon-gold-glow: rgba(161, 161, 170, 0.4); --glass-bg: rgba(20, 20, 22, 0.95); }
[data-theme="red"] { --bg-base: #7f1d1d; --neon-gold: #f87171; --neon-gold-glow: rgba(248, 113, 113, 0.4); --glass-bg: rgba(60, 10, 10, 0.95); }
[data-theme="ash"] { --bg-base: #1e293b; --neon-gold: #cbd5e1; --neon-gold-glow: rgba(203, 213, 225, 0.4); --glass-bg: rgba(15, 23, 42, 0.95); }

/* غروبِ آفتاب تھیم (Sunset Amber Dark) */
[data-theme="amber"] {
    --bg-base: #7c2d12;
    --glass-bg: rgba(69, 34, 10, 0.95);
    --neon-gold: #f97316;
    --neon-gold-glow: rgba(249, 115, 22, 0.4);
}

/* --- نئے رنگوں کے ڈبوں کا اسٹائل --- */
.crimson {
    background: #e11d48;
}

.lime {
    background: #a3e635;
}

.teal {
    background: #26a69a;
}

.cobalt {
    background: #00bcd4;
}

.amber { background: #f97316; }
.blue { background: #3b82f6; }
.green { background: #10b981; }
.malta { background: #fb923c; }
.wheat { background: #f59e0b; }
.sky { background: #38bdf8; }
.pink { background: #f472b6; }
.yellow { background: #facc15; }
.muddy { background: #a1a1aa; }
.red { background: #f87171; }
.ash { background: #cbd5e1; }



/* لوگو اور تحریر کی سیٹنگز (سفید لوگو کے لیے) */
.main-logo-img {
    filter: invert(1) brightness(2);
    /* ہر تھیم پر لوگو سفید رہے گا */
    transition: 0.5s;
}

html, body {
    background-color: var(--bg-base) !important;
    color: var(--text-primary);
    transition: background-color 0.6s ease;
}

/* رزلٹ باکسز اور پینلز کا رنگ پس منظر کے مطابق تھوڑا گہرا رہے گا */
.glass-panel {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

/* تمام زبانوں کے لیے مشترکہ اسٹائل */
body {
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: #0f172a; /* جو بھی آپ کا بیک گراؤنڈ ہے */
}

/* --- زبان کے مطابق مخصوص رسم الخط --- */

/* اردو: نستعلیق اور دائیں سے بائیں */
.font-ur { 
    font-family: 'Jameel Noori Nastaleeq', 'mehr Nastaliq', 'Noto Nastaliq Urdu', serif; 
    direction: rtl; 
}

/* عربی: نسخ فونٹ اور دائیں سے بائیں */
.font-ar { 
    font-family: 'NaskhMusaad', 'Amiri', serif; 
    font-size: 1.15em; 
    direction: rtl; 
}

/* انگریزی: جدید فونٹ اور بائیں سے دائیں (LTR) */
.font-en { 
    font-family: 'Segoe UI', Roboto, Arial, sans-serif; 
    direction: ltr; 
    line-height: 1.6; /* انگریزی کے لیے تھوڑی کم سپیس بہتر لگتی ہے */
}




* {
    box-sizing: border-box;
}

/* --- زبان کے بٹن --- */
.inline-lang-switcher {
    display: inline-flex;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.lang-btn {
    background: transparent;
    color: var(--text-primary);
    padding: 2px 12px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 60px;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.15), inset -1px -1px 2px rgba(0, 0, 0, 0.4);
}

.lang-btn:last-child {
    border-left: none;
}

/* تھیم کا رنگ بدلنے کے ساتھ لینگویج بٹن کا رنگ بھی بدل جائے */
.lang-btn.active {
    background: var(--neon-gold) !important;
    color: #000 !important;
    font-weight: bold;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.5), inset -1px -1px 2px rgba(255, 255, 255, 0.4) !important;
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
}

/* --- ہیڈر اور لوگو --- */
.master-header {
    position: relative;
    top: 0;
    z-index: 3000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--neon-gold);
    padding: 15px 0;
    border-radius: 0 0 25px 25px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    flex-direction: row-reverse;
}

.theme-selection-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.theme-switcher.second-row {
    background: rgba(255, 255, 255, 0.04);
}


.logo-area {
    margin: 0;
    text-align: left;
}

.main-logo-img {
    max-height: 110px;
    width: auto;
    filter: invert(1) brightness(2);
    will-change: filter;
}

/* --- مینیو سکرولنگ --- */
.category-nav,
.sub-nav {
    display: inline-flex;
    margin-top: 3px;
    margin-bottom: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    padding: 0;
    max-width: 100%;
    
    /* Scroll properties */
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar,
.sub-nav::-webkit-scrollbar {
    display: none;
}

.sub-nav {
    display: none; /* Controlled by JS */
}

.cat-item {
    flex: 0 0 auto;
    background: transparent;
    color: var(--text-primary);
    padding: 2px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08); /* Divider */
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.15), inset -1px -1px 2px rgba(0, 0, 0, 0.4);
}

.cat-item:last-child {
    border-left: none;
}

/* ایکٹو بٹن اب تھیم کے مطابق رنگ بدلے گا */
.cat-item.active {
    background: var(--neon-gold) !important;
    color: #000 !important;
    font-weight: bold;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.5), inset -1px -1px 2px rgba(255, 255, 255, 0.4) !important;
}

.cat-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
}

/* --- موبائل ترتیب --- */
@media (max-width: 768px) {
    .master-header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .header-top {
        flex-direction: column !important;
        width: 100%;
        padding: 10px 0;
        gap: 15px;
    }

    .logo-area {
        order: 1;
        width: 100%;
        text-align: center;
    }

    .nav-container {
        order: 2;
        width: 100%;
    }

    .category-nav,
    .sub-nav {
        max-width: 100%;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
    }

    .cat-item {
        font-size: 1rem;
    }
}

/* --- ان پٹ باکسز کی اصلاح --- */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 20px;
}

.input-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group label {
    font-size: 1.4rem;
    color: var(--neon-gold);
    font-weight: bold;
    text-align: right;
}

input,
select {
    width: 100%;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1.5rem;
    font-family: inherit;
    text-align: right;
    outline: none;
}

/* فوکس ہونے پر تھیم والا رنگ نظر آئے گا */
input:focus,
select:focus {
    border-color: var(--neon-gold);
    box-shadow: 0 0 12px var(--neon-gold-glow);
}

.multi-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 15px;
    border: 1px dashed var(--glass-border);
}

.sub-form label {
    font-size: 1rem !important;
    margin-bottom: 5px;
    display: block;
}

.sub-form input {
    font-size: 1.2rem !important;
    padding: 10px !important;
    text-align: center;
}

/* --- رزلٹ باکسز (فل وڈتھ) --- */
.digital-display .display-box.full-width {
    grid-column: 1 / -1 !important;
    background: var(--neon-gold-glow) !important;
    border: 1.5px solid var(--neon-gold) !important;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
}

/* --- ڈیجیٹل ڈسپلے --- */
.digital-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.display-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 10px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.display-box.highlight {
    border-color: var(--neon-gold);
    background: var(--neon-gold-glow);
}

.value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

/* ایکٹو رزلٹ اب تھیم کے مطابق بدلے گا */
.active-val {
    color: var(--neon-gold) !important;
    text-shadow: 0 0 10px var(--neon-gold-glow);
}

.label {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* --- تقابلی جائزہ --- */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.res-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border-bottom: 3px solid var(--neon-gold);
    min-height: 110px;
}

.res-item span {
    color: var(--neon-cyan);
    font-size: 1.4rem !important;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.res-item b {
    color: #fff;
    font-size: 1.4rem !important;
    font-family: 'Tajawal', sans-serif;
    opacity: 0.9;
}

/* --- بٹنز اور فوٹر --- */
.action-bar {
    display: flex;
    gap: 15px;
    padding: 20px;
    justify-content: center;
}

.action-btn {
    flex: 1;
    max-width: 250px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: bold;
    transition: 0.3s;
}

.copy-btn {
    background: var(--neon-gold);
    color: #000;
    border: none;
}

.print-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.site-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 1.2rem;
}

.gold-text {
    color: var(--neon-gold);
    font-weight: bold;
    text-shadow: 0 0 8px var(--neon-gold-glow);
}

.author-link,
.author-link:visited,
.author-link:hover,
.author-link:active {
    color: var(--neon-gold) !important;
    text-decoration: none !important;
    transition: 0.3s;
}

/* --- تھیم سوئچر کا اسٹائل --- */
.theme-switcher {
    display: flex;
    gap: 10px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.theme-box {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: 0.3s ease;
}

.theme-box:hover {
    transform: scale(1.3);
}

.gold { background: #f59e0b; }
.cyan { background: #06b6d4; }
.emerald { background: #10b981; }
.rose { background: #f43f5e; }
.purple { background: #a855f7; }

/* --- ڈائنامک سیکشن (کرنسی اور زیور) --- */
.dynamic-section-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dynamic-section-title {
    color: var(--neon-gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dynamic-row {
    display: grid;
    grid-template-columns: 2fr 2fr auto;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    animation: fadeInRow 0.3s ease;
}

.jewelry-row {
    grid-template-columns: 1.5fr 1.5fr 2fr auto;
}

@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.remove-row-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.remove-row-btn:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg);
}

.add-row-btn {
    background: rgba(245, 158, 11, 0.1);
    color: var(--neon-gold);
    border: 1px dashed var(--neon-gold);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    transition: 0.3s;
    margin-top: 5px;
}

.add-row-btn:hover {
    background: var(--neon-gold-glow);
    border-style: solid;
}

.rate-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
}

.searchable-select-wrapper {
    position: relative;
    width: 100%;
}

.currency-select-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
    text-align: center;
}

.currency-select-input:focus {
    outline: none;
    border-color: var(--neon-gold);
    background: rgba(255, 255, 255, 0.1);
}

.currency-input-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.pkr-equivalent {
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-top: 5px;
    font-weight: bold;
    text-align: center;
    opacity: 0.8;
    transition: 0.3s;
}

@media (max-width: 600px) {
    .dynamic-row, .jewelry-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .remove-row-btn {
        width: 100%;
        border-radius: 8px;
    }
}

/* =========================================
   PROFESSIONAL PRINT STYLING
   ========================================= */
@media print {

    /* فالتو چیزیں چھپائیں */
    .master-header,
    .ambient-orb,
    .action-bar,
    .sub-nav,
    .category-nav,
    .header-glow {
        display: none !important;
    }

    /* بیک گراؤنڈ اور لکھائی کا رنگ درست کریں */
    body {
        background: white !important;
        color: black !important;
        padding: 0;
        margin: 0;
    }

    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* گلاس پینل کو سادہ باکس میں بدلیں */
    .glass-panel {
        background: transparent !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        margin-bottom: 20px !important;
    }

    /* لکھائی کو سیاہ کریں */
    h1,
    h3,
    label,
    .value,
    .label,
    b,
    span,
    p,
    .author-link {
        color: black !important;
        text-shadow: none !important;
    }

    .active-val {
        color: black !important;
    }

    /* ان پٹ باکسز کا اسٹائل */
    input,
    select {
        border: 1px solid #000 !important;
        background: transparent !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* تقابلی جائزہ کے ڈبے */
    .res-item {
        border: 1px solid #ccc !important;
        background: #f9f9f9 !important;
        page-break-inside: avoid;
    }

    /* پرنٹ کے لیے خاص ہیڈر (جو ویب سائٹ پہ نہیں دکھتا) */
    .print-only-header {
        display: block !important;
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
}

/* عام حالت میں یہ پرنٹ ہیڈر چھپا رہے گا */
.print-only-header {
    display: none;
}



.form-group input,
.form-group select,
.input-wrapper input {
    width: 100% !important;
    /* مکمل چوڑائی */
    max-width: 100%;
    /* حدود سے باہر نہ جائے */
    display: block;
    outline: none;
    border: 1px solid var(--glass-border);
    /* پیڈنگ اور بارڈر کو چوڑائی کے اندر رکھنے کے لیے */
    box-sizing: border-box !important;
}

/* اگر ان پٹ کسی کارڈ کے اندر ہے تو اسے تھوڑی گنجائش دیں */
.input-card {
    overflow: hidden;
    /* باہر نکلنے والی چیزوں کو چھپا دے */
}

@media (max-width: 768px) {
    .form-group {
        padding: 0 5px;
        /* دائیں بائیں سے تھوڑی جگہ */
    }

    input[type="number"] {
        font-size: 16px;
        /* آئی فون پر آٹو زوم روکنے کے لیے */
    }
}


/* لائیو قیمت والے بٹن کا اسٹائل */
.fetch-price-btn {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    /* گولڈن گریڈیئنٹ */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    width: 100%;
    /* موبائل پر پورا آئے گا */
}

.fetch-price-btn:hover {
    background: linear-gradient(135deg, #b8860b, #d4af37);
    transform: translateY(-2px);
    /* تھوڑا اوپر اٹھے گا */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.fetch-price-btn:active {
    transform: translateY(0);
}

.fetch-price-btn i {
    font-size: 14px;
}

/* لوڈنگ کے دوران بٹن کا اسٹائل */
.fetch-price-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* خانوں کو موبائل پر دو دو کرنے کے لیے */
.digital-display {
    display: flex !important;
    flex-wrap: wrap !important;
    /* یہ لائن خانوں کو اگلی لائن میں بھیجے گی */
    gap: 10px;
    /* خانوں کے درمیان تھوڑا فاصلہ */
    justify-content: center;
}

.digital-display .display-box {
    flex: 1 1 calc(50% - 10px);
    /* یہ لائن ہر خانے کو آدھی جگہ (50%) دے گی */
    min-width: 140px;
    /* موبائل پر توازن برقرار رکھنے کے لیے */
}


/* قیمت والے خانے اور بٹن کو موبائل پر اوپر نیچے کرنے کے لیے */
.input-card .multi-input-grid .sub-form div {
    display: flex;
    flex-wrap: wrap;
    /* یہ لائن بٹن کو نیچے بھیجے گی */
    gap: 8px;
}

#metal-price {
    flex: 1 1 140px;
    /* کم از کم چوڑائی، اس سے کم ہو تو بٹن نیچے چلا جائے گا */
    min-height: 45px;
}

.fetch-price-btn {
    flex: 1 1 100%;
    /* موبائل پر بٹن پوری چوڑائی اختیار کر لے گا */
    justify-content: center;
    padding: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
    /* تحریر کو ایک لائن میں رکھے گا */
}

/* بڑی اسکرین (Desktop) کے لیے بٹن کو دوبارہ برابر میں لانے کے لیے */
@media (min-width: 600px) {
    .fetch-price-btn {
        flex: 0 1 auto;
        /* بڑی اسکرین پر بٹن اپنی ضرورت کے مطابق جگہ لے گا */
        width: auto !important;
    }
}

/* =========================================================
   MIZAN-E-TAHIR: UI/UX ENHANCEMENTS (Phase 1)
   ========================================================= */

/* --- Welcome Screen Classes --- */
.w-screen-wrapper {
    text-align: center;
    padding: 40px 20px;
}

.w-screen-panel {
    padding: 40px;
    border-radius: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.w-screen-title {
    font-family: 'mehr Nastaliq', serif;
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--neon-gold);
}

.w-screen-divider {
    width: 80px;
    height: 4px;
    background: var(--neon-cyan);
    margin: 0 auto 30px;
}

.w-screen-content {
    font-size: 1.4rem;
    line-height: 2;
    color: var(--text-primary);
}

.w-screen-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    text-align: right;
    display: inline-block;
}

.w-screen-list li {
    margin-bottom: 10px;
}

.w-screen-bullet {
    color: var(--neon-cyan);
    margin-left: 10px;
}

.w-screen-highlight {
    font-weight: bold;
    margin-top: 20px;
    color: var(--neon-cyan);
}

.w-screen-footer {
    margin-top: 30px;
    font-size: 1.2rem;
}

/* --- Print Header Classes --- */
.print-h1 {
    margin: 0;
}

.print-subtitle {
    font-size: 1.2rem;
    margin: 5px 0;
}

.print-url {
    font-size: 1rem;
}

/* --- Sub-form utilities and Zakat Info Box --- */
.w-full {
    width: 100%;
}

.flex-gap-5 {
    display: flex;
    gap: 5px;
}

.meta-group-margin {
    margin-top: 15px;
}

.metal-price-section {
    margin-top: 15px;
    border-top: 1px dashed var(--glass-border);
    padding-top: 15px;
}

.zakat-cash-info-box {
    margin-bottom: 20px;
    border: 1px dashed var(--neon-gold);
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.zakat-cash-note {
    color: var(--neon-gold);
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: block;
}

.zakat-dual-nisab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .zakat-dual-nisab-grid {
        grid-template-columns: 1fr;
    }
}

.fiqh-note-panel {
    border-right-width: 4px !important;
    border-right-style: solid !important;
    animation: fadeInScale 0.4s ease-out;
}

.jewelry-row .pkr-equivalent {
    display: block;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-top: 2px;
    font-style: italic;
    opacity: 0.8;
}


.zakat-nisab-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.zakat-nisab-input {
    flex: 1 1 150px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--neon-gold);
    color: white;
    border-radius: 5px;
    font-size: 1.1rem;
}

.fetch-nisab-btn {
    flex: 1 1 auto;
    min-width: 150px;
    background: var(--neon-gold);
    color: black;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Noto Nastaliq Urdu';
}

.zakat-debt-label {
    color: #ff4444;
}

.zakat-debt-container {
    border-right: 3px solid #ff4444;
    border-radius: 4px;
    padding-right: 5px;
}

.zakat-cash-res-container {
    margin-top: 10px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.zakat-cash-res-val {
    color: #00ff00 !important;
}

.animal-note-panel {
    margin-top: 15px;
    padding: 15px;
    text-align: center;
    line-height: 1.8;
}

/* --- Tab Transitions (Fade In) --- */
.tab-content {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Beautiful Nisab Alert Box --- */
#nisab-alert {
    display: none;
    /* Initially hidden */
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
    border: 1px solid var(--neon-gold-glow);
    border-right: 5px solid var(--neon-gold);
    color: var(--neon-gold);
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 25px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

#nisab-alert::before {
    content: "💡 ";
    margin-left: 10px;
    font-size: 1.6rem;
    filter: drop-shadow(0 0 5px var(--neon-gold));
}

#nisab-alert::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: sweep 3s infinite linear;
}

@keyframes sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

#tab-title-display {
    text-align: center;
    margin: 0;
    padding: 10px 0;
}



/* ہیلپ بٹن کا ڈیزائن */
#category-help-btn {
    position: absolute;
    left: 15px; /* بائیں کونے میں سیٹ کرنے کے لیے */
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--neon-gold);
    border: 2px solid var(--neon-gold);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--neon-gold-glow);
}

#category-help-btn:hover {
    background: var(--neon-gold);
    color: var(--bg-base);
    box-shadow: 0 0 12px var(--neon-gold);
}

/* ہیلپ باکس (پاپ اپ) کا ڈیزائن */
.help-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.help-modal-box {
    background: var(--bg-base);
    border: 1px solid var(--neon-gold);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
    overflow: hidden;
}

.help-modal-header {
    background: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid var(--neon-gold);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--neon-gold);
}

.help-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-help-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-help-btn:hover {
    color: #ef4444; /* سرخ رنگ */
}

.help-modal-body {
    padding: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.8;
}

.help-modal-body b {
    color: var(--neon-cyan);
}



/* لنک بٹن کا ڈیزائن */
#category-link-btn {
    position: absolute;
    right: 15px; /* دائیں کونے میں */
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--neon-cyan); /* اسے نیلا (Cyan) رنگ دیا ہے تاکہ ہیلپ سے مختلف لگے */
    border: 1px solid var(--neon-cyan);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.4);
}

#category-link-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-base);
    box-shadow: 0 0 15px var(--neon-cyan);
}






/* تمام فقہی نوٹس اور تنبیہات کا فونٹ سائز */
#animal-note, #fiqh-note-text {
    font-size: 16px !important; 
    line-height: 1.7;
}






/* فطرانہ گروپ کا مین بیک گراؤنڈ باکس */
.fitrana-main-box {
    background: rgba(255, 255, 255, 0.03); /* ہلکا سا روشن بیک گراؤنڈ */
    border: 1px solid rgba(245, 158, 11, 0.3); /* گولڈن بارڈر مدھم سا */
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

/* کمپیوٹر پر ایک لائن میں دکھانے کے لیے */
.fitrana-inputs-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* موبائل پر ٹوٹنے کے لیے */
}

.fitrana-inputs-row .input-group {
    flex: 1; /* برابر جگہ گھیرنے کے لیے */
    min-width: 200px; /* کم از کم چوڑائی */
}

/* ٹائٹل اور نوٹ کا اسٹائل */
.section-subtitle {
    color: var(--neon-gold);
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-right: 4px solid var(--neon-gold);
    padding-right: 12px;
}

.item-note {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 8px;
   
}

.secondary-result-box {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--neon-cyan);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    animation: fadeIn 0.5s;
}

/* موبائل کے لیے خاص ایڈجسٹمنٹ */
@media (max-width: 768px) {
    .fitrana-inputs-row {
        flex-direction: column; /* موبائل پر اوپر نیچے */
        gap: 10px;
    }
    
    .fitrana-inputs-row .input-group {
        width: 100%;
    }
}





/* ویب کی لغت تبدیل کرنے کا بٹن */

/* مین سوئچر کنٹینر */
.custom-lang-switcher {
    position: relative;
    display: inline-block;
    margin: 0 10px;
}

/* مین بٹن کا ڈیزائن */
.lang-main-btn {
    background: #0f172a;
    color: #fcf6ba;
    border: 1px solid #bf953f;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s;
}

.lang-main-btn:hover {
    background: #1e293b;
    box-shadow: 0 0 8px rgba(191, 149, 63, 0.4);
}

/* ڈراپ ڈاؤن مینو کا ڈیزائن */
.lang-dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e293b;
    min-width: 140px;
    border: 1px solid #bf953f;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 6px;
    margin-top: 5px;
    /* اگر ویب سائٹ RTL ہے تو دائیں طرف کھلے، ورنہ بائیں طرف */
    right: 0; 
}

/* ڈراپ ڈاؤن کے لنکس */
.lang-dropdown-content a {
    color: #fcf6ba;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid #334155;
    text-align: right;
}

.lang-dropdown-content a:hover {
    background-color: #334155;
    color: #fff;
}

/* مینو دکھانے کے لیے کلاس */
.show-lang-menu {
    display: block !important;
}






/* ========================================================= */
/*  Footer */
/* ========================================================= */

.app-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer-sites {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
    margin-bottom: 25px;
}

.footer-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: invert(1) brightness(2) drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    display: block;
    background: transparent;
    padding: 2px;
}

.footer-logo.main-logo {
    height: 55px;
}

.footer-logo:hover {
    transform: scale(1.15) translateY(-5px);
    filter: invert(1) brightness(2) drop-shadow(0 10px 15px rgba(255,255,255,0.2));
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.footer-social a {
    color: #ffffff;
    font-size: 2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    text-align: center;
}

.footer-social a:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--neon-gold);
    text-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.footer-social a i {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* ========================================================= */
/* Footer Credits */
/* ========================================================= */
.site-footer {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 20px;
}

.footer-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 15px 30px;
    border-radius: 0 0 20px 20px;
    font-size: 1rem;
    margin: 0;
}

.credit-right {
    text-align: right;
    font-weight: normal;
}

.credit-left {
    text-align: left;
    font-weight: normal;
}

.author-link {
    color: var(--neon-gold);
    text-decoration: none;
    transition: color 0.3s;
}

.author-link:hover {
    color: var(--neon-cyan);
}

[dir="rtl"] .credit-right { text-align: right; }
[dir="rtl"] .credit-left { text-align: left; }
[dir="ltr"] .credit-right { text-align: right; }
[dir="ltr"] .credit-left { text-align: left; }

@media (max-width: 600px) {
    .footer-credits {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding: 15px;
    }
    .credit-right, .credit-left {
        text-align: center !important;
    }
}

