/* --- Global Styles --- */
* {
    font-weight: bold !important;
}
:root {
    --primary-color: #F89C2D;
    --secondary-color: #C82534;
    --dark-color: #171940;
    --light-color: #f7f8f9;
    --text-color: #777;
    --heading-color: #333;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: #FFF;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 80%);
    border: none;
    color: #FFF;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: transform 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: #FFF;
}

.section {
    padding: 80px 0;
}

/* --- Header --- */
.header-modern {
    background-color: #FFF;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-modern .navbar-brand img {
    max-height: 60px;
}

.header-modern .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    padding: 10px 15px !important;
    transition: color 0.3s ease;
}

.header-modern .nav-link.active,
.header-modern .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Language Switcher */
.language-switcher .dropdown-toggle::after {
    display: none;
}

.language-switcher .flag-icon {
    width: 24px;
    height: 18px;
    margin-right: 8px;
}

.language-switcher .dropdown-menu {
    min-width: auto;
}

.language-switcher .dropdown-item {
    display: flex;
    align-items: center;
}


/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(23, 25, 64, 0.8), rgba(23, 25, 64, 0.8)), url('https://griffin-unlocker.com/img/banner.png') no-repeat center center;
    background-size: cover;
    color: #FFF;
    padding: 120px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #FFF;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* --- Features Section --- */
.features-section {
    padding: 60px 0;
}

.feature-box {
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-box img {
    height: 70px;
    margin-bottom: 20px;
}

/* --- Pricing Section --- */
.pricing-table .card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.pricing-table .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.pricing-table .card-header {
    background-color: var(--primary-color);
    color: #FFF;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

.pricing-table .card.popular .card-header {
    background-color: var(--dark-color);
}

.pricing-table .card-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.pricing-table .list-group-item {
    border: none;
}

/* --- Reseller Page --- */
.reseller-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
    background-color: #FFF;
}

.reseller-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.reseller-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;     /* تغيرت من cover إلى contain */
    border-radius: 50%;
    background-color: #f8f9fa; /* تمت إضافتها: خلفية رمادية فاتحة للإطار */
    border: 1px solid #dee2e6;  /* تمت إضافتها: إطار خفيف للتحديد */
}

.reseller-card .social-links a {
    color: #333;
    margin: 0 5px;
    font-size: 1.2rem;
}

/* --- Download Page --- */
.download-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 30px;
}

.changelog {
    list-style: none;
    padding-left: 0;
}

.changelog li {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.changelog li:last-child {
    border-bottom: none;
}

.changelog .version {
    font-weight: 600;
    color: var(--dark-color);
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-color);
    color: #a9a9a9;
    padding-top: 60px;
}

.footer h5 {
    color: #FFF;
}

.footer a {
    color: #a9a9a9;
}

.footer a:hover {
    color: #FFF;
}

.footer .social-icons a {
    color: #FFF;
    font-size: 1.5rem;
    margin-right: 15px;
}

.footer-bottom {
    background-color: #121433;
    padding: 20px 0;
    border-top: 1px solid #2a2c57;
}

/* --- Professional Page Loading Overlay --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #171940; /* لون الخلفية الداكن لموقعك */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay:not(.active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color); /* اللون البرتقالي */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

.loader-text {
    color: #FFF;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Styling for the new Download Counter --- */
.download-counter-wrapper {
    background-color: #e9ecef; /* لون رمادي فاتح يتناسب مع الخلفية */
    border-radius: 50px;       /* حواف دائرية بالكامل */
    padding: 10px 25px;
    display: inline-flex;      /* لترتيب العناصر بجانب بعضها */
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6; /* إطار خفيف */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* ظل خفيف */
}

.download-counter-wrapper .fas {
    font-size: 1.5rem; /* حجم الأيقونة */
    color: var(--primary-color); /* استخدام اللون البرتقالي الأساسي */
    margin-right: 15px; /* مسافة بين الأيقونة والنص */
}

.download-counter-wrapper .counter-label {
    font-size: 1rem;
    color: var(--text-color); /* استخدام لون النص العام */
    font-weight: 500;
    margin-right: 8px;
}

.download-counter-wrapper .counter-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color); /* استخدام اللون الداكن للأرقام */
    background-color: #FFF;
    padding: 2px 12px;
    border-radius: 20px;
    min-width: 40px; /* لضمان حجم ثابت في البداية */
    text-align: center;
}


/* --- Dark Theme Styles (V3 - Final Polished Version) --- */
/* =================== Dark Mode (تُطبَّق عندما يحتوي <body> على .dark-theme) =================== */

/* متغيرات الألوان الخاصة بالـ Dark Mode */
body.dark-theme {
    --primary-color: #F89C2D;      /* برتقالي أساسي */
    --secondary-color: #C82534;    /* أحمر/برتقالي ثانوي */
    --bg-color: #0b0b0d;           /* خلفية عامة أسود جدًا */
    --panel-color: #111213;        /* خلفية البطاقات / الكروت */
    --muted-bg: #141416;           /* خلفيات ثانوية */
    --text-color: #FFFFFF;         /* نص أبيض ساطع كما طلبت */
    --muted-text: #c9c9c9;         /* نص ثانوي فاتح */
    --heading-color: #FFFFFF;      /* عناوين بيضاء */
    --card-border: rgba(255,255,255,0.04);
    --shadow-weak: 0 4px 15px rgba(0,0,0,0.6);
}

/* --- Global overrides --- */
body.dark-theme {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
}

/* (إذا أردت ضمان استمرار الـ bold كما في CSS الأصلي) */
body.dark-theme * {
    font-weight: bold !important;
}

/* Headings */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: var(--heading-color);
    font-weight: 600;
}

/* Links */
body.dark-theme a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}
body.dark-theme a:hover {
    color: #ffa84d; /* نسخة فاتحة للـ hover */
    text-decoration: none;
}

/* --- Buttons (gradient) - Dark Mode Elegant Version --- */
body.dark-theme .btn-gradient {
    background: transparent;                /* خلفية شفافة */
    border: 2px solid var(--primary-color); /* إطار باللون البرتقالي الأساسي */
    color: var(--primary-color);            /* لون النص برتقالي */
    padding: 10px 28px;                     /* تعديل بسيط للحفاظ على الحجم */
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;              /* انتقال ناعم لكل الخصائص */
}

body.dark-theme .btn-gradient:hover {
    background: var(--primary-color);       /* عند الـ hover، تمتلئ الخلفية باللون البرتقالي */
    color: #0b0b0d;                         /* يصبح لون النص داكنًا جدًا للتباين */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(248, 156, 45, 0.2); /* ظل برتقالي خفيف للتوهج */
}

/* Section spacing (يبقى كما هو) */
body.dark-theme .section {
    padding: 80px 0;
}

/* --- Header --- */
body.dark-theme .header-modern {
    background-color: #0f1012;
    box-shadow: 0 2px 10px rgba(255,255,255,0.02);
}
body.dark-theme .header-modern .navbar-brand img {
    max-height: 60px;
    /* لو تريد تهيئة اللوجو ليظهر بشكل أنيق على الداكن: */
    filter: none;
}
body.dark-theme .header-modern .nav-link {
    color: var(--muted-text) !important;
    font-weight: 500;
    padding: 10px 15px !important;
    transition: color 0.3s ease;
}
body.dark-theme .header-modern .nav-link.active,
body.dark-theme .header-modern .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Language Switcher */
body.dark-theme .language-switcher .dropdown-toggle::after {
    display: none;
}
body.dark-theme .language-switcher .flag-icon {
    width: 24px;
    height: 18px;
    margin-right: 8px;
    filter: none;
}
body.dark-theme .language-switcher .dropdown-menu {
    min-width: auto;
    background-color: var(--panel-color);
    border: 1px solid var(--card-border);
    color: var(--text-color);
}
body.dark-theme .language-switcher .dropdown-item {
    display: flex;
    align-items: center;
    color: var(--text-color);
}

/* --- Hero Section --- */
body.dark-theme .hero-section {
    background: linear-gradient(rgba(11,11,13,0.88), rgba(11,11,13,0.88)), url('https://griffin-unlocker.com/img/banner.png') no-repeat center center;
    background-size: cover;
    color: var(--text-color);
    padding: 120px 0;
    text-align: center;
}
body.dark-theme .hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
}
body.dark-theme .hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--muted-text);
}

/* --- Features Section --- */
body.dark-theme .features-section {
    padding: 60px 0;
}
body.dark-theme .feature-box {
    padding: 30px;
    border-radius: 8px;
    background-color: var(--panel-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-color);
    border: 1px solid var(--card-border);
}
body.dark-theme .feature-box:hover {
    background: linear-gradient(145deg, #2d2d2d, #1c1c1c);
    border: 1px solid #f8b739; /* إطار ذهبي */
    box-shadow: 0 0 15px rgba(248, 183, 57, 0.6); /* توهج ذهبي */
    transform: translateY(-5px) scale(1.02); /* حركة لطيفة */
}
body.dark-theme .feature-box img {
    height: 70px;
    margin-bottom: 20px;
    /* لا نعكس الألوان تلقائياً كي لا نكسر أيقونات ملونة */
}

/* --- Pricing Section --- */
body.dark-theme .pricing-table .card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
    background-color: var(--panel-color);
    color: var(--text-color);
    border: 1px solid var(--card-border);
}
body.dark-theme .pricing-table .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.65);
}
body.dark-theme .pricing-table .card-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #0b0b0d; /* سَوَاء على البرتقالي يظهر نص قاتم للوضوح */
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}
body.dark-theme .pricing-table .card.popular .card-header {
    background-color: #0b0b0d;
    color: #fff;
}
body.dark-theme .pricing-table .card-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}
body.dark-theme .pricing-table .list-group-item {
    border: none;
    background: transparent;
    color: var(--muted-text);
}

/* --- Reseller Page --- */
body.dark-theme .reseller-card {
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
    background-color: var(--panel-color);
    color: var(--text-color);
        transition: all 0.3s ease-in-out;
    border: 1px solid transparent;

}
body.dark-theme .reseller-card:hover {
    background: linear-gradient(145deg, 255,255,255,0.03);
    border: 1px solid #f8b739; /* إطار ذهبي */
    box-shadow: 0 0 18px rgba(248, 183, 57, 0.7); /* توهج ذهبي أقوى قليلاً */
    transform: translateY(-6px) scale(1.03); /* حركة لطيفة */
}

body.dark-theme .reseller-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;     /* تغيرت من cover إلى contain */
    border-radius: 50%;
    background-color: #2a2c33; /* تمت إضافتها: خلفية داكنة متناسقة للإطار */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-theme .reseller-card .social-links a {
    color: var(--text-color);
    margin: 0 5px;
    font-size: 1.2rem;
}


/* --- Download Page --- */
body.dark-theme .download-card {
    background-color: var(--muted-bg);
    border-radius: 10px;
    padding: 30px;
    color: var(--text-color);
    border: 1px solid var(--card-border);
}
body.dark-theme .changelog {
    list-style: none;
    padding-left: 0;
    color: var(--muted-text);
}
body.dark-theme .changelog li {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
body.dark-theme .changelog li:last-child {
    border-bottom: none;
}
body.dark-theme .changelog .version {
    font-weight: 600;
    color: var(--primary-color);
}

/* --- Footer --- */
body.dark-theme .footer {
    background-color: #070708;
    color: #9ea2a6;
    padding-top: 60px;
}
body.dark-theme .footer h5 {
    color: var(--text-color);
}
body.dark-theme .footer a {
    color: #bfbfbf;
}
body.dark-theme .footer a:hover {
    color: var(--text-color);
}
body.dark-theme .footer .social-icons a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 15px;
}
body.dark-theme .footer-bottom {
    background-color: #070708;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* --- Professional Page Loading Overlay --- */
body.dark-theme .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3,3,3,0.94); /* داكن شبه كامل */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
body.dark-theme .loading-overlay:not(.active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.dark-theme .loader-container {
    text-align: center;
}
body.dark-theme .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.06);
    border-top-color: var(--primary-color); /* البرتقالي البارز */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}
body.dark-theme .loader-text {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Styling for the Download Counter --- */
body.dark-theme .download-counter-wrapper {
    background-color: var(--panel-color);
    border-radius: 50px;
    padding: 10px 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
body.dark-theme .download-counter-wrapper .fas {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
}
body.dark-theme .download-counter-wrapper .counter-label {
    font-size: 1rem;
    color: var(--muted-text);
    font-weight: 500;
    margin-right: 8px;
}
body.dark-theme .download-counter-wrapper .counter-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    background-color: #000;
    padding: 2px 12px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
}

/* --- Small extras to keep visuals متناسقة مع الداكن --- */
/* Ensure cards, lists, and any list-group items are readable */
body.dark-theme .card,
body.dark-theme .list-group-item {
    background-color: transparent;
    color: var(--text-color);
}

/* inputs, selects (لو تستخدمها في الموقع) */
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background-color: #0d0d0f;
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.03);
    padding: 8px 10px;
    border-radius: 6px;
}

/* Tables (إن وُجدت) */
body.dark-theme table {
    color: var(--text-color);
    border-collapse: collapse;
}
body.dark-theme table th,
body.dark-theme table td {
    border: 1px solid rgba(255,255,255,0.03);
    padding: 8px 10px;
}

/* تدرج الظلال للطباعة الداكنة */
body.dark-theme .shadow-subtle {
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

/* --- Fix text-muted color in dark mode --- */
body.dark-theme .text-muted {
    color: #bbb !important; /* درجة رمادية فاتحة متناسقة مع الداكن */
}

/* --- Fix changelog background --- */
.visiting-card-container img{
    width: 100px;
    height: 100px;
    object-fit: contain;     /* تغيرت من cover إلى contain */
    border-radius: 50%;
    background-color: #2a2c33; /* تمت إضافتها: خلفية داكنة متناسقة للإطار */
    border: 1px solid rgba(255, 255, 255, 0.05);
}
/* --- Fix changelog background --- */
body.dark-theme .visiting-card-container img{
    width: 100px;
    height: 100px;
    object-fit: contain;     /* تغيرت من cover إلى contain */
    border-radius: 50%;
    background-color: #2a2c33; /* تمت إضافتها: خلفية داكنة متناسقة للإطار */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-theme .visiting-card-container{
    background-color: #212227 !important; /* غامق متناسق مع الداكن */
    color: #eee !important; /* النص يكون فاتح */
}
body.dark-theme .changelog {
    background-color: #1f2233 !important; /* غامق متناسق مع الداكن */
    color: #eee !important; /* النص يكون فاتح */
}

/* --- Fix bg-light inside dark mode (e.g. pricing-table) --- */
body.dark-theme .bg-light {
    background-color: #1f1e1e !important; /* درجة أغمق */
    color: #f1f1f1 !important;
}

/* --- Ensure headings are light in dark mode --- */
body.dark-theme h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #f5f5f5 !important;
}

/* --- Special Manager Button Style (Dark Mode) --- */

/* يستهدف الكود فقط الأزرار في قسم المدراء العلوي */
body.dark-theme .justify-content-center .reseller-card .btn-outline-dark {
    background-color: var(--primary-color);  /* لون أساسي صريح لجذب الانتباه */
    color: #171940;                         /* لون نص داكن جدًا لوضوح عالٍ */
    border: none;                           /* لا حاجة للإطار مع وجود الظل */
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;                       /* وزن خط أثقل للتأكيد */
    box-shadow: 0 5px 20px rgba(0,0,0,0.5), 0 0 12px rgba(248, 156, 45, 0.4); /* ظل أسود للعمق + توهج برتقالي */
    transition: all 0.3s ease;
}

body.dark-theme .justify-content-center .reseller-card .btn-outline-dark:hover {
    background-color: #ffac4e;              /* لون أفتح قليلاً عند الـ hover */
    transform: translateY(-4px);            /* حركة للأعلى بشكل أوضح */
    box-shadow: 0 8px 25px rgba(0,0,0,0.6), 0 0 20px rgba(248, 156, 45, 0.6); /* ظل وتوهج أقوى */
}
/* نهاية ملف Dark Mode */
