﻿html, body, .page, .main-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* ✅ إخفاء رسالة الخطأ من Blazor */
#blazor-error-ui {
    display: none !important;
}

/* ✅ خلفية سوداء وتنسيق النص */
body {
    background: linear-gradient(to bottom, #0d0d0d, #121212) !important;
    color: #f5f5f5 !important;
    font-family: 'Cairo', sans-serif;
    margin: 0;
    scroll-behavior: smooth;
}

/* ✅ تصميم البطاقات */
.card, .project-card {
    background-color: #1e1e1e !important;
    color: white;
    border-radius: 12px;
    padding: 20px;
}

/* ✅ تصميم موحد للهيدر والفوتر */
.navbar, .top-bar, .footer {
    background-color: #000 !important;
}

/* ✅ أزرار */
.btn-primary, .view-button {
    background-color: #00cfff !important;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    margin: 4px;
    transition: background 0.3s ease;
}

    .btn-primary:hover, .view-button:hover {
        background-color: #00b8e6 !important;
    }

.details-button {
    background-color: #444;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .details-button:hover {
        background-color: #666;
    }

/* ✅ Popup التفاصيل */
.project-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
}

.close-popup {
    background-color: #e91e63;
    color: white;
    padding: 8px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

    .close-popup:hover {
        background-color: #d81b60;
    }

/* ===== Scroll to top button (NEW) ===== */
.scrolltop-btn {
    position: fixed;
    inset-inline-end: 24px; /* يمين/يسار حسب اتجاه الصفحة */
    inset-block-end: 24px; /* أسفل */
    width: 46px;
    height: 46px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: radial-gradient(120% 120% at 20% 20%, #19e9ff 0%, #00bcd4 35%, #0aa0c1 100%);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 22px rgba(0, 208, 255, .20), 0 0 0 1px rgba(0,0,0,.6) inset;
    backdrop-filter: blur(2px);
    z-index: 1100;
    /* مخفي افتراضياً بشكل ناعم */
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.92);
    transition: opacity .18s ease, transform .18s ease, box-shadow .2s ease, background .2s ease;
}

    .scrolltop-btn.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .scrolltop-btn:hover {
        transform: translateY(-2px) scale(1.04);
        box-shadow: 0 12px 28px rgba(0, 208, 255, .28), 0 0 0 1px rgba(0,0,0,.6) inset;
    }

    .scrolltop-btn svg {
        width: 22px;
        height: 22px;
    }

/* موبايل */
@media (max-width: 640px) {
    .scrolltop-btn {
        inset-inline-end: 16px;
        inset-block-end: 16px;
        width: 42px;
        height: 42px;
    }
}
