/* ============================================
   🎨 تصميم محسّن - بعد تسجيل الدخول
   ألوان: أخضر نيون (#00ff41) + أسود (#000000)
   ============================================ */

/* ============================================
   Authenticated Section
   ============================================ */
.authenticated-section {
    display: flex;
    width: 100%;
    height: 100vh;
    gap: 0;
    background: #000000;
    position: relative;
}

/* ✨ تأثير الإضاءة الخضراء النيون في الخلفية */
.authenticated-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.2) 0%, transparent 70%);
    filter: blur(100px);
    animation: float 8s ease-in-out infinite;
    z-index: 0;
}

.authenticated-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 10s ease-in-out infinite reverse;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

/* ============================================
   Sidebar - ثابت على اليمين
   ============================================ */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.98) 0%, rgba(10, 20, 10, 0.98) 100%);
    border-left: 2px solid rgba(0, 255, 65, 0.4);
    box-shadow: -5px 0 40px rgba(0, 255, 65, 0.3), inset 1px 0 0 rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(20px);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.15) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #00ff41, #00cc33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
}

.sidebar-close:hover {
    transform: scale(1.1);
}

.sidebar-close img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #00ff41;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.4);
    color: #00ff41;
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.2);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 5px 25px rgba(0, 255, 65, 0.4), inset 0 1px 0 rgba(0, 255, 65, 0.3);
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item.logout-btn {
    background: rgba(255, 65, 65, 0.1);
    border-color: rgba(255, 65, 65, 0.3);
    color: #ff4141;
    margin-top: auto;
}

.nav-item.logout-btn:hover {
    background: rgba(255, 65, 65, 0.2);
    border-color: #ff4141;
    box-shadow: 0 5px 20px rgba(255, 65, 65, 0.3);
    transform: translateX(-5px);
}

.nav-icon {
    font-size: 1.3rem;
    width: 26px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    margin-right: 280px;
    flex: 1;
    overflow-y: auto;
    padding: 35px;
    background: transparent;
    animation: slideInRight 0.5s ease forwards;
    position: relative;
    z-index: 1;
}

/* ============================================
   Page Content
   ============================================ */
.page-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.page-content.active {
    display: block;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Profile Section
   ============================================ */
.profile-header {
    margin-bottom: 35px;
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 25px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 255, 65, 0.05) 100%);
    padding: 25px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 65, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.2), inset 0 1px 0 rgba(0, 255, 65, 0.2);
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #00ff41;
    flex-shrink: 0;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    position: relative;
}

.profile-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ff41, transparent);
    animation: rotate 3s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.profile-info p {
    margin: 0;
    color: #94a3b8;
    font-size: 1rem;
}

/* ============================================
   Profile Stats
   ============================================ */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.08) 0%, rgba(0, 255, 65, 0.03) 100%);
    padding: 25px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 65, 0.25);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.7s ease forwards;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.1) 0%, transparent 70%);
    filter: blur(20px);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #00ff41;
    box-shadow: 0 10px 35px rgba(0, 255, 65, 0.3);
}

.stat-card h3 {
    margin: 0 0 18px 0;
    color: #cbd5e1;
    font-size: 1.15rem;
    font-weight: 600;
}

.level-display {
    margin-bottom: 15px;
}

/* تحسين وضوح رقم المستوى */
.level-number {
    font-size: 3rem;
    font-weight: 800;
    color: black;  /* لون أخضر نيون ثابت بدلاً من التدرج */
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.6); /* إضاءة خلفية */
    background: none;
    -webkit-text-fill-color: initial;
    background-clip: unset;
}

/* إذا أردت الاحتفاظ بالتدرج مع تحسين الوضوح */


.xp-bar,
.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.xp-bar::after,
.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

.xp-fill,
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00cc33);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    transition: width 0.8s ease;
    position: relative;
}

.xp-text,
.progress-text {
    font-size: 0.9rem;
    color: #94a3b8;
}

.silver-amount {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff41, #00cc33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.silver-text {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ============================================
   Daily Section
   ============================================ */
.daily-section {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 255, 65, 0.05) 100%);
    padding: 30px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 65, 0.3);
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.2);
}

.daily-section h2 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 1.5rem;
}

#dailyBtn,
#claimDailyBtn {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #00ff41, #00cc33);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.4);
    position: relative;
    overflow: hidden;
}

#dailyBtn::before,
#claimDailyBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#dailyBtn:hover::before,
#claimDailyBtn:hover::before {
    width: 300px;
    height: 300px;
}

#dailyBtn:hover,
#claimDailyBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 65, 0.6);
}

#dailyBtn:disabled,
#claimDailyBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.daily-info {
    margin-top: 15px;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ============================================
   Servers Section
   ============================================ */
.servers-header {
    margin-bottom: 30px;
    text-align: center;
}

.servers-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.servers-header p {
    margin: 0;
    color: #94a3b8;
    font-size: 1.05rem;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.server-card {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.08) 0%, rgba(0, 255, 65, 0.03) 100%);
    padding: 25px;
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 65, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.server-card:hover {
    transform: translateY(-8px);
    border-color: #00ff41;
    box-shadow: 0 12px 40px rgba(0, 255, 65, 0.4);
}

/* ============================================
   زر فتح / إخفاء قائمة لوحة التحكم الجانبية - الهواتف
   ============================================ */

/* الزر مخفي دائماً على الـ Desktop */
.dashboard-sidebar-toggle {
    display: inline-flex !important;
}

/* طبقة التعتيم خلف القائمة على الهواتف */
.dashboard-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 299;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dashboard-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* شارة الرتبة في بطاقات الردود التلقائية */
.autoreply-role-badge {
    background: rgba(0, 255, 65, 0.08) !important;
    border: 1px solid;
    border-radius: 6px;
    font-size: 0.78em;
    padding: 2px 8px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {


    .dashboard-sidebar-toggle {
    display: fixed;
}
    /* ---- الشريط الجانبي الرئيسي (قائمة السيرفرات) ---- */
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
        padding: 15px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }

    /* ---- لوحة التحكم - قائمة جانبية ---- */

    /* إخفاء القائمة الجانبية خارج حدود الشاشة */
    .dashboard-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 270px !important;
        height: 100vh !important;
        z-index: 300 !important;
        border-radius: 0 0 0 20px !important;
        overflow-y: auto !important;
        transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -6px 0 35px rgba(0, 255, 65, 0.2) !important;
        padding-top: 20px !important;
    }

    /* القائمة مفتوحة */
    .dashboard-sidebar.mobile-sidebar-open {
        right: 0 !important;
    }

    /* إظهار الـ overlay عند الفتح */
    .dashboard-sidebar-overlay {
        display: block;
    }

    /* ---- زر الـ Hamburger ---- */
    .dashboard-sidebar-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 16px;
        margin-bottom: 18px;
        background: linear-gradient(135deg, rgba(0, 255, 65, 0.12) 0%, rgba(0, 0, 0, 0.5) 100%);
        border: 1.5px solid rgba(0, 255, 65, 0.5);
        border-radius: 10px;
        color: #00ff41;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.25s ease;
        box-shadow: 0 0 14px rgba(0, 255, 65, 0.2);
        font-family: inherit;
        letter-spacing: 0.03em;
    }

    .dashboard-sidebar-toggle:hover,
    .dashboard-sidebar-toggle:active {
        background: rgba(0, 255, 65, 0.22);
        box-shadow: 0 0 22px rgba(0, 255, 65, 0.45);
        transform: scale(1.04);
    }

    .dashboard-sidebar-toggle i {
        font-size: 1.1rem;
    }

    /* ---- باقي تعديلات لوحة التحكم ---- */
    .dashboard-container {
        flex-direction: column;
        position: relative;
    }

    .dashboard-main {
        padding: 15px !important;
        width: 100%;
        min-width: 0;
    }

    .server-header {
        flex-direction: column;
        text-align: center;
    }
}

/* زر القائمة الرئيسي - يظهر فقط على الهواتف */
.main-menu-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 255, 65, 0.1));
    border: 2px solid #00ff41;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    color: #00ff41;
    cursor: pointer;
    backdrop-filter: blur(8px);
    display: none; /* مخفي افتراضياً */
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transition: all 0.3s ease;
}

.main-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.8);
}

/* إظهار الزر فقط على الهواتف */
@media (max-width: 768px) {
    .main-menu-toggle {
        display: flex;
    }
}

.sidebar-transactions-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 8px 10px;
    background: rgba(0, 255, 65, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #cbd5e1;
    font-size: 0.9rem;
}
.sidebar-transactions-btn i {
    width: 24px;
    font-size: 1.2rem;
}
.sidebar-transactions-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    color: #00ff41;
    transform: translateX(-3px);
}
