/* =========================================
   1. المتغيرات (Variables) - الهوية البصرية
   ========================================= */
   :root {
    --primary-navy: #0A192F;
    --accent-gold: #DAA520;
    --accent-gold-hover: #b8860b;
    
    /* ألوان ثابتة ومتباينة تناسب كل الخلفيات */
    --text-color: #f0f4f8; 
    --text-muted: #d1d5db;
    
    /* التأثير الزجاجي الفخم */
    --glass-bg: rgba(10, 25, 47, 0.65); 
    --glass-border: rgba(218, 165, 32, 0.3);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. الإعدادات الأساسية (Reset & Typography)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--primary-navy);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* =========================================
   3. الخلفية المتغيرة (Dynamic Background)
   ========================================= */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1.5s ease-in-out, opacity 1s ease;
    box-shadow: inset 0 0 0 2000px rgba(5, 11, 20, 0.75); 
}

/* =========================================
   4. الهيدر (Header)
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand h1 {
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 1px;
}

.slogan {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

.btn-dashboard {
    background: var(--accent-gold);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

.btn-dashboard:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
}

/* =========================================
   5. مساحة الساعة واللوحة الحية (Main Area)
   ========================================= */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 60px;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.clock-container {
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    position: relative;
    box-shadow: var(--glass-shadow);
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock-decor-ring {
    position: absolute;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    border: 1px dashed rgba(218, 165, 32, 0.3);
    z-index: 1;
}

.clock-decor-compass::before,
.clock-decor-compass::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(218, 165, 32, 0.15);
    transform: translate(-50%, -50%);
    z-index: 1;
}

.clock-decor-compass::before { width: 1px; height: 100%; }
.clock-decor-compass::after { width: 100%; height: 1px; }

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: var(--accent-gold);
    border-radius: 50%;
    z-index: 10;
    border: 4px solid var(--primary-navy);
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.8);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 10px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hour-hand { width: 6px; height: 120px; margin-left: -3px; background: #fff; }
.min-hand { width: 4px; height: 160px; margin-left: -2px; background: #ccc; }
.sec-hand { width: 2px; height: 180px; margin-left: -1px; background: var(--accent-gold); z-index: 6; }

.slot {
    position: absolute;
    width: 48px;
    height: 48px;
    background: var(--primary-navy);
    color: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transform: translate(-50%, -50%);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 4;
    transition: all 0.3s ease;
}

.slot:hover, .slot.active-slot {
    background: var(--accent-gold);
    color: var(--primary-navy);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.6);
}

.slot.empty {
    width: 18px;
    height: 18px;
    background: var(--accent-gold);
    border: 2px solid transparent;
    cursor: default;
    opacity: 0.5;
}

.project-label {
    position: absolute;
    top: 55px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(10, 25, 47, 0.8);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    pointer-events: none;
}

/* ---------------- اللوحة الحية المحدثة (Digital Panel) ---------------- */
.live-info-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--glass-shadow);
    color: var(--text-color);
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

/* تصميم الساعة الرقمية والتاريخ الجديد */
.digital-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.digital-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
}

.digital-clock {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(218, 165, 32, 0.5); /* تأثير التوهج */
    font-variant-numeric: tabular-nums; /* منع اهتزاز الأرقام عند التغيير */
}

.digital-date {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.8;
}

.live-progress-container {
    display: flex;
    align-items: center;
}

.live-progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-gold) 0%, rgba(255,255,255,0.1) 0%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.live-progress-inner {
    width: 50px;
    height: 50px;
    background: var(--primary-navy);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-gold);
}

#liveTitle {
    color: var(--accent-gold);
    font-size: 30px;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.live-desc {
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.7;
    color: #e5e7eb;
}

.services-list { list-style: none; margin-bottom: 25px; }
.services-list li { margin-bottom: 12px; font-size: 15px; display: flex; gap: 10px;}

.space-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.space-tags span {
    background: rgba(10, 25, 47, 0.8);
    border: 1px solid var(--accent-gold);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-gold);
}

/* =========================================
   6. النافذة المنبثقة (Modal)
   ========================================= */
.modal {
    display: none; 
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--primary-navy);
    border: 1px solid var(--accent-gold);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    color: #fff;
    position: relative;
    text-align: center;
    box-shadow: 0 0 40px rgba(218, 165, 32, 0.2);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
}

.close-btn:hover { color: var(--accent-gold); }

#modalTitle { color: var(--accent-gold); font-size: 28px; margin-bottom: 15px; }
.modal-desc { font-size: 15px; line-height: 1.8; color: #ccc; margin-bottom: 25px; }

.progress-circle {
    width: 140px; height: 140px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: flex; justify-content: center; align-items: center;
}
.progress-inner {
    width: 120px; height: 120px;
    background: var(--primary-navy); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 26px; font-weight: 800; color: var(--accent-gold);
}

.btn-action {
    background: var(--accent-gold); color: var(--primary-navy);
    border: none; padding: 12px 30px; border-radius: 8px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    width: 100%; margin-top: 15px;
}

/* =========================================
   7. التجاوب مع الشاشات (Responsive)
   ========================================= */
@media (max-width: 1024px) {
    main { flex-direction: column; gap: 40px; }
}

@media (max-width: 768px) {
    header { flex-direction: column; gap: 15px; padding: 15px; }
    .clock-container { width: 340px; height: 340px; }
    .slot { width: 38px; height: 38px; font-size: 15px; }
    .project-label { font-size: 11px; top: 45px; }
    .live-info-panel { padding: 20px; }
    #liveTitle { font-size: 24px; }
    .digital-clock { font-size: 28px; }
}