/*
================================================================================
|   ملف: style.css (النسخة النهائية المطورة - v4.4 - تصحيح وتطوير المتجر)
|   هذا الملف يجمع بين التصميم الأصلي والتحديثات التي تم تصحيحها وإضافة
|   تحسينات احترافية جديدة على قسم المتجر بالكامل.
================================================================================
*/

/* --- إعدادات أساسية ومتغيرات CSS --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');

:root {
    --primary-color: #e50914; /* أحمر ناري */
    --primary-color-dark: #b80d12;
    --secondary-color: #f1f1f1; /* رمادي فاتح */
    --accent-color: #ff9800; /* برتقالي */
    --background-dark: #111111;
    --background-surface: #1a1a1a;
    --text-light: #ffffff;
    --text-dark: #222222;
    --text-muted: #999999;
    --border-color: #333333;
    --font-primary: 'Cairo', sans-serif;

    --rarity-common-bg: #6c757d;
    --rarity-uncommon-bg: #28a745;
    --rarity-rare-bg: #007bff;
    --rarity-epic-bg: #6f42c1;
    --rarity-legendary-bg: #fd7e14;
    --rarity-mythic-bg: #e83e8c;

    /* متغيرات جديدة للتحسينات */
    --glow-color: rgba(229, 9, 20, 0.7);
    --glass-bg: rgba(26, 26, 26, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* --- تنسيقات الجسم الرئيسية --- */
html {
    height: 100%;
}
body {
    /* --- التعديل الأول: ضمان أن الجسم يملأ الشاشة عمودياً --- */
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-primary);
    color: var(--text-light);
    background-color: var(--background-dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- الأزرار --- */
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5), 0 4px 15px rgba(0,0,0,0.2);
}
.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--glow-color), 0 8px 25px rgba(0,0,0,0.4);
}
.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--secondary-color);
}
.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}
.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* --- الشريط العلوي للحالة (ثابت) --- */
.top-status-bar {
    background-color: var(--background-dark);
    color: var(--text-muted);
    padding: 10px 0;
    border-bottom: 3px solid var(--primary-color);
    font-size: 0.9rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
}
.top-status-bar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2.5rem;
}
.top-status-bar .status-item span {
    color: var(--text-light); /* تغيير لون العنوان للأبيض */
}

/* --- الهيدر (شريط التنقل العلوي - ثابت) --- */
.main-header {
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    position: fixed;
    top: 46px; /* تحت الشريط العلوي */
    left: 0;
    width: 100%;
    z-index: 1001;
    border-bottom: 1px solid var(--border-color);
}
.main-header .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* --- شريط الأخبار المتحرك (ثابت) --- */
.news-ticker {
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(5px);
    color: #fff;
    padding: 8px 0;
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 120px;
    left: 0;
    z-index: 1000;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    flex-shrink: 0;
    text-shadow: 0 0 10px var(--glow-color);
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}


.username-display {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}
.username-display:hover {
    color: var(--primary-color);
}
.language-switcher a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}
.language-switcher a:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.status-item i {
    font-size: 1.1rem;
}
.status-text.online, .server-status-count.online {
    color: #28a745;
    font-weight: bold;
}
.status-text.offline, .server-status-count.offline {
    color: #dc3545;
    font-weight: bold;
}

.ticker-content {
    display: flex;
    animation: ticker-scroll 40s linear infinite;
    white-space: nowrap;
}
.ticker-item {
    padding: 0 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ticker-item:hover {
    color: var(--primary-color);
}
@keyframes ticker-scroll {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(17, 17, 17, 0.3) 0%, rgba(17, 17, 17, 0.95) 90%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

/* إضفاء حركة دخول للعناوين والأزرار */
.hero-title, .hero-subtitle, .hero-buttons {
    animation: fade-in-up 1s ease-out forwards;
    opacity: 0;
}
.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 5px 25px rgba(0,0,0,0.7);
    color: var(--primary-color);
    animation-delay: 0.2s;
}
.hero-subtitle {
    font-size: 1.5rem;
    margin: 1rem 0 2.5rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    animation-delay: 0.5s;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation-delay: 0.8s;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- أقسام المحتوى الرئيسية --- */
.main-content {
    flex-grow: 1;
    padding: 4rem 0;
}
.main-content-page {
    padding-top: 120px;
}
.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--glow-color);
}
.sub-section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
}
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}
.social-buttons a {
    width: 60px;
    height: 60px;
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}
.social-buttons a:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 15px var(--glow-color);
}
.video-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
}
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}
.ranking-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 2rem;
    border-bottom: 5px solid var(--rarity-legendary-bg);
}
.ranking-card .section-title {
    margin-bottom: 1.5rem;
}
.ranking-list table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background-surface);
}
.ranking-list th, .ranking-list td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}
.ranking-list th {
    background-color: var(--border-color);
    color: var(--primary-color);
    text-transform: uppercase;
}

/* تحسينات القوائم والجداول */
.ranking-list tbody tr {
    transition: background-color 0.3s ease;
}
.ranking-list tbody tr:nth-child(even) {
    background-color: rgba(255,255,255,0.05);
}
.ranking-list tbody tr:hover {
    background-color: rgba(229, 9, 20, 0.1);
}
.ranking-list tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

.rank-number { font-weight: 900; color: var(--primary-color);}
.rank-1 i { color: #ffd700; }
.rank-2 i { color: #c0c0c0; }
.rank-3 i { color: #cd7f32; }
.search-container input {
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-family: var(--font-primary);
    background-color: var(--background-dark);
    color: var(--text-light);
    border-radius: 50px;
}
.search-container button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    margin-inline-start: -50px;
}

/* --- قسم الأخبار --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.news-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-bottom: 5px solid var(--accent-color);
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.news-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0.8;
    transition: opacity 0.4s ease;
}
.news-card:hover .news-image::before {
    opacity: 1;
}
.news-content {
    padding: 20px;
}
.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.news-title {
    font-size: 1.3rem;
    margin: 5px 0 10px 0;
    color: var(--primary-color);
}
.news-card p {
    color: var(--secondary-color);
}
.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}
.read-more i {
    margin-inline-start: 5px;
    transition: transform 0.3s ease;
}
.read-more:hover i {
    transform: translateX(5px);
}

/* --- الفوتر --- */
.main-footer {
    background-color: var(--background-dark);
    color: var(--text-muted);
    padding: 20px 0;
    /* --- التعديل الثالث: ضمان أن الفوتر يُدفع للأسفل تلقائياً --- */
    margin-top: auto;
    border-top: 3px solid var(--primary-color);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.social-links a {
    color: var(--text-muted);
    margin: 0 10px;
    font-size: 1.2rem;
}
.social-links a:hover {
    color: var(--primary-color);
}
.go-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: auto;
    left: 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 999;
    transition: all 0.3s ease;
}
.go-to-top-btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--glow-color);
}

/* --- تنسيقات إضافية لصفحة الملف الشخصي --- */
.profile-card, .profile-content {
    background: var(--background-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    color: var(--text-light);
}
.profile-name {
    color: var(--primary-color);
}
.profile-level {
    color: var(--text-muted);
}
.profile-guild {
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: var(--text-light);
}
.tab-link {
    color: var(--text-muted);
}
.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.stats-grid .stat-item {
    background-color: #2a2a2a;
    border: 1px solid #444;
}
.stat-item span {
    color: var(--text-muted);
}
.stat-item strong {
    color: var(--primary-color);
}
.inventory-item {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-right-width: 4px;
    border-radius: 8px;
}
.inventory-item span {
    color: var(--text-light);
}

/* --- تنسيقات صفحة التحميل --- */
.download-box {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
}
.download-icon {
    color: var(--primary-color);
}
.download-box p {
    color: var(--text-muted);
}
.req-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
}
.req-card h3 {
    color: var(--primary-color);
}
.req-card.recommended {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
}
.req-card li {
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
.req-card li i {
    color: var(--primary-color);
}

/* --- تنسيقات صفحة الخبر (view_news) --- */
.full-article-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
}
.article-meta, .article-body {
    color: var(--text-light);
}
.article-title {
    color: var(--primary-color);
}
.article-category {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

/* --- نظام الإشعارات --- */
.notification-bell {
    color: var(--text-light);
}
.notifications-dropdown {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
}
.notifications-header {
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}
.notifications-body {
    max-height: 300px;
    overflow-y: auto;
}
.notification-item {
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
.notification-item:hover {
    background-color: rgba(255,255,255,0.05);
}
.notification-item.unread {
    background-color: rgba(229, 9, 20, 0.15); /* لون مميز للإشعارات غير المقروءة */
}
.notification-item p {
    color: var(--text-light);
}
.notifications-footer a {
    color: var(--primary-color);
}

/* --- تنسيقات خاصة بتبويبات صفحة التصنيف --- */
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.ranking-tabs a {
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
    bottom: -2px;
    border-bottom: 4px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.ranking-tabs a:hover {
    color: var(--text-light);
}

.ranking-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.placeholder-section {
    text-align: center;
    padding: 5rem 1rem;
    background-color: var(--background-surface);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.placeholder-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
}

.placeholder-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
}
/* --- تنسيقات جديدة خاصة بالصفحة الرئيسية (v2.0) --- */

/* --- تنسيقات عامة للأقسام --- */
.home-section {
    padding: 3rem 0;
}

/* --- قسم معلومات السيرفر --- */
.server-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    background-color: var(--background-surface);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.info-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}
.info-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--glow-color);
}
.info-item span {
    font-size: 1rem;
    color: var(--text-muted);
}
.info-item strong {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

/* --- شبكة الأخبار والترتيب --- */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* --- قائمة الأخبار --- */
.news-list-home {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.news-card-home {
    display: flex;
    background-color: var(--background-surface);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}
.news-card-home:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: var(--primary-color);
}
.news-card-img {
    width: 150px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.news-card-content {
    padding: 1rem;
}
.news-card-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}
.news-card-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.news-card-content span {
    font-size: 0.8rem;
    color: var(--accent-color);
}

/* --- قائمة أفضل اللاعبين --- */
.ranking-preview-list table {
    width: 100%;
    border-collapse: collapse;
}
.ranking-preview-list th, .ranking-preview-list td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.ranking-preview-list th {
    color: var(--primary-color);
}
.ranking-preview-list .rank-number .fa-trophy {
    font-size: 1.1rem;
}
.ranking-preview-list .rank-1 .fa-trophy { color: #ffd700; }
.ranking-preview-list .rank-2 .fa-trophy { color: #c0c0c0; }
.ranking-preview-list .rank-3 .fa-trophy { color: #cd7f32; }
.ranking-preview-list .rank-4 .fa-trophy, .ranking-preview-list .rank-5 .fa-trophy { color: var(--text-muted); }

.view-full-ranking {
    text-align: center;
    margin-top: 1.5rem;
}

/* --- التجاوبية --- */
@media (max-width: 992px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    .home-layout {
        grid-template-columns: 1fr;
    }
}
/* --- تنسيقات جديدة للعمود الجانبي (v2.3 - تصميم مدمج) --- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .home-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.sidebar-widget {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sidebar-widget:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    background-color: var(--primary-color);
    margin: 0;
    padding: 0.8rem 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
}

.sidebar-widget .events-list,
.sidebar-widget .login-form,
.sidebar-widget .status-list,
.sidebar-widget .ranking-preview-list,
.sidebar-widget .discord-widget-container {
    padding: 1.5rem;
}


.login-form .form-group {
    margin-bottom: 1rem;
}
.login-form input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--background-dark);
    border: 1px solid #444;
    border-radius: 5px;
    color: var(--text-light);
}
.login-form button {
    width: 100%;
}


.status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.status-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}
.status-list li:last-child {
    border-bottom: none;
}
.status-list span {
    color: var(--text-muted);
}
.status-list strong {
    color: var(--text-light);
}


.ranking-preview-list table {
    width: 100%;
    border-collapse: collapse;
}
.ranking-preview-list th, .ranking-preview-list td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.ranking-preview-list th {
    color: var(--primary-color);
}
.ranking-preview-list .rank-number .fa-trophy {
    font-size: 1.1rem;
}
.ranking-preview-list .rank-1 .fa-trophy { color: #ffd700; }
.ranking-preview-list .rank-2 .fa-trophy { color: #c0c0c0; }
.ranking-preview-list .rank-3 .fa-trophy { color: #cd7f32; }
.ranking-preview-list .rank-4 .fa-trophy, .ranking-preview-list .rank-5 .fa-trophy { color: var(--text-muted); }

.view-full-ranking {
    text-align: center;
    margin-top: 1.5rem;
}

/* --- التجاوبية --- */
@media (max-width: 992px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    .home-layout {
        grid-template-columns: 1fr;
    }
}
/* --- تنسيقات جديدة للعمود الجانبي (v2.3 - تصميم مدمج) --- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .home-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.sidebar-widget {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sidebar-widget:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    background-color: var(--primary-color);
    margin: 0;
    padding: 0.8rem 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
}

.sidebar-widget .login-form,
.sidebar-widget .status-list,
.sidebar-widget .ranking-preview-list,
.sidebar-widget .discord-widget-container {
    padding: 1.5rem;
}


.login-form .form-group {
    margin-bottom: 1rem;
}
.login-form input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--background-dark);
    border: 1px solid #444;
    border-radius: 5px;
    color: var(--text-light);
}
.login-form button {
    width: 100%;
}


.status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.status-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}
.status-list li:last-child {
    border-bottom: none;
}
.status-list span {
    color: var(--text-muted);
}
.status-list strong {
    color: var(--text-light);
}


.ranking-preview-list table {
    width: 100%;
    border-collapse: collapse;
}
.ranking-preview-list th, .ranking-preview-list td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.ranking-preview-list th {
    color: var(--primary-color);
}
.ranking-preview-list .rank-number .fa-trophy {
    font-size: 1.1rem;
}
.ranking-preview-list .rank-1 .fa-trophy { color: #ffd700; }
.ranking-preview-list .rank-2 .fa-trophy { color: #c0c0c0; }
.ranking-preview-list .rank-3 .fa-trophy { color: #cd7f32; }
.ranking-preview-list .rank-4 .fa-trophy, .ranking-preview-list .rank-5 .fa-trophy { color: var(--text-muted); }

.view-full-ranking {
    text-align: center;
    margin-top: 1.5rem;
}

/* --- التجاوبية --- */
@media (max-width: 992px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    .home-layout {
        grid-template-columns: 1fr;
    }
}

/* --- تنسيق موحد لنماذج تسجيل الدخول والتسجيل --- */
.auth-form, .auth-box {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 450px;
    width: 100%;
    margin: 0 auto; /* توسيط أفقي */
    animation: fade-in-form 0.8s ease-out;
}

.auth-form h2, .auth-box h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    text-align: center;
}

.auth-form p, .auth-box p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- حقول الإدخال --- */
.auth-form .form-group, .auth-box .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form .form-group label, .auth-box .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.auth-form .form-group input, .auth-box .form-group input {
    width: 100%;
    padding: 12px 15px 12px 40px; /* مساحة للأيقونة على اليسار */
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-light);
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.auth-form .form-group input:focus, .auth-box .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--glow-color);
}

/* --- أيقونات الحقول --- */
.auth-form .form-group i, .auth-box .form-group i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(10%);
    color: var(--text-muted);
}

/* --- الأزرار --- */
.auth-form .btn-primary, .auth-box .btn-primary,
.auth-form .auth-btn, .auth-box .auth-btn {
    width: 100%;
    margin-top: 1rem;
}

/* --- الروابط السفلية --- */
.auth-form .auth-footer, .auth-box .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.auth-form .auth-footer p, .auth-box .auth-footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-form .auth-footer a, .auth-box .auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.auth-form .auth-footer a:hover, .auth-box .auth-footer a:hover {
    text-shadow: 0 0 5px var(--glow-color);
}

/* --- إخفاء الفوتر في صفحات المصادقة --- */
.auth-page .main-footer {
    display: none;
}
.ranking-content {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.ranking-list-new {
    display: flex;
    flex-direction: column;
}

.ranking-list-header, .ranking-row {
    display: grid;
    grid-template-columns: 60px 3fr 1.5fr 1fr 1fr;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

.ranking-list-header {
    background-color: rgba(0,0,0,0.3);
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom-width: 2px;
}

.ranking-row {
    transition: background-color 0.3s ease;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background-color: rgba(229, 9, 20, 0.1);
}

.ranking-row.top-1, .ranking-row.top-2, .ranking-row.top-3 {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.15) 0%, transparent 100%);
    border-right: 4px solid var(--primary-color);
    border-left: none;
}

.rank-col {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    text-align: center;
}

.ranking-row.top-1 .rank-col .fa-trophy { color: #ffd700; }
.ranking-row.top-2 .rank-col .fa-trophy { color: #c0c0c0; }
.ranking-row.top-3 .rank-col .fa-trophy { color: #cd7f32; }

.player-col {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.class-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-light);
}

.class-col, .level-col, .power-col {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.class-col {
    color: var(--text-muted);
}

/* *** نظام صفحات احترافي مع أسهم *** */
.pagination-new {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    background-color: rgba(0,0,0,0.2);
}
.pagination-new ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center; /* لمحاذاة الأسهم والنقاط */
    gap: 0.4rem;
}
.pagination-new a, .pagination-new span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--background-surface);
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}
.pagination-new a:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}
.pagination-new a.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    cursor: default;
}

/* تنسيق أزرار السابق والتالي */
.pagination-new a.prev-next {
    font-size: 1rem; /* حجم الأيقونة */
}

/* تنسيق النقاط (...) */
.pagination-new span.ellipsis {
    background-color: transparent;
    border: none;
    width: auto;
    padding: 0 0.5rem;
}
.ranking-content {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.ranking-list-new {
    display: flex;
    flex-direction: column;
}

.ranking-list-header, .ranking-row {
    display: grid;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

/* تخطيط أعمدة اللاعبين */
.ranking-list-header:not(.eudemon-header), .ranking-row:not(.eudemon-row) {
    grid-template-columns: 60px 3fr 1.5fr 1fr 1fr;
}

/* تخطيط أعمدة الوحوش */
.ranking-list-header.eudemon-header, .ranking-row.eudemon-row {
    grid-template-columns: 60px 2fr 2fr 1.5fr 1fr;
}


.ranking-list-header {
    background-color: rgba(0,0,0,0.3);
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom-width: 2px;
}

.ranking-row {
    transition: background-color 0.3s ease;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background-color: rgba(229, 9, 20, 0.1);
}

.ranking-row.top-1, .ranking-row.top-2, .ranking-row.top-3 {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.15) 0%, transparent 100%);
    border-right: 4px solid var(--primary-color);
    border-left: none;
}

.rank-col {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    text-align: center;
}

.ranking-row.top-1 .rank-col .fa-trophy { color: #ffd700; }
.ranking-row.top-2 .rank-col .fa-trophy { color: #c0c0c0; }
.ranking-row.top-3 .rank-col .fa-trophy { color: #cd7f32; }

.player-col {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.class-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-light);
}

.class-col, .level-col, .power-col, .owner-col, .star-col, .reborn-col {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.class-col, .owner-col {
    color: var(--text-muted);
}

.star-col .fa-star {
    color: #ffd700;
    font-size: 0.9em;
}

/* نظام صفحات احترافي مع أسهم */
.pagination-new {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    background-color: rgba(0,0,0,0.2);
}
.pagination-new ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pagination-new a, .pagination-new span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--background-surface);
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}
.pagination-new a:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}
.pagination-new a.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    cursor: default;
}

.pagination-new a.prev-next {
    font-size: 1rem;
}

.pagination-new span.ellipsis {
    background-color: transparent;
    border: none;
    width: auto;
    padding: 0 0.5rem;
}

/* Placeholder for under-development sections */
.placeholder-section {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}
.placeholder-section h2 {
    color: var(--text-light);
    font-family: var(--font-primary);
}
.ranking-content {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.ranking-list-new {
    display: flex;
    flex-direction: column;
}

.ranking-list-header, .ranking-row {
    display: grid;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

/* تخطيط أعمدة اللاعبين */
.ranking-list-header:not(.eudemon-header):not(.legion-header):not(.family-header),
.ranking-row:not(.eudemon-row):not(.legion-row):not(.family-row) {
    grid-template-columns: 60px 3fr 1.5fr 1fr 1fr;
}

/* تخطيط أعمدة الوحوش */
.ranking-list-header.eudemon-header, .ranking-row.eudemon-row {
    grid-template-columns: 60px 2fr 2fr 1.5fr 1fr;
}

/* تخطيط أعمدة التحالفات والعائلات */
.ranking-list-header.legion-header, .ranking-row.legion-row,
.ranking-list-header.family-header, .ranking-row.family-row {
    grid-template-columns: 60px 3fr 2fr 1fr 1.5fr;
}

.ranking-list-header {
    background-color: rgba(0,0,0,0.3);
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom-width: 2px;
}

.ranking-row {
    transition: background-color 0.3s ease;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background-color: rgba(229, 9, 20, 0.1);
}

.ranking-row.top-1, .ranking-row.top-2, .ranking-row.top-3 {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.15) 0%, transparent 100%);
    border-right: 4px solid var(--primary-color);
    border-left: none;
}

.rank-col {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    text-align: center;
}

.ranking-row.top-1 .rank-col .fa-trophy { color: #ffd700; }
.ranking-row.top-2 .rank-col .fa-troquo { color: #c0c0c0; }
.ranking-row.top-3 .rank-col .fa-trophy { color: #cd7f32; }

.player-col {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.class-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-light);
}

.class-col, .level-col, .power-col, .owner-col, .star-col, .reborn-col, .leader-col, .members-col, .repute-col {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.class-col, .owner-col, .leader-col {
    color: var(--text-muted);
}

.star-col .fa-star {
    color: #ffd700;
    font-size: 0.9em;
}

/* نظام صفحات احترافي مع أسهم */
.pagination-new {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    background-color: rgba(0,0,0,0.2);
}
.pagination-new ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pagination-new a, .pagination-new span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--background-surface);
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}
.pagination-new a:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}
.pagination-new a.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    cursor: default;
}

.pagination-new a.prev-next {
    font-size: 1rem;
}

.pagination-new span.ellipsis {
    background-color: transparent;
    border: none;
    width: auto;
    padding: 0 0.5rem;
}
.download-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .download-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.download-card, .patches-card, .req-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.download-card .card-header, .patches-card .card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-light);
}

.download-card .card-body, .patches-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.download-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.download-main-btn {
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
}

.download-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.patches-card {
    margin-top: 2.5rem;
}

.patches-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.patch-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.patch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.patch-item:last-child {
    border-bottom: none;
}

.patch-version {
    font-weight: 700;
    color: var(--text-light);
    display: block;
}

.patch-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.download-patch-btn {
    padding: 8px 15px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.req-card {
    padding: 1.5rem;
}

.req-card h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.req-section {
    margin-bottom: 2rem;
}
.req-section:last-child {
    margin-bottom: 0;
}

.req-section h4 {
    font-size: 1.2rem;
    color: var(--text-light);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.req-section.recommended h4 {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.req-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.req-section li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.req-section li i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}
.auth-page .main-content-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px); /* 180px is header height */
}

.auth-form.glass-effect {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 450px;
    width: 100%;
}

.auth-form h2 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.auth-form p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form .form-group label {
    display: none; /* Hide labels as placeholders are enough */
}

.auth-form .form-group input {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Space for icon on the left */
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-light);
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--glow-color);
}

.auth-form .form-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.auth-form .form-group input:focus + i {
    color: var(--primary-color);
}

.auth-btn {
    width: 100%;
    margin-top: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-message.success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid #28a745;
}
.auth-message.error {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* Animation */
@keyframes animate-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: animate-fade-in 0.5s ease-out forwards;
}
.auth-form .form-group input:placeholder-shown + i {
    color: var(--text-muted);
}

/* تنسيق مؤشر قوة كلمة المرور */
.password-strength-indicator {
    height: 18px;
    background-color: var(--background-dark);
    border-radius: 5px;
    overflow: hidden;
    margin-top: -1rem; /* لتقريبها من حقل كلمة المرور */
    margin-bottom: 1.5rem;
    position: relative;
    border: 1px solid var(--border-color);
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    white-space: nowrap;
}
.notification-bell {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.2rem;
}

.notification-dot {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--background-surface);
    box-shadow: 0 0 10px var(--glow-color);
}

.notifications-dropdown {
    position: absolute;
    top: 150%; /* Position it below the bell */
    right: -15px;
    width: 350px;
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1010;
    overflow: hidden;
    display: none; /* Hidden by default */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notifications-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-color);
}

.notifications-header span {
    font-weight: 700;
    color: var(--text-light);
}

#mark-all-read-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

#mark-all-read-btn:hover {
    text-decoration: underline;
}

.notifications-body {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: rgba(229, 9, 20, 0.1);
}

.notification-item.unread {
    background-color: rgba(229, 9, 20, 0.05);
}

.notification-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 4px;
}

.notification-text p {
    margin: 0 0 0.25rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.notification-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notifications-footer {
    padding: 0.75rem;
    text-align: center;
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-color);
}

.notifications-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.no-character-prompt {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4rem 2rem;
    text-align: center;
    margin: 4rem auto;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.no-character-prompt .fa-gamepad {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.no-character-prompt h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-character-prompt p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.profile-grid-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .profile-grid-new {
        grid-template-columns: 350px 1fr;
    }
}

.profile-main-card, .profile-tabs-area {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
}

.profile-header-new {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar-new {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    margin-bottom: 1rem;
}

.character-name {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--text-light);
    margin: 0;
}

.account-name {
    font-size: 1rem;
    color: var(--text-muted);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.info-box {
    background-color: var(--background-dark);
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

/* Tabs Styling */
.tabs-container {
    width: 100%;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-link {
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    transition: color 0.3s ease;
}

.tab-link:hover {
    color: var(--text-light);
}

.tab-link.active {
    color: var(--primary-color);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--glow-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.stats-container-new .stat-bar {
    margin-bottom: 1rem;
}

.stat-bar-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.progress-bar-container {
    width: 100%;
    background-color: var(--background-dark);
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 5px;
}

.settings-form h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.settings-form .form-group {
    margin-bottom: 1rem;
}
.settings-form input {
    width: 100%;
    padding: 10px;
}
.avatar-upload-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--background-dark);
    border-radius: 5px;
}

#avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

#avatar-input {
    display: none; /* Hide the default file input */
}

.avatar-upload-group .btn {
    margin: 0;
}
.profile-grid-new {
    display: grid;
    grid-template-columns: 1fr; /* عرض عمود واحد افتراضياً */
    gap: 30px;
    padding: 30px 0;
}

@media (min-width: 992px) {
    .profile-grid-new {
        grid-template-columns: 350px 1fr; /* عمودان على شاشات الكمبيوتر */
    }
}

/* ---------------------------------
|   أنماط البطاقة الرئيسية (الاسم، الصورة)
|   --------------------------------- */
.profile-main-card {
    background-color: rgba(26, 26, 26, 0.7);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    text-align: center;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-header-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.profile-avatar-new {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #e50914;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

.profile-titles .character-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    color: #e50914;
}

.profile-titles .account-name {
    font-size: 1.1rem;
    color: #ccc;
    font-style: italic;
}

/* ---------------------------------
|   أنماط معلومات اللاعب (المستوى، الفئة)
|   --------------------------------- */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.profile-info-grid .info-box {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-box .info-label {
    font-size: 0.9rem;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.info-box .info-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

/* ---------------------------------
|   أنماط القوائم (Stats, Tickets, Settings)
|   --------------------------------- */
.profile-tabs-area {
    background-color: rgba(26, 26, 26, 0.7);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.tabs-nav {
    display: flex;
    justify-content: flex-start;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.tab-link {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    font-weight: bold;
}

.tab-link.active {
    color: #e50914;
    border-bottom: 2px solid #e50914;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.stats-container-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stats-container-new .stat-box {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stats-container-new .stat-bar-label {
    font-size: 1rem;
    color: #888;
    display: block;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.stats-container-new .stat-bar-label i {
    color: #e50914;
}

.stats-container-new .info-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.no-character-prompt {
    text-align: center;
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    background-color: rgba(26, 26, 26, 0.7);
    color: #fff;
}

.no-character-prompt i {
    font-size: 4rem;
    color: #e50914;
    margin-bottom: 20px;
}

.no-character-prompt h2 {
    font-size: 2rem;
    color: #e50914;
}

.settings-form .form-group {
    margin-bottom: 15px;
}

.settings-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
}

.settings-form .btn-primary {
    background-color: #e50914;
    border: none;
}

/* ---------------------------------
|   أنماط الأزرار (Buttons)
|   --------------------------------- */
.btn-primary {
    background: linear-gradient(45deg, #e50914, #ff4d4d);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.mt-3 {
    margin-top: 15px;
}
body {
    font-family: 'Cairo', sans-serif;
    color: #eee;
    background-color: #111;
    line-height: 1.6;
}

/* ---------------------------------
|   أنماط قسم البطل (Hero Section)
|   --------------------------------- */
.hero-section {
    position: relative;
    height: 100vh; /* تم تعديل هذه القيمة لتغطية الشاشة بالكامل */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* هذا الكود تم تعديله ليزيل التأثيرات غير المرغوبة */
    filter: brightness(1) blur(0px);
    z-index: 1;
    /* الكود الجديد: التأكد من أن الصورة تملأ المساحة بالكامل */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    animation: fadeIn 1s ease-in-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ff4d4d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-buttons .btn {
    margin: 5px;

}

.home-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .home-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ---------------------------------
|   أنماط أدوات الصفحة (Widgets)
|   --------------------------------- */
.main-widget.card,
.sidebar-widget.card {
    background-color: rgba(26, 26, 26, 0.7);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    animation: fadeIn 1s ease-in-out;
}

.widget-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff; /* تم إصلاح لون العنوان */
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center; /* توسيط العنوان */
    gap: 10px;
}

.widget-title i {
    color: #ff4d4d;
}

/* ---------------------------------
|   أنماط قسم الأخبار
|   --------------------------------- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.news-meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
}

.news-meta i {
    color: #e50914;
}

.news-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.news-summary {
    color: #ccc;
    line-height: 1.6;
}

.read-more-btn {
    display: inline-block;
    color: #e50914;
    font-weight: bold;
    margin-top: 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more-btn:hover {
    color: #ff4d4d;
}

/* ---------------------------------
|   أنماط قسم معلومات السيرفر
|   --------------------------------- */
.server-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item i {
    font-size: 1.5rem;
    color: #e50914;
    margin-bottom: 10px;
}

.info-item span {
    display: block;
    font-size: 0.9rem;
    color: #aaa;
}

.info-item strong {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.status-text.online {
    color: #2ecc71; /* لون أخضر للحالة "Online" */
}

.status-text.offline {
    color: #e74c3c; /* لون أحمر للحالة "Offline" */
}

/* ---------------------------------
|   أنماط قسم الفيديو
|   --------------------------------- */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* نسبة العرض إلى الارتفاع 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ---------------------------------
|   أنماط العمود الجانبي
|   --------------------------------- */
.sidebar-widget.card {
    padding: 20px;
}

.login-form input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    margin-bottom: 10px;
}

.login-form .btn-primary {
    width: 100%;
    background: linear-gradient(45deg, #e50914, #ff4d4d);
    border: none;
}

/* ---------------------------------
|   أنماط قائمة أفضل اللاعبين
|   --------------------------------- */
.ranking-preview-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.ranking-preview-list td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-preview-list tr:last-child td {
    border-bottom: none;
}

.ranking-preview-list .rank-number {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.ranking-preview-list .rank-1 i { color: gold; }
.ranking-preview-list .rank-2 i { color: silver; }
.ranking-preview-list .rank-3 i { color: #cd7f32; }

.ranking-preview-list small {
    display: block;
    color: #aaa;
    font-size: 0.8rem;
}

.view-full-ranking {
    text-align: center;
    margin-top: 20px;
}

/* ---------------------------------
|   أنماط عامة
|   --------------------------------- */
.btn-primary {
    background: linear-gradient(45deg, #e50914, #ff4d4d);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.btn-secondary {
    background: #444;
    color: #eee;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #555;
}

.text-center {
    text-align: center;

}
/*
================================================================================
|   تنسيقات المتجر (Store) - تم تطويرها بالكامل
|   هذه التنسيقات تم تطويرها بالكامل مع الحفاظ على الأنماط الموجودة.
================================================================================
*/
.shop-page .main-content-page {
    padding-top: 180px; /* Adjust padding for fixed header */
    padding-bottom: 4rem;
}

/* --- شريط الأدوات الرئيسي (فلتر، بحث) --- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--glass-bg); /* Use glass effect */
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    margin-bottom: 2.5rem;
}

.categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.category-link {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.category-link:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    transform: translateY(-3px) scale(1.05);
}

.category-link.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-2px);
}

.shop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-inline-start: auto;
}

.sort-bar select {
    background-color: var(--background-dark);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-family: var(--font-primary);
    cursor: pointer;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 0.8rem 1.2rem;
    padding-left: 3rem; /* مسافة للأيقونة */
    background-color: var(--background-dark);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--glow-color);
}

.search-bar i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* --- تنسيقات حاوية المنتجات --- */
.shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* --- تنسيقات بطاقة العنصر --- */
.item-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.item-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

/* --- تنسيقات ندرة العنصر --- */
.item-header {
    border-radius: 10px;
    padding: 1rem 0;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.item-icon {
    font-size: 3.5rem;
    color: var(--text-light);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.rarity-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.rarity-common .item-icon { color: var(--rarity-common-bg); }
.rarity-uncommon .item-icon { color: var(--rarity-uncommon-bg); }
.rarity-rare .item-icon { color: var(--rarity-rare-bg); }
.rarity-epic .item-icon { color: var(--rarity-epic-bg); }
.rarity-legendary .item-icon { color: var(--rarity-legendary-bg); }
.rarity-mythic .item-icon { color: var(--rarity-mythic-bg); }

/* --- تنسيقات المحتوى --- */
.item-card h2 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: var(--text-light);
    font-weight: 700;
}

.item-card .description {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 40px;
}

.price-box {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
}

.old-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.new-price, .price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-color);
}

.price i, .new-price i {
    color: gold;
    font-size: 1.2rem;
}

.level-req {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.item-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.action-button {
    flex-grow: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.buy-button {
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}
.buy-button:hover:not([disabled]) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.6);
}

.buy-button[disabled] {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
}
.details-button {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
}
.details-button:hover:not([disabled]) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.6);
}


/* --- تنسيقات الـ Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--glass-bg);
    border-radius: 15px;
    padding: 2.5rem;
    width: 90%;
    max-width: 550px;
    position: relative;
    animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7), inset 0 0 20px rgba(255,255,255,0.05);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--primary-color);
}

#modalBody {
    text-align: center;
}

#modalBody h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#modalBody p {
    color: var(--text-light);
}

.rarity-label-modal {
    position: static;
    display: inline-block;
    margin-left: 10px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Loader style */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- التجاوبية (Mobile responsiveness) --- */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    .categories-nav {
        justify-content: center;
        gap: 0.5rem;
    }
    .shop-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .sort-bar select, .search-bar input {
        width: 100%;
    }
    .shop-container {
        grid-template-columns: 1fr;
    }
    .item-card {
        padding: 1rem;
    }
    .item-card h2 {
        font-size: 1.3rem;
    }
}
/* --- تنسيقات الحاوية الرئيسية للمقال --- */
.main-content-article {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* --- تنسيقات بطاقة المقال الكاملة --- */
.full-article-card {
    background-color: var(--background-surface);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

/* --- تنسيقات الصورة العلوية للخبر --- */
.article-image-header {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 4px solid var(--primary-color);
}
.article-image-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, transparent 100%);
}

/* --- تنسيقات المحتوى الداخلي للمقال --- */
.article-content {
    padding: 30px;
}

/* --- تنسيقات بيانات المقال (التصنيف والتاريخ) --- */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-muted);
}
.article-category {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
}
.article-date {
    font-size: 0.9rem;
}

/* --- تنسيقات عنوان المقال --- */
.article-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-light);
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- تنسيقات جسم المقال --- */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
}
.article-body p {
    margin-bottom: 1.5rem;
}

/* --- التجاوبية (Mobile responsiveness) --- */
@media (max-width: 768px) {
    .article-image-header {
        height: 250px;
    }
    .article-title {
        font-size: 1.8rem;
    }
    .article-body {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.sidebar-widget .events-list {
    padding: 1.5rem;
}

/* This styles the container for all event items */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    list-style-type: none;
    margin: 0;
}

/* This styles each individual event item */
.event-item {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #e50914;
    transition: all 0.3s ease;
    border-bottom: none; /* Override any conflicting styles */
}

.event-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background-color: rgba(229, 9, 20, 0.1);
}

.event-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #ffffff;
    display: block;
    margin-bottom: 5px;
}

.event-time {
    font-size: 0.9em;
    color: #bbbbbb;
    display: block;
    margin-bottom: 12px;
}

/* This styles the countdown timer itself */
.event-countdown {
    text-align: center;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    background: linear-gradient(45deg, #e50914, #b40710);
    padding: 8px;
    border-radius: 6px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.event-countdown span {
    margin: 0 5px;
}

/* Styles for the countdown status */
.event-countdown .status-live {
    color: #2ecc71;
    animation: pulse 1.5s infinite;
}

.event-countdown .status-finished {
    color: #95a5a6;
}

/* Animation for the "Live" status */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); 
}
}
.loading-image {
    width: 400px;  /* مثال: عدّل العرض حسب رغبتك */
    height: auto; /* عشان الطول يتปรับ تلقائيًا مع العرض */
    margin-top: 20px; /* عشان تدي مسافة بينها وبين الـ spinner */
}
/* ======================================================= */
/* الكود الكامل والنهائي لتنسيق الهيدر بالكامل             */
/* ======================================================= */

/* 1. تخطيط الهيدر الرئيسي */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 2. توسيط حاوية القائمة */
.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

/* 3. (الكود المفقود) تنسيق القائمة نفسها */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex; /* !! هذا السطر يضع العناصر أفقيًا !! */
    align-items: center;
    gap: 45px; /* يمكنك تعديل هذه المسافة */
}

/* 4. (الكود المفقود) تنسيق روابط القائمة */
.main-nav a {
    color: #FFFFFF; /* لون الخط أبيض */
    text-decoration: none;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px; /* مسافة للخط السفلي */
    font-size: 1.1rem; 
}

/* 5. (الكود المفقود) تنسيق الخط السفلي عند المرور والفعلية */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

/* 6. تنسيق الرابط النشط */
.main-nav a.active {
   color: var(--primary-color);
}
/* الكود الخاص بصورة اللوجو في الهيدر */
header a[href*="index.php"] img {
    position: absolute;
    top: 60%;
    left: 0;
    transform: translateY(-50%);
    height: 180px; /* <--- 📏 هذا هو السطر المسؤول عن الحجم */
    width: auto;
}

/* 1. التنسيق الافتراضي لكل الصفحات */
.page-content-wrapper {
    padding-top: 180px; /* <-- المسافة العلوية الصحيحة */
    padding-bottom: 2rem; /* مسافة سفلية بسيطة */
    flex-grow: 1; /* يضمن دفع الفوتر للأسفل */
}

/* 2. تنسيق خاص بصفحات تسجيل الدخول والتسجيل فقط */
.auth-page .page-content-wrapper {
    padding-top: 180px !important; /* مسافة أقل لصفحات الدخول */
}

.home-page .page-content-wrapper {
    /* يمكنك إضافة أي تنسيقات خاصة بالصفحة الرئيسية هنا إذا احتجت */
}
/* ======================================================= */
/*                   ITEM SHOP STYLES                    */
/* ======================================================= */

.shop-page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Toolbar (Filters & Search) --- */
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(26, 26, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    margin-bottom: 2.5rem;
}

.categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.category-link {
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    color: #aaa;
    background-color: #111;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.category-link:hover, .category-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--glow-color);
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 0.8rem 1.2rem 0.8rem 3rem;
    background-color: #111;
    color: #fff;
    border: 1px solid #333;
    border-radius: 50px;
    min-width: 250px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--glow-color);
}

.search-bar i {
    position: absolute;
    top: 50%;
    left: 1.2rem;
    transform: translateY(-50%);
    color: #555;
}

/* --- Item Grid --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* --- Item Card --- */
.item-card {
    background-color: var(--background-surface);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

.item-header {
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.item-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.rarity-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    background-color: #555;
}

/* Rarity Colors */
.rarity-common { background: linear-gradient(145deg, #4e545a, #2a2e32); }
.rarity-uncommon { background: linear-gradient(145deg, #2a7d3e, #164a23); }
.rarity-rare { background: linear-gradient(145deg, #2a6cbe, #133b69); }
.rarity-epic { background: linear-gradient(145deg, #693fa3, #3c2061); }
.rarity-legendary { background: linear-gradient(145deg, #d16a0d, #803e04); }

.rarity-common .rarity-label { background-color: #6c757d; }
.rarity-uncommon .rarity-label { background-color: #28a745; }
.rarity-rare .rarity-label { background-color: #007bff; }
.rarity-epic .rarity-label { background-color: #6f42c1; }
.rarity-legendary .rarity-label { background-color: #fd7e14; }

.item-content {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
}

.item-content h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.item-content .description {
    font-size: 0.9rem;
    color: #aaa;
    min-height: 40px;
    line-height: 1.5;
}

.price {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffc107;
    margin-top: 1rem;
}

.price i {
    margin-right: 0.5rem;
}

.item-footer {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* إصلاح أيقونة السلة - ثابتة يمين */
.cart-icon-container {
    position: fixed;
    bottom: 30px;
    right: 30px; /* مثبتة يمين */
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, var(--primary-color), #b40710);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}

/* للغة العربية - إبقاء الأيقونة يمين */
html[dir="rtl"] .cart-icon-container {
    right: 30px;
    left: auto;
}

.cart-icon-container:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(229, 9, 20, 0.6);
}

.cart-item-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(145deg, #ffc107, #e0a800);
    color: #000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    animation: cartPulse 2s infinite;
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* تحسين كروت المنتجات */
.item-card {
    background: linear-gradient(145deg, #1e1e1e 0%, #2a2a2a 100%);
    border: 2px solid #333;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ffc107, var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover::before {
    opacity: 1;
}

.item-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(229, 9, 20, 0.2);
    border-color: var(--primary-color);
}

.item-header {
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.1), rgba(229, 9, 20, 0.05));
}

.item-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
    transition: all 0.3s ease;
}

.item-card:hover .item-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 30px var(--glow-color));
}

.rarity-label {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.item-content h2 {
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
    color: #fff;
    font-weight: 800;
}

.item-content .description {
    font-size: 1rem;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    height: 3rem;
    overflow: hidden;
}

.price {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffc107;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.6);
    margin: 1rem 0;
}

/* أزرار محسّنة */
.item-footer {
    padding: 0 1.5rem 2rem 1.5rem;
    display: flex;
    gap: 15px;
}

.btn-add-to-cart, .btn-details {
    flex: 1;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart::before,
.btn-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-add-to-cart:hover::before,
.btn-details:hover::before {
    left: 100%;
}

.btn-add-to-cart {
    background: linear-gradient(145deg, var(--primary-color), #b40710);
    color: white;
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.btn-add-to-cart:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.6);
}

.btn-details {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.6);
}

/* مودال السلة احترافي */
.horizontal-modal {
    width: 95%;
    max-width: 1200px;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px solid #444;
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #b40710);
    color: white;
    padding: 2rem;
    border-radius: 23px 23px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.close-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.modal-body-horizontal {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: 400px;
}

/* قائمة العناصر في السلة */
.cart-items-list-container {
    border-right: 2px solid #444;
    padding-right: 2rem;
}

.cart-items-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
}

.cart-items-list::-webkit-scrollbar {
    width: 8px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(145deg, #222, #2d2d2d);
    border: 1px solid #444;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.2);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-icon {
    font-size: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.cart-item-info span {
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-item-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffc107;
}

.btn-remove-from-cart {
    background: linear-gradient(145deg, #dc3545, #c82333);
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-from-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.5);
}

.cart-empty-msg {
    text-align: center;
    color: #666;
    font-size: 1.5rem;
    padding: 4rem;
    background: rgba(255,255,255,0.02);
    border-radius: 15px;
    border: 2px dashed #444;
}

/* منطقة الملخص والدفع */
.cart-summary-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cart-summary {
    background: linear-gradient(145deg, #222, #2d2d2d);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #444;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

/* طرق الدفع المحدثة */
.payment-methods {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #444;
}

.payment-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: white;
    text-align: center;
}

.payment-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 2rem;
}

.payment-tab {
    padding: 1rem;
    background: linear-gradient(145deg, #333, #444);
    border: 1px solid #555;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #bbb;
}

.payment-tab.active {
    background: linear-gradient(145deg, var(--primary-color), #b40710);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--glow-color);
}

.payment-tab:hover:not(.active) {
    background: linear-gradient(145deg, #444, #555);
    transform: translateY(-2px);
}

/* أزرار طرق الدفع الجديدة */
.payment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 2rem 0;
}

.payment-btn {
    padding: 1.5rem;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.payment-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.payment-btn:hover::before {
    left: 100%;
}

.paypal-btn {
    background: linear-gradient(145deg, #0070ba, #003087);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.4);
}

.paypal-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 112, 186, 0.6);
}

.instapay-btn {
    background: linear-gradient(145deg, #ff6b35, #e55a2b);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.instapay-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.6);
}

.vodafone-btn {
    background: linear-gradient(145deg, #e60000, #b30000);
    color: white;
    box-shadow: 0 6px 20px rgba(230, 0, 0, 0.4);
}

.vodafone-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(230, 0, 0, 0.6);
}

.etisalat-btn {
    background: linear-gradient(145deg, #009639, #007530);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 150, 57, 0.4);
}

.etisalat-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 150, 57, 0.6);
}

.confirm-purchase {
    width: 100%;
    padding: 1.8rem;
    font-size: 1.4rem;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.confirm-purchase::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.confirm-purchase:hover::before {
    left: 100%;
}

.confirm-purchase:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.5);
}

/* مودال التفاصيل احترافي */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border: 2px solid #444;
    border-radius: 25px;
    padding: 3rem;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(-50px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 30px;
    background: none;
    border: none;
    color: #999;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.item-image-container img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.item-details-content h2 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.item-details-content p {
    font-size: 1.3rem;
    color: #bbb;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.details-section {
    margin-bottom: 2rem;
}

.details-section h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px var(--glow-color);
}

.details-section ul {
    list-style: none;
    padding: 0;
}

.details-section li {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    padding: 1rem 1.5rem;
    margin-bottom: 0.8rem;
    border-radius: 10px;
    border-right: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.details-section li:hover {
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    transform: translateX(-5px);
}

.details-price {
    font-size: 3rem;
    font-weight: 900;
    color: #ffc107;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.7);
}

/* رسائل التنبيه */
.toast-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-weight: bold;
    transform: translateX(400px);
    transition: all 0.4s ease;
    z-index: 11000;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.toast-notification.show {
    transform: translateX(0);
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .cart-icon-container {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .modal-body-horizontal {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-items-list-container {
        border-right: none;
        border-bottom: 2px solid #444;
        padding-right: 0;
        padding-bottom: 2rem;
    }
    
    .payment-tabs {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .item-details-content h2 {
        font-size: 2.2rem;
    }
    
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}
/*
================================================================================
| أكواد وضع الهاتف (Mobile Responsive Code)
| الوصف: أضف هذا الكود في نهاية ملف style.css الرئيسي لديك.
================================================================================
*/

/* --- زر القائمة للجوال (Hamburger Menu) --- */
.mobile-menu-button {
    display: none; /* مخفي افتراضياً على الشاشات الكبيرة */
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1002;
    margin-left: 1rem; /* لإعطاء مسافة من العناصر المجاورة */
}


/* ==========================================================================
   الاستجابة للشاشات (Responsive Media Queries)
   ========================================================================== */

@media (max-width: 992px) {
    /* أنماط خاصة بالأجهزة اللوحية (Tablets) */
    .main-nav ul {
        gap: 25px; /* تقليل المسافة بين عناصر القائمة */
    }
    .main-nav a {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* --- تعديلات عامة للجوال --- */
    .container {
        width: 90%; /* تقليل هوامش الصفحة */
    }
    .section-title {
        font-size: 2rem; /* تصغير حجم العناوين الرئيسية */
    }

    /* --- تعديلات الهيدر والقائمة للجوال --- */
    .header-container {
        flex-wrap: nowrap; /* منع التفاف العناصر في الهيدر */
    }
    .main-header {
        padding: 10px 0;
    }
    .logo-container img {
        height: 50px; /* تصغير اللوجو */
    }
    .main-nav {
        /* يتم التحكم به عبر جافاسكريبت، وهذا الكود يجهزه لذلك */
        display: none;
        position: absolute;
        top: 70px; /* تحت الهيدر مباشرة */
        left: 0;
        width: 100%;
        background-color: var(--background-surface);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 2px solid var(--primary-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    }
    .main-nav.active {
        display: flex; /* إظهار القائمة عند تفعيلها */
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .main-nav a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    .main-nav li:last-child a {
        border-bottom: none;
    }
    .main-nav a::after {
        display: none; /* إخفاء الخط السفلي للروابط في الجوال */
    }
    .mobile-menu-button {
        display: block; /* إظهار زر القائمة في الجوال */
    }
    /* إخفاء أزرار الدخول/التسجيل من الهيدر (يمكن إضافتها داخل القائمة المنسدلة) */
    .auth-buttons {
        display: none;
    }


    /* --- تعديلات الشريط العلوي للجوال --- */
    .top-status-bar .container {
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    .with-top-bar .main-header {
        top: 58px; /* تعديل المسافة لتناسب التفاف الشريط العلوي */
    }
    .with-top-bar .page-content-wrapper {
        padding-top: 128px;
    }


    /* --- تعديلات أخرى للصفحات --- */
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .cart-icon-container {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }

    /* --- (جديد) تعديلات الهيرو والفوتر للجوال --- */
    .hero-section {
        height: 60vh; /* تقليل ارتفاع الهيرو ليناسب الشاشة */
        min-height: 400px;
    }
    .hero-title {
        font-size: 2.2rem; /* تصغير حجم الخط الرئيسي */
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 1rem; /* تصغير حجم الخط الفرعي */
        padding: 0 10px; /* إضافة هوامش جانبية لمنع الالتصاق بالحواف */
    }
    .footer-content {
        flex-direction: column; /* ترتيب عناصر الفوتر بشكل عمودي */
        gap: 1rem;
        text-align: center;
    }
}

/* ==========================================================================
   (جديد) الاستجابة للشاشات الضيقة جدًا (Extra Small Screens)
   ========================================================================== */
@media (max-width: 480px) {
    /* --- تعديل الشريط العلوي ليتناسب مع الشاشات الضيقة --- */
    .top-status-bar .container {
        flex-direction: column; /* ترتيب العناصر بشكل عمودي */
        gap: 0.5rem; /* تقليل المسافة بين العناصر */
        align-items: center; /* توسيط العناصر */
    }

    /* --- تعديل الهيدر ليتناسب مع التغيير في الشريط العلوي --- */
    .with-top-bar .main-header {
        top: 105px; /* زيادة المسافة العلوية للهيدر */
    }
    .with-top-bar .page-content-wrapper {
        padding-top: 175px; /* زيادة المسافة العلوية للمحتوى */
    }

    /* --- تعديل شريط الأخبار --- */
    .ticker-item {
        font-size: 0.9rem; /* تصغير خط شريط الأخبار */
        padding: 0 1rem;
    }

    /* --- (جديد) تحسينات إضافية للهيرو على الشاشات الضيقة جدا --- */
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
}

