@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&family=Cairo:wght@700;900&family=Reem+Kufi:wght@700;900&display=swap');

:root {
    --bg-color: #070B19;
    --text-color: #f8fafc;
    --accent: #10b981;
    --accent-gold: #d4af37;
    --accent-glow: rgba(16, 185, 129, 0.6);
    --nav-bg: rgba(15, 23, 42, 0.9);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 50%, #111827 0%, #070B19 100%);
    color: var(--text-color);
    font-family: 'Tajawal', sans-serif;
    overflow-x: hidden;
}

/* Navbar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 1000;
    position: fixed;
    top: 0;
    width: 100%;
}

.nav-brand {
    font-size: 1.55rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.nav-brand span {
    font-family: 'Cairo', 'Reem Kufi', 'Tajawal', sans-serif;
    font-weight: 900;
    background: linear-gradient(135deg, #FFE89C 0%, #D4AF37 50%, #9A7B1C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-brand:hover {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)) drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
    transform: translateY(-1px) scale(1.02);
}

.nav-brand:hover .brand-logo {
    transform: rotate(-5deg) scale(1.1);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.admin-btn {
    background: var(--accent-gold);
    color: #000 !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700 !important;
    margin-left: 10px;
}

.reg-btn {
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold) !important;
    padding: 7px 18px;
    border-radius: 50px;
    font-weight: 500;
    transition: 0.3s;
}

.reg-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 5px 15px;
    border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
}

.user-profile:hover {
    background: rgba(255,255,255,0.1);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    background: #1e293b;
    border: 1px solid var(--accent-gold);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    padding: 10px 0;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
}

.notification-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
}

.user-badge {
    font-size: 0.65rem;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(7, 11, 25, 0.8), rgba(7, 11, 25, 0.8)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 40px;
}

.btn-primary {
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.2rem;
    transition: 0.4s;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    transform: translateY(-5px);
}

/* Info Section */
.info-section {
    padding: 80px 20px;
    background: #0f172a;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.8rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.info-card p {
    line-height: 1.8;
    color: #cbd5e1;
}

.news-list {
    list-style: none;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #cbd5e1;
}

.news-list li span {
    color: var(--accent-gold);
    font-weight: bold;
    margin-left: 10px;
}

/* Tree Section Wrapper */
.tree-wrapper {
    padding: 100px 0;
    min-height: 100vh;
    background: #0a0f1d;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 15px;
}

.divider {
    width: 100px;
    height: 4px;
    background: var(--accent-gold);
    margin: 0 auto;
    border-radius: 2px;
}

#tree-container {
    width: 100%;
    height: 700px;
    overflow: hidden;
}

/* Tree Node Styling */
.node circle {
    fill: #111827;
    stroke: var(--accent-gold);
    stroke-width: 2px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3));
    cursor: pointer;
}

.node text {
    fill: #fff;
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
}

.link {
    fill: none;
    stroke: rgba(212, 175, 55, 0.2);
    stroke-width: 2px;
}

/* Responsive & Mobile Optimization */
.menu-toggle {
    display: none !important;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 2.5px;
    background-color: var(--accent-gold);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        padding: 15px 25px;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Hamburger Menu Toggle Display */
    .menu-toggle {
        display: flex !important;
    }
    
    /* Responsive Glassmorphic Navigation Drawer */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #070B19;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        z-index: 1500;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-30px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        padding: 80px 20px 40px;
    }
    
    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    
    /* Ensure all links show nicely in vertical stack on mobile */
    .nav-links a {
        display: block !important;
        font-size: 1.4rem;
        font-weight: 700;
        color: #fff !important;
        padding: 10px 20px;
        text-align: center;
        width: 100%;
        max-width: 280px;
        border-radius: 12px;
        transition: 0.3s;
    }
    
    .nav-links a:hover {
        background: rgba(212, 175, 55, 0.08);
        color: var(--accent-gold) !important;
    }
    
    .reg-btn, .admin-btn {
        margin: 5px 0 !important;
        width: 100%;
        max-width: 280px;
        box-sizing: border-box;
        text-align: center;
    }
    
    .user-profile {
        margin-right: 0 !important;
        margin-top: 10px;
        width: 100%;
        max-width: 280px;
        justify-content: center;
        box-sizing: border-box;
        flex-wrap: wrap;
        padding: 12px 15px !important;
        border-radius: 20px !important;
    }
    
    .dropdown-menu {
        display: flex !important;
        position: static !important;
        width: 100%;
        margin-top: 15px;
        background: rgba(30, 41, 59, 0.4) !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
        box-shadow: none !important;
        animation: none !important;
    }
    
    /* Contact and Register layouts on mobile */
    .contact-container {
        grid-template-columns: 1fr !important;
        padding: 15px !important;
    }
    .register-container {
        padding: 25px 20px !important;
        border-radius: 20px !important;
    }
    
    /* Responsive styling for the Admin Dashboard */
    body {
        flex-direction: column !important;
        overflow: auto !important;
        height: auto !important;
    }
    
    .sidebar {
        position: fixed !important;
        top: 0;
        right: 0;
        width: 270px;
        height: 100vh;
        z-index: 3000 !important;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
        background: #0f172a !important;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        padding: 15px !important;
        margin-top: 60px; /* Space for mobile navigation bar */
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        padding: 10px 20px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        z-index: 2500;
        box-sizing: border-box;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 15px;
    }
    
    .table {
        min-width: 600px;
    }
}

/* Helper Utilities */
.hidden {
    display: none !important;
}



