/* Base Styling & Fully Transparent Theme */
body {
    margin: 0;
    /* Achtergrond is volledig transparant، الـ 3D-scene تظهر من خلاله */
    background-color: transparent; 
    font-family: 'Poppins', sans-serif; 
    line-height: 1.6;
    color: #ffffff; 
    overflow-x: hidden;
    min-height: 100vh;
}

/* 1. تأثير الشبكة والخلفية (الذي كان واضحاً في الصورة الأخيرة) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* دمج تأثير الخطوط والشبكة للحصول على مظهر سايبراني عميق */
    background-image: 
        repeating-linear-gradient(0deg, rgba(93, 156, 236, 0.05), rgba(93, 156, 236, 0.05) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(93, 156, 236, 0.05), rgba(93, 156, 236, 0.05) 1px, transparent 1px, transparent 40px);
    
    pointer-events: none; 
    z-index: 1000; 
    opacity: 0.25; /* شفافية متوسطة */
}


/* Kleuren, zoals afgesproken */
:root {
    --primary-color: #5d9cec;   /* أزرق ساطع/رئيسي */
    --secondary-color: #6a1b9a; /* أرجواني بارد */
    --warning-color: #ffc107;   
    --alert-color: #dc3545;     
}

/* 3D Scene Container */
#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1; 
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 10;
    padding-top: 150px; 
    padding-bottom: 50px; 
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px);
    z-index: 100;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); 
}
.header-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
}

/* 🔑 إعادة حركة الكتابة (Typing) للوغو (CYBER DEFENSE) */
.system-logo-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(93, 156, 236, 0.6);
    
    /* خصائص حركة الكتابة */
    border-right: 2px solid var(--primary-color); 
    white-space: nowrap;
    overflow: hidden; 
    width: 0; 
    animation: 
        typing 4s steps(20, end) forwards,
        blink-cursor 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-cursor {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color); }
}

/* 🔑 إعادة حركة توهج النيون (Neon Pulse) للوحة الرئيسية */
@keyframes neon-pulse {
    0% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(93, 156, 236, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 45px var(--primary-color); }
    100% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(93, 156, 236, 0.4); }
}

.status-indicator {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
}
.status-indicator .dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    animation: pulse-dot 1s infinite alternate;
}
@keyframes pulse-dot {
    from { opacity: 0.8; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.1); }
}

/* Navigatie */
.main-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}
.nav-trigger {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 15px;
    transition: all 0.3s;
    letter-spacing: 1px;
    font-weight: 400;
    border-bottom: 2px solid transparent;
}
.nav-trigger:hover, .active-trigger {
    color: var(--primary-color);
    border-color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color), 0 0 15px rgba(93, 156, 236, 0.6);
}

/* Hoofdpanelen - Holographic Panels - تطبيق حركة التوهج المستمر */
.holographic-panel {
    min-height: auto;
    padding: 60px 5%;
    margin: 50px auto; 
    max-width: 1200px;
    
    background-color: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    
    border: 1px solid rgba(93, 156, 236, 0.4); 
    border-radius: 12px; 
    
    /* 🔑 تطبيق حركة توهج النيون المستمرة */
    animation: neon-pulse 4s infinite alternate ease-in-out; 
    
    position: relative;
    overflow: hidden;
}

/* Hoofdtitels en Subtitels - تأثير النيون على العناوين */
.panel-title {
    font-size: 2.4em; 
    color: #fff; 
    
    /* توهج نيون قوي */
    text-shadow: 0 0 5px var(--primary-color), 
                 0 0 15px var(--primary-color),
                 0 0 25px var(--primary-color);
                 
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 15px;
    margin-bottom: 40px;
    font-weight: 700;
}

.holo-subtitle {
    color: #ccc;
    font-size: 1.1em;
    text-shadow: none;
    margin-bottom: 50px;
}

/* Datakaarten (Intern) - حدود ملونة شفافة */
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.data-card, .module-card {
    background-color: rgba(255, 255, 255, 0.03); 
    
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-left: 5px solid var(--secondary-color); 
    padding: 20px;
    border-radius: 8px; 
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
}
.data-card:hover, .module-card:hover {
    transform: translateY(-8px) scale(1.02); 
    box-shadow: 0 0 30px var(--primary-color), 0 0 50px rgba(93, 156, 236, 0.6); 
    border-color: var(--primary-color); 
}

/* Status Indicators */
.data-card-green { border-color: var(--primary-color); }
.data-card-yellow { border-color: var(--warning-color); }
.data-card-red { border-color: var(--alert-color); }

.module-active {
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(93, 156, 236, 0.2);
}
.module-pending {
    border-left: 5px solid var(--warning-color);
}

.status-ok { color: var(--primary-color); }
.status-warning { color: var(--warning-color); }
.status-alert { color: var(--alert-color); animation: blink-red-fast 0.5s step-start infinite; }


/* Inhoud/Afbeeldingen in Panels */
.content-image, .content-video, .content-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 30px;
    box-shadow: 0 0 10px rgba(93, 156, 236, 0.3);
    display: block; 
}

/* Knop (CTA Button) */
.command-trigger {
    display: inline-block;
    color: #fff;
    background-color: var(--secondary-color);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    margin-top: 40px;
    position: relative;
    border: none;
    border-radius: 4px; 
    box-shadow: 0 0 10px var(--secondary-color);
    transition: all 0.3s;
    text-transform: uppercase;
}
.command-trigger:hover {
    background-color: #7c44c5;
    box-shadow: 0 0 25px var(--secondary-color), 0 0 40px rgba(106, 27, 154, 0.6); 
    transform: translateY(-3px) scale(1.03); 
}
.command-trigger.trigger-green {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}
.command-trigger.trigger-green:hover {
    background-color: #6aabf7;
    box-shadow: 0 0 25px var(--primary-color), 0 0 40px rgba(93, 156, 236, 0.6); 
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    letter-spacing: 2px;
    font-size: 0.8em;
    animation: float 2s infinite alternate;
}
.blink-dot {
    animation: blink-red-fast 0.5s step-start infinite;
    font-size: 1.5em;
}
@keyframes float {
    from { transform: translate(-50%, 0); opacity: 0.7; }
    to { transform: translate(-50%, -10px); opacity: 1; }
}
@keyframes blink-red-fast {
    50% { opacity: 0.3; }
}

/* Tabellen */
.threat-table-container {
    overflow-x: auto;
    margin-bottom: 40px;
    border-radius: 4px; 
    border: 1px solid var(--primary-color);
}
.threat-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 0.9em;
    background-color: rgba(0, 0, 0, 0.15); 
}
.threat-table th, .threat-table td {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05); 
    text-align: left; 
}
.threat-table thead th {
    background-color: rgba(0, 0, 0, 0.25); 
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
}
.list-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Defense Checklist Modules (Intern) */
.defense-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.module-card h3 {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
}
.module-card .detail {
    font-size: 0.9em;
    color: #ccc;
}








/* ==================================== */
/* 7. CHECKLIST FLIP CARDS (3D PROOF REVEAL) */
/* ==================================== */

/* 1. إنشاء العمق ثلاثي الأبعاد (Perspective) لجميع بطاقات الانقلاب */
.flip-card-container {
    perspective: 1000px;
    height: 100%; /* تأكد من أن الحاوية لها ارتفاع */
    min-height: 250px; /* الارتفاع الأدنى للبطاقة في الشبكة */
}

/* 2. تفعيل الحركة ثلاثية الأبعاد على البطاقة (module-card) */
.module-card.flip-card {
    height: 100%;
    
    /* خصائص الانقلاب */
    transform-style: preserve-3d;
    transition: transform 0.8s; /* مدة الحركة */
    cursor: pointer;
    position: relative;
    border-left: 5px solid var(--primary-color); /* الإطار الأساسي */
}

/* 3. حالة الانقلاب (عند الضغط عليها) */
.module-card.flip-card.flipped {
    transform: rotateY(180deg);
    box-shadow: 0 0 35px var(--secondary-color); /* توهج عند الانقلاب */
    border-left: 5px solid var(--secondary-color);
}

/* 4. تصميم وجهي البطاقة (الأمامي والخلفي) */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* يخفي الوجه عند النظر إليه من الخلف */
    border-radius: 4px; 
    padding: 20px;
    
    /* تنسيق الوجه ليتناسب مع module-card */
    background-color: rgba(255, 255, 255, 0.03); 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* 5. الوجه الأمامي (النص المرئي) */
.card-face.card-front {
    transform: rotateY(0deg);
}

/* 6. الوجه الخلفي (الصورة/الإثبات) */
.card-face.card-back {
    transform: rotateY(180deg); /* تدويره ليواجه الأمام عند انقلاب البطاقة */
    background-color: rgba(0, 0, 0, 0.9);
    padding: 10px;
    justify-content: center;
}

/* 7. تنسيق الصورة داخل الوجه الخلفي */
.card-face.card-back img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(93, 156, 236, 0.5); 
}