@font-face {
    font-family: Farsi_Vazir_Normal;
    src: url(../../media/font/Vazir.ttf);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #111111;
    color: #ffffff;
    font-family: Farsi_Vazir_Normal, Arial, sans-serif;
}

.panel-page {
    min-height: 100vh;
    display: flex;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 260px;
    min-height: 100vh;

    background: #1b1b1b;

    border-right: 1px solid #303030;

    display: flex;
    flex-direction: column;

    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;
}


.sidebar-logo {
    height: 80px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 15px 20px;

    border-bottom: 1px solid #303030;

    font-size: 20px;
    font-weight: bold;
}


.sidebar-logo img {
    width: 45px;
    height: 45px;

    object-fit: contain;
}


.sidebar-nav {
    padding: 20px 12px;
}


.nav-item {
    width: 100%;

    border: 0;

    background: transparent;

    color: #aaa;

    padding: 13px 15px;

    border-radius: 8px;

    display: flex;
    align-items: center;

    gap: 12px;

    cursor: pointer;

    font-size: 15px;

    text-align: left;
}


.nav-item:hover {
    background: #292929;
    color: #fff;
}


.nav-item.active {
    background: #333333;
    color: #8BAE66;
}


.nav-item i {
    width: 20px;
    text-align: center;
}


.sidebar-bottom {
    margin-top: auto;

    padding: 15px;

    border-top: 1px solid #303030;
}


.logout-btn {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 15px;

    color: #aaa;

    text-decoration: none;

    border-radius: 8px;

    transition: 0.2s;
}


.logout-btn:hover {
    background: #292929;

    color: #ff6666;
}


/* =========================
   MAIN
========================= */

.main-content {
    margin-left: 260px;

    width: calc(100% - 260px);

    min-height: 100vh;

    padding: 35px;
}


/* =========================
   TOPBAR
========================= */

.topbar {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 35px;
}


.topbar h1 {
    margin: 0;

    font-size: 30px;
}


.topbar p {
    margin: 7px 0 0;

    color: #888;

    font-size: 14px;
}


.user-box {
    display: flex;

    align-items: center;

    gap: 12px;

    background: #1b1b1b;

    border: 1px solid #303030;

    border-radius: 10px;

    padding: 8px 14px;
}


.user-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: #333;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #8BAE66;
}


.user-box .username {
    display: block;

    font-size: 14px;

    font-weight: bold;
}


.user-box small {
    color: #777;

    font-size: 11px;
}


/* =========================
   GAMES
========================= */

.games-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(250px, 1fr));

    gap: 22px;
}


.game-card {
    background: #1b1b1b;

    border: 1px solid #303030;

    border-radius: 12px;

    overflow: hidden;

    transition: 0.25s;
}


.game-card:hover {
    transform: translateY(-4px);

    border-color: #4a4a4a;
}


.game-image {
    width: 100%;

    height: 170px;

    object-fit: cover;

    display: block;

    background: #252525;
}


.game-content {
    padding: 18px;
}


.game-title {
    margin: 0 0 8px;

    font-size: 18px;
}


.game-description {
    color: #888;

    font-size: 13px;

    line-height: 1.6;

    height: 42px;

    overflow: hidden;

    margin-bottom: 18px;
}


.download-btn {
    width: 100%;

    border: 0;

    background: #8BAE66;

    color: #111;

    padding: 11px;

    border-radius: 7px;

    font-weight: bold;

    cursor: pointer;

    text-decoration: none;

    display: block;

    text-align: center;

    transition: 0.2s;
}


.download-btn:hover {
    background: #9fc477;

    color: #111;
}


.download-btn i {
    margin-right: 7px;
}


/* =========================
   LOADING
========================= */

.loading-container {
    min-height: 300px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    color: #888;
}


.spinner {
    width: 40px;
    height: 40px;

    border: 4px solid #333;

    border-top-color: #8BAE66;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;

    margin-bottom: 15px;
}


@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================
   EMPTY
========================= */

.empty-library {
    min-height: 400px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    color: #777;
}


.empty-library i {
    font-size: 60px;

    margin-bottom: 20px;

    color: #444;
}


.empty-library h2 {
    color: #aaa;

    font-size: 22px;
}


.empty-library p {
    font-size: 14px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

    .sidebar {
        width: 70px;
    }

    .sidebar-logo span,
    .nav-item span,
    .logout-btn span {
        display: none;
    }

    .sidebar-logo {
        justify-content: center;

        padding: 10px;
    }

    .nav-item {
        justify-content: center;
    }

    .logout-btn {
        justify-content: center;
    }

    .main-content {
        margin-left: 70px;

        width: calc(100% - 70px);

        padding: 20px;
    }

    .topbar {
        align-items: flex-start;

        gap: 20px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .user-box {
        padding: 7px;
    }

    .user-box>div:last-child {
        display: none;
    }

}