/* ========================================
   ملف التنسيقات الرئيسي لموقع WAL3A RUST
   ======================================== */

:root {
    --primary: #FF4D00;
    --secondary: #FF9500;
    --dark-bg: #050505;
    --card-bg: rgba(25, 25, 25, 0.7);
    --fire-glow: 0 0 40px rgba(255, 77, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    outline: none;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--dark-bg);
    color: white;
    overflow-x: hidden;
    background: radial-gradient(circle at center, #1a0d00 0%, #050505 100%);
    min-height: 100vh;
    position: relative;
}

section[id] {
    scroll-margin-top: 120px;
}

/* شاشة التحميل */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}
.splash-content {
    text-align: center;
}
.splash-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}
.splash-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,77,0,0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}
.splash-text {
    font-size: 1.2rem;
    color: #ccc;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.05) 25%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 10px;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
    display: inline-block;
    width: 60px;
    height: 1.2em;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* تأثيرات hover متقدمة */
.stat-card i, .card i, .join-btn i, .ip-box i, .floating-join-btn i {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                color 0.3s ease, text-shadow 0.3s ease;
}
.stat-card:hover i {
    transform: scale(1.3) rotate(8deg);
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
}
.card:hover i {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 15px var(--primary));
}
.join-btn:hover i {
    transform: translateX(-5px) scale(1.1);
}
.ip-box:hover i {
    transform: scale(1.2);
}
.floating-join-btn:hover i {
    transform: scale(1.1);
}

/* تأثير نبض خفيف للعناصر المهمة */
@keyframes gentle-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 77, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); }
}
.wipe-card, .ip-box, .join-btn, .floating-join-btn {
    animation: gentle-pulse 3s infinite;
}
.wipe-card:hover, .ip-box:hover, .join-btn:hover, .floating-join-btn:hover {
    animation: none;
}

/* تحسين تأثير التوهج */
.wipe-card {
    position: relative;
    overflow: hidden;
}
.wipe-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,77,0,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.wipe-card:hover::after {
    opacity: 1;
}

.wipe-timer {
    text-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary);
    transition: text-shadow 0.3s;
}
.wipe-timer:hover {
    text-shadow: 0 0 30px var(--primary), 0 0 60px var(--primary);
}

/* تأثير لمعان على البطاقات */
.stat-card, .card {
    position: relative;
    overflow: hidden;
}
.stat-card::before, .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}
.stat-card:hover::before, .card:hover::before {
    left: 100%;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.hero, nav, section, footer {
    position: relative;
    z-index: 1;
}

.status-bar {
    background: transparent;
    height: 35px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
}

nav {
    background: transparent;
    height: 85px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    position: fixed;
    width: 100%;
    top: 35px;
    z-index: 2000;
}

.logo {
    position: relative;
    width: 80px;
    height: 80px;
}

[dir="rtl"] nav .logo {
    margin-left: auto;
}

.logo .nav-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* أيقونة الهامبرغر - تظهر فقط على الشاشات الصغيرة */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 2001;
    position: relative;
}
.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* القائمة الرئيسية */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin-left: auto;
}

[dir="rtl"] nav ul {
    margin-left: 0;
    margin-right: auto;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    font-size: 1.1rem;
}

nav ul li a:hover {
    color: var(--primary);
    text-shadow: var(--fire-glow);
}

.lang-btn {
    background: none;
    border: 2px solid var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
    margin-left: 20px;
    font-size: 1rem;
}

[dir="rtl"] .lang-btn {
    margin-left: 0;
    margin-right: 20px;
}

.lang-btn:hover {
    background: var(--primary);
    color: #000;
}

/* زر اللغة للجوال (داخل القائمة) */
#langToggleMobile {
    display: none;
    width: 100%;
    margin: 10px 0 0;
    background: transparent;
    border: 2px solid var(--primary);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.hero {
    height: 100vh;
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.hero-center-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
    filter: blur(4px) brightness(0.25);
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 8rem;
    color: #fff;
    text-shadow: 0 0 60px var(--primary);
    margin-bottom: 10px;
}

.hero p {
    font-size: 2rem;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
}

.ip-box {
    background: rgba(255, 77, 0, 0.1);
    padding: 15px 40px;
    border-radius: 50px;
    border: 2px solid var(--primary);
    font-size: 1.5rem;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--fire-glow);
    color: #fff;
    position: relative;
}

.ip-box:active {
    transform: scale(0.9);
}

.ip-box:hover {
    background: var(--primary);
    box-shadow: 0 0 50px var(--primary);
}

.join-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--fire-glow);
    transition: 0.2s;
    border: 2px solid transparent;
}

.join-btn:hover {
    transform: scale(1.05);
    border-color: white;
    box-shadow: 0 0 60px var(--primary);
}

.join-btn i {
    font-size: 2rem;
}

#copyMsg {
    color: #fff;
    font-size: 1rem;
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* زر انضمام ثابت للجوال */
.floating-join-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: var(--fire-glow);
    border: 2px solid transparent;
    z-index: 10000;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    transition: 0.2s;
}
.floating-join-btn i {
    font-size: 1.3rem;
}
.floating-join-btn:hover {
    transform: translateX(-50%) scale(1.05);
    border-color: white;
    box-shadow: 0 0 30px var(--primary);
}

.news-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 10px 0;
}
.news-marquee span {
    display: inline-block;
    animation: marquee-right 20s linear infinite;
    font-size: 1.2rem;
}
@keyframes marquee-right {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.scroll-icon-left,
.scroll-icon-right,
.scroll-icon-up {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-icon-left {
    transform: translateX(-50px);
}
.scroll-icon-right {
    transform: translateX(50px);
}
.scroll-icon-up {
    transform: translateY(50px);
}

.scroll-icon-left.visible,
.scroll-icon-right.visible,
.scroll-icon-up.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.scroll-icon-left.visible i,
.scroll-icon-right.visible i,
.scroll-icon-up.visible i {
    animation: iconPop 0.5s ease forwards;
}

@keyframes iconPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.server-panel {
    padding: 80px 10%;
    background: transparent;
    position: relative;
    z-index: 1000;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 50px;
    color: var(--primary);
    text-shadow: var(--fire-glow);
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,77,0,0.2);
    border-radius: 30px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
    transition: 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--fire-glow);
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 3rem;
    color: var(--primary);
}

.stat-card div {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 1rem;
    color: #aaa;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
}

.wipe-section {
    text-align: center;
    padding: 50px 5%;
    background: transparent;
    position: relative;
    z-index: 2;
}

.wipe-card {
    display: inline-block;
    padding: 40px 80px;
    background: rgba(255,77,0,0.1);
    border: 2px dashed var(--primary);
    border-radius: 100px;
    backdrop-filter: blur(10px);
}

.wipe-card i {
    font-size: 4rem;
    color: var(--primary);
    margin-left: 20px;
    vertical-align: middle;
}

.wipe-label {
    font-size: 1.5rem;
    color: #ccc;
    margin-left: 10px;
}

.wipe-timer {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-right: 20px;
}

.section-padding {
    padding: 100px 10%;
    position: relative;
    z-index: 2;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    text-align: center;
    transition: 0.3s;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--fire-glow);
    transform: translateY(-5px);
}

.card i {
    font-size: 4.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    display: block;
    text-shadow: 0 0 20px rgba(255,77,0,0.5);
}

.card h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.card p {
    color: #ccc;
    font-size: 1.2rem;
}

/* حاوية الخريطة مع التحكم بالتكبير */
.map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.map-frame {
    width: 100%;
    height: 850px;
    border-radius: 50px;
    border: 8px solid #151515;
    box-shadow: 0 0 80px rgba(0,0,0,0.8);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.1s ease;
}

.map-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform-origin: center center;
    pointer-events: none;
}

.map-frame.zooming {
    cursor: grabbing;
}

.map-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 77, 0, 0.3);
}

.zoom-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 77, 0, 0.2);
    border: 2px solid var(--primary);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: var(--fire-glow);
}

.zoom-btn:active {
    transform: scale(0.95);
}

details {
    margin-bottom: 20px;
    border-radius: 20px;
    border: 1px solid #333;
    overflow: hidden;
}

summary {
    padding: 30px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    list-style: none;
    transition: 0.3s;
    background: rgba(255,255,255,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary:hover {
    background: rgba(255,77,0,0.1);
}

summary::after {
    content: '▼';
    font-size: 1.2rem;
    transition: 0.3s;
    margin-right: 10px;
}

details[open] summary::after {
    transform: rotate(180deg);
}

details p {
    padding: 30px;
    font-size: 1.2rem;
    color: #ccc;
    background: rgba(255,255,255,0.02);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

footer {
    padding: 60px 20px;
    text-align: center;
    background: #000;
    border-top: 5px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.footer-brand-text {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: var(--fire-glow);
    letter-spacing: 2px;
}

footer a {
    color: white;
    font-size: 3rem;
    transition: 0.3s;
    display: inline-block;
}

footer a:hover {
    color: var(--primary);
    transform: scale(1.1);
    text-shadow: var(--fire-glow);
}

footer p {
    color: #444;
    font-size: 1rem;
}

.particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #FF4D00, #FF9500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: rise 5s linear infinite;
    box-shadow: 0 0 10px #FF4D00;
}

@keyframes rise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0.2;
    }
    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0.8;
    }
}

/* ========== تحسينات للشاشات الصغيرة ========== */
@media (max-width: 768px) {
    /* إظهار الهامبرغر وإخفاء القائمة العادية */
    .hamburger {
        display: flex;
    }
    nav ul {
        position: fixed;
        top: 120px; /* تحت الشريط العلوي */
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 120px);
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 40px 20px;
        gap: 20px;
        transition: left 0.3s ease;
        z-index: 2999;
        margin: 0;
        border-right: 2px solid var(--primary);
    }
    [dir="rtl"] nav ul {
        left: auto;
        right: -100%;
        border-right: none;
        border-left: 2px solid var(--primary);
    }
    [dir="rtl"] nav ul.active {
        right: 0;
    }
    nav ul.active {
        left: 0;
    }
    nav ul li {
        width: 100%;
        text-align: center;
    }
    nav ul li a {
        display: block;
        padding: 15px;
        font-size: 1.3rem;
    }
    /* إخفاء زر اللغة العادي وإظهار زر الجوال */
    .desktop-lang {
        display: none;
    }
    #langToggleMobile {
        display: block;
    }
    
    /* زر انضمام ثابت يظهر فقط على الجوال */
    .floating-join-btn {
        display: flex;
    }
    
    /* تعديلات حجم النصوص */
    .hero h1 {
        font-size: 4rem;
    }
    .hero p {
        font-size: 1.2rem;
        padding: 0 20px;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 20px;
    }
    .ip-box, .join-btn {
        padding: 15px 30px;
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .wipe-card {
        padding: 30px 40px;
    }
    .wipe-timer {
        font-size: 2rem;
    }
    .map-frame {
        height: 400px;
    }
    .stat-card {
        padding: 20px;
    }
    .stat-value {
        font-size: 1.2rem;
    }
    .map-zoom-controls {
        bottom: 10px;
        right: 10px;
        padding: 5px;
    }
    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .footer-brand {
        flex-direction: column;
        text-align: center;
    }
    .footer-brand-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 3rem;
    }
    .wipe-card {
        padding: 20px 30px;
    }
    .wipe-timer {
        font-size: 1.5rem;
    }
    .wipe-label {
        font-size: 1rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .map-frame {
        height: 300px;
    }
}