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

/* ==========================================
   Reset
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   Body
   ========================================== */

body {
    font-family: 'Cairo', sans-serif;
    color: #111111;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.35)
        ),
        url("../images/hosting-background.png")
        center center / cover fixed no-repeat;
}

body::before {
    display: none;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Navbar
   ========================================== */

.navbar {
    background: rgba(15, 15, 15, 0.94);
    backdrop-filter: blur(20px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.10);

    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.25);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 700;

    background: linear-gradient(
        135deg,
        #ffffff,
        #a3a3a3
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    text-decoration: none;
    letter-spacing: -0.5px;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;

    background: rgba(255, 255, 255, 0.08);

    padding: 6px 15px 6px 10px;

    border-radius: 40px;

    border: 1px solid rgba(255, 255, 255, 0.15);
}

.avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    border: 2px solid #ffffff;

    object-fit: cover;
}

.user-info span {
    font-weight: 500;
    color: #eeeeee;
}

.coins-badge {
    background: linear-gradient(
        135deg,
        #ffffff,
        #d4d4d4
    );

    color: #111111;

    padding: 8px 18px;

    border-radius: 30px;

    font-weight: 700;

    display: flex;
    align-items: center;
    gap: 6px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   Cards
   ========================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 20px;

    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(
        135deg,
        #171717,
        #0b0b0b
    );

    border: 1px solid #333333;

    border-radius: 16px;

    padding: 24px;

    display: flex;
    align-items: center;

    gap: 18px;

    transition: all 0.3s ease;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.25);
}

.stat-card:hover {
    transform: translateY(-5px);

    border-color: #ffffff;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);
}

.stat-icon {
    font-size: 44px;

    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.08);

    border-radius: 14px;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;

    color: #ffffff;

    margin-bottom: 5px;
}

.stat-content p {
    color: #999999;

    font-size: 14px;

    font-weight: 500;
}

/* ==========================================
   Section Header
   ========================================== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: 35px 0 20px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;

    color: #111111;

    position: relative;

    padding-right: 18px;
}

.section-header h2::before {
    content: '';

    position: absolute;

    right: 0;
    top: 50%;

    transform: translateY(-50%);

    width: 4px;
    height: 28px;

    background: linear-gradient(
        135deg,
        #111111,
        #777777
    );

    border-radius: 4px;
}

/* ==========================================
   Servers Grid
   ========================================== */

.servers-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(360px, 1fr));

    gap: 22px;

    margin-bottom: 30px;
}

.server-card {
    background: rgba(20, 20, 20, 0.94);

    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 20px;

    padding: 22px;

    transition: all 0.3s ease;

    box-shadow:
        0 0 25px rgba(0, 0, 0, 0.08);
}

.server-card:hover {
    transform: translateY(-5px);

    border-color: #ffffff;

    box-shadow:
        0 0 35px rgba(0, 0, 0, 0.18),
        0 15px 40px rgba(0, 0, 0, 0.25);
}

.server-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;
}

.server-header h3 {
    font-size: 20px;
    font-weight: 700;

    color: #ffffff;
}

.server-status {
    padding: 5px 14px;

    border-radius: 30px;

    font-size: 12px;

    font-weight: 600;

    letter-spacing: 0.3px;
}

.status-running {
    background: linear-gradient(
        135deg,
        #ffffff,
        #d4d4d4
    );

    color: #111111;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-starting {
    background: #d4d4d4;

    color: #111111;
}

.status-stopping {
    background: #737373;

    color: #ffffff;
}

.status-stopped {
    background: #303030;

    color: #aaaaaa;
}

.status-error {
    background: #111111;

    color: #ffffff;

    border: 1px solid #666666;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25);
}

.server-info {
    margin-bottom: 18px;
}

.info-row {
    display: flex;

    justify-content: space-between;

    padding: 8px 0;

    font-size: 14px;

    border-bottom: 1px solid #333333;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #999999;

    font-weight: 500;
}

.info-value {
    font-weight: 600;

    color: #e5e5e5;

    font-family: 'Consolas', monospace;
}

.server-actions {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin-top: 15px;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 22px;

    border-radius: 10px;

    border: none;

    cursor: pointer;

    font-size: 14px;

    font-weight: 600;

    text-decoration: none;

    transition: all 0.3s ease;

    background: #eeeeee;

    color: #111111;

    border: 1px solid #cccccc;

    font-family: 'Cairo', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.18);
}

.btn-primary {
    background: linear-gradient(
        135deg,
        #111111,
        #3a3a3a
    );

    color: #ffffff;

    border: none;

    border-radius: 12px;

    font-weight: 700;

    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.20);

    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);

    box-shadow:
        0 0 35px rgba(0, 0, 0, 0.35);

    background: linear-gradient(
        135deg,
        #000000,
        #555555
    );
}

.btn-success {
    background: linear-gradient(
        135deg,
        #ffffff,
        #d4d4d4
    );

    color: #111111;

    border: 1px solid #bbbbbb;
}

.btn-warning {
    background: #d4d4d4;

    color: #111111;

    border: 1px solid #aaaaaa;
}

.btn-danger {
    background: linear-gradient(
        135deg,
        #222222,
        #000000
    );

    color: #ffffff;

    border: 1px solid #555555;
}

.btn-info {
    background: linear-gradient(
        135deg,
        #e5e5e5,
        #bdbdbd
    );

    color: #111111;

    border: 1px solid #aaaaaa;
}

.btn-outline {
    background: transparent;

    border: 1px solid #555555;

    color: #222222;
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.06);
}

.btn-sm {
    padding: 7px 14px;

    font-size: 12px;

    border-radius: 8px;
}

.btn-block {
    display: flex;

    width: 100%;
}

.btn-discord {
    background: #222222;

    color: #ffffff;

    border: none;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.20);
}

.btn-discord:hover {
    background: #000000;
}

.btn:disabled {
    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}

/* ==========================================
   Forms
   ========================================== */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: 500;

    color: #444444;

    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 12px 16px;

    background: #ffffff;

    border: 1.5px solid #cccccc;

    border-radius: 10px;

    color: #111111;

    font-size: 15px;

    font-family: 'Cairo', sans-serif;

    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;

    border-color: #111111;

    box-shadow:
        0 0 0 4px rgba(0, 0, 0, 0.07);
}

.form-group input::placeholder {
    color: #999999;
}

/* ==========================================
   Auth Pages
   ========================================== */

.auth-container {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 20px;

    background:
        linear-gradient(
            rgba(240, 240, 240, 0.72),
            rgba(210, 210, 210, 0.72)
        );
}

.auth-box {
    background: rgba(255, 255, 255, 0.96);

    border: 1px solid #d4d4d4;

    border-radius: 24px;

    padding: 45px 40px;

    width: 100%;

    max-width: 460px;

    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15);
}

.auth-box h1 {
    text-align: center;

    margin-bottom: 35px;

    font-size: 32px;

    font-weight: 700;

    background: linear-gradient(
        135deg,
        #111111,
        #777777
    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    background-clip: text;
}

.auth-divider {
    display: flex;

    align-items: center;

    text-align: center;

    margin: 28px 0;

    color: #888888;
}

.auth-divider::before,
.auth-divider::after {
    content: '';

    flex: 1;

    border-bottom: 1px solid #d4d4d4;
}

.auth-divider span {
    padding: 0 15px;

    font-size: 14px;
}

.auth-footer {
    text-align: center;

    margin-top: 28px;

    color: #777777;
}

.auth-footer a {
    color: #111111;

    text-decoration: none;

    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   Tabs
   ========================================== */

.server-tabs {
    display: flex;

    gap: 8px;

    margin: 25px 0;

    border-bottom: 1px solid #cccccc;

    padding-bottom: 5px;
}

.tab-btn {
    padding: 12px 28px;

    background: transparent;

    border: none;

    color: #777777;

    cursor: pointer;

    font-size: 15px;

    font-weight: 600;

    border-radius: 10px 10px 0 0;

    transition: all 0.3s ease;

    font-family: 'Cairo', sans-serif;

    position: relative;
}

.tab-btn:hover {
    color: #111111;

    background: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    color: #111111;
}

.tab-btn.active::after {
    content: '';

    position: absolute;

    bottom: -6px;

    left: 0;
    right: 0;

    height: 3px;

    background: linear-gradient(
        135deg,
        #111111,
        #777777
    );

    border-radius: 3px;
}

.tab-content {
    display: none;

    padding: 25px 0;
}

.tab-content.active {
    display: block;

    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;

        transform: translateY(10px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

/* ==========================================
   Console
   ========================================== */

.console-container {
    background: #111111;

    border: 1px solid #333333;

    border-radius: 10px;

    overflow: hidden;
}

.console-output {
    height: 450px;

    overflow-y: auto;

    padding: 15px;

    font-family:
        'Consolas',
        'Courier New',
        monospace;

    font-size: 13px;

    /* خلفية الكونسل */
    background:
        linear-gradient(
            rgba(10, 10, 10, 0.82),
            rgba(10, 10, 10, 0.82)
        ),
        url("../images/console-background.png")
        center center / cover no-repeat;

    color: #e5e5e5;

    line-height: 1.5;

    /* تأثير خفيف */
    background-attachment: local;
}

.console-line {
    white-space: pre-wrap;

    word-wrap: break-word;

    margin: 2px 0;

    color: #d4d4d4;
}

.console-error {
    white-space: pre-wrap;

    word-wrap: break-word;

    margin: 2px 0;

    color: #ffffff;
}

.console-input {
    display: flex;

    padding: 12px;

    gap: 10px;

    border-top: 1px solid #333333;

    background: #111111;
}

.console-input input {
    flex: 1;

    padding: 10px 15px;

    background: #050505;

    border: 1px solid #444444;

    border-radius: 6px;

    color: #ffffff;

    font-family: 'Consolas', monospace;

    font-size: 14px;
}

.console-input input:focus {
    outline: none;

    border-color: #ffffff;
}

/* ==========================================
   Server Header Detail
   ========================================== */

.server-header-detail {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin: 25px 0;

    padding: 20px 0;

    border-bottom: 1px solid #cccccc;
}

.server-header-detail h1 {
    font-size: 32px;

    font-weight: 700;

    color: #111111;

    display: flex;

    align-items: center;

    gap: 15px;
}

/* ==========================================
   Empty State
   ========================================== */

.empty-state {
    text-align: center;

    padding: 70px 30px;

    background: linear-gradient(
        135deg,
        #ffffff,
        #eeeeee
    );

    border: 1px solid #cccccc;

    border-radius: 20px;

    margin: 30px 0;
}

.empty-icon {
    font-size: 72px;

    margin-bottom: 25px;

    opacity: 0.7;
}

.empty-state h3 {
    font-size: 24px;

    color: #111111;

    margin-bottom: 12px;
}

.empty-state p {
    color: #777777;

    margin-bottom: 25px;

    font-size: 16px;
}

/* ==========================================
   Alerts
   ========================================== */

.alert {
    padding: 14px 18px;

    border-radius: 12px;

    margin-bottom: 25px;

    font-weight: 500;
}

.alert-error {
    background: #eeeeee;

    border: 1.5px solid #888888;

    color: #222222;
}

.alert-success {
    background: #f5f5f5;

    border: 1.5px solid #aaaaaa;

    color: #222222;
}

/* ==========================================
   Error Page
   ========================================== */

.error-container {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 20px;
}

.error-box {
    text-align: center;

    padding: 55px 50px;

    background: linear-gradient(
        135deg,
        #ffffff,
        #eeeeee
    );

    border: 1px solid #cccccc;

    border-radius: 24px;

    max-width: 500px;
}

.error-code {
    font-size: 100px;

    font-weight: 800;

    background: linear-gradient(
        135deg,
        #111111,
        #888888
    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    background-clip: text;

    margin-bottom: 20px;
}

.error-box h2 {
    font-size: 28px;

    color: #111111;

    margin-bottom: 15px;
}

.error-box p {
    color: #777777;

    margin-bottom: 30px;
}

/* ==========================================
   Admin Page
   ========================================== */

.admin-grid {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 20px;

    margin: 30px 0;
}

.table-container {
    background: linear-gradient(
        135deg,
        #ffffff,
        #eeeeee
    );

    border: 1px solid #cccccc;

    border-radius: 18px;

    padding: 25px;

    overflow-x: auto;

    margin-bottom: 30px;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;

    text-align: right;

    border-bottom: 1px solid #d4d4d4;
}

th {
    font-weight: 700;

    color: #111111;

    font-size: 14px;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

.badge {
    padding: 5px 12px;

    border-radius: 30px;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;
}

.badge-owner {
    background: linear-gradient(
        135deg,
        #111111,
        #444444
    );

    color: #ffffff;
}

.badge-admin {
    background: linear-gradient(
        135deg,
        #ffffff,
        #d4d4d4
    );

    color: #111111;

    border: 1px solid #aaaaaa;
}

.badge-banned {
    background: #222222;

    color: #ffffff;
}

/* ==========================================
   Modal
   ========================================== */

.modal {
    display: none;

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.75);

    backdrop-filter: blur(5px);

    z-index: 9999;

    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;

    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: linear-gradient(
        135deg,
        #ffffff,
        #eeeeee
    );

    border: 1px solid #cccccc;

    border-radius: 20px;

    padding: 35px;

    max-width: 500px;

    width: 90%;

    max-height: 90vh;

    overflow-y: auto;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25);
}

.modal-content h2 {
    margin-bottom: 25px;

    color: #111111;

    font-size: 26px;
}

/* ==========================================
   Scrollbar
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #e5e5e5;
}

::-webkit-scrollbar-thumb {
    background: #999999;

    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* ==========================================
   Selection
   ========================================== */

::selection {
    background: rgba(0, 0, 0, 0.18);

    color: #111111;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .admin-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .nav-menu {
        flex-wrap: wrap;

        justify-content: flex-end;
    }

    .user-info span {
        display: none;
    }

    .server-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 10px 18px;

        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-direction: column;

        gap: 15px;
    }

    .nav-menu {
        justify-content: center;
    }

    .auth-box {
        padding: 30px 20px;
    }

    .server-header-detail {
        flex-direction: column;

        gap: 15px;

        text-align: center;
    }
}
