@font-face {
    font-family: Farsi_Vazir_Normal;
    src: url(../../media/font/Vazir.ttf);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: #111111;
    color: #ffffff;
    font-family: Farsi_Vazir_Normal, Arial, sans-serif;
    overflow-x: hidden;
}

.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;
    z-index: 1000;
}

.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 span {
    color: white;
}

.sidebar-logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.nav-item {
    width: 90%;
    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;
    margin: 5%;
    transition: 0.2s;
}

.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;
    gap: 20px;
}

.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;
    flex-shrink: 0;
}

.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;
    min-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;
}


/* =========================
   GAME VIEW
========================= */

.box-game-view {
    width: 90%;
    margin: 5%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100px;
    height: 80px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.2s;
}

.box-game-view:hover {
    transform: scale(1.02);
}

.p-name-bgv {
    position: absolute;
    background-color: rgba(17, 17, 17, 0.9);
    width: 80%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 7px 10px;
    margin: 0;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-size: 14px;
}


/* =========================
   FULL GAME
========================= */

.sec-full-game {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 40px;
}


/* =========================
   GAME BANNER
========================= */

.box-banner {
    width: 100%;
    height: 500px;
    border-radius: 30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: green;
    overflow: hidden;
}

.p-name-gf {
    color: white;
    text-align: center;
    font-size: 30px;
    margin: 20px;
}

.p-desck-gf {
    color: yellowgreen;
    direction: rtl;
    padding: 15px;
    background-color: #333;
    border-radius: 10px;
    margin: 20px;
    line-height: 1.9;
    word-break: break-word;
}


/* =========================
   DOWNLOAD BUTTON
========================= */

.download-btn2 {
    background-color: yellowgreen;
    margin: 20px;
    color: #111111;
    border-radius: 10px;
    width: fit-content;
    max-width: calc(100% - 40px);
    float: right;
    height: fit-content;
    padding: 10px 18px;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.download-btn2:hover {
    background-color: #9fc477;
    color: #111111;
}


/* =========================
   TABLET
========================= */

@media (max-width: 992px) {

    .sidebar {
        width: 80px;
    }

    .sidebar-logo {
        justify-content: center;
        padding: 10px;
    }

    .sidebar-logo span {
        display: none;
    }

    .nav-item {
        width: 90%;
        justify-content: center;
        padding: 13px 5px;
        margin: 5%;
    }

    .nav-item span {
        display: none;
    }

    .logout-btn {
        justify-content: center;
        padding: 12px 5px;
    }

    .logout-btn span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        padding: 25px;
    }

    .box-banner {
        height: 400px;
        border-radius: 22px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill,
                minmax(220px, 1fr));
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .sidebar {
        width: 65px;
    }

    .sidebar-logo {
        height: 65px;
        padding: 8px;
    }

    .sidebar-logo img {
        width: 38px;
        height: 38px;
    }

    .nav-item {
        padding: 11px 5px;
        font-size: 14px;
    }

    .main-content {
        margin-left: 65px;
        width: calc(100% - 65px);
        padding: 15px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 25px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .topbar p {
        font-size: 12px;
    }

    .user-box {
        width: 100%;
        justify-content: flex-start;
    }

    .user-box>div:last-child {
        display: block;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-image {
        height: 190px;
    }

    .game-content {
        padding: 15px;
    }

    .box-game-view {
        width: 100%;
        margin: 0 0 12px 0;
        height: 90px;
        min-height: 90px;
    }

    .p-name-bgv {
        width: 85%;
        font-size: 13px;
    }

    .sec-full-game {
        padding: 0;
    }

    .box-banner {
        width: 100%;
        height: 250px;
        border-radius: 15px;
        background-size: cover;
    }

    .p-name-gf {
        font-size: 24px;
        margin: 15px 5px;
    }

    .p-desck-gf {
        margin: 15px 0;
        padding: 12px;
        font-size: 13px;
        line-height: 1.8;
    }

    .download-btn2 {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 15px 0;
        text-align: center;
    }

    .empty-library {
        min-height: 300px;
        padding: 20px;
    }

    .empty-library i {
        font-size: 45px;
    }

    .empty-library h2 {
        font-size: 19px;
    }

    .empty-library p {
        font-size: 13px;
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .sidebar {
        width: 55px;
    }

    .main-content {
        margin-left: 55px;
        width: calc(100% - 55px);
        padding: 10px;
    }

    .sidebar-logo {
        height: 60px;
    }

    .sidebar-logo img {
        width: 34px;
        height: 34px;
    }

    .nav-item {
        margin: 5%;
        padding: 10px 3px;
    }

    .nav-item i {
        width: 100%;
    }

    .topbar h1 {
        font-size: 21px;
    }

    .user-box {
        padding: 7px 10px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
    }

    .box-game-view {
        height: 75px;
        min-height: 75px;
    }

    .p-name-bgv {
        font-size: 12px;
        padding: 6px;
    }

    .box-banner {
        height: 190px;
        border-radius: 12px;
    }

    .p-name-gf {
        font-size: 20px;
    }

    .p-desck-gf {
        font-size: 12px;
        padding: 10px;
        margin: 10px 0;
    }

    .download-btn2 {
        font-size: 13px;
        padding: 9px 12px;
    }

    .game-image {
        height: 160px;
    }

    .game-title {
        font-size: 16px;
    }

    .game-description {
        font-size: 12px;
    }
}

/* =====================================================
   ADDITIONS  -> paste at the END of panel.css
   (also delete the old .sidebar-bottom / .logout-btn
    rules if you like; they are no longer used)
===================================================== */

/* hidden sections (shown by JS) */
.sec-payments,
.sec-profile {
    display: none;
}

/* logout next to player name */
.logout-mini {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding-left: 0;
    border-radius: 8px;
    background: #292929;
    color: #aaa;
    text-decoration: none;
    transition: 0.2s;
    flex-shrink: 0;
}

.logout-mini:hover {
    background: #3a2222;
    color: #ff6666;
}

/* generic card */
.panel-card {
    background: #1b1b1b;
    border: 1px solid #303030;
    border-radius: 12px;
    padding: 22px;
}

/* payments table */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.payments-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.payments-table th {
    color: #888;
    font-size: 13px;
    font-weight: normal;
    text-align: right;
    padding: 12px 14px;
    border-bottom: 1px solid #303030;
}

.payments-table td {
    padding: 14px;
    font-size: 14px;
    border-bottom: 1px solid #262626;
    text-align: right;
}

.payments-table tr:last-child td {
    border-bottom: 0;
}

.payments-table tbody tr:hover {
    background: #222;
}

.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-status.success {
    background: rgba(139, 174, 102, .15);
    color: #8BAE66;
}

.badge-status.pending {
    background: rgba(240, 180, 60, .15);
    color: #f0b43c;
}

.badge-status.failed {
    background: rgba(255, 102, 102, .15);
    color: #ff6666;
}

/* profile form */
.profile-card {
    max-width: 560px;
}

.form-row-panel {
    margin-bottom: 18px;
}

.form-row-panel label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    color: #ccc;
    text-align: right;
}

.form-row-panel label small {
    color: #777;
}

.panel-input {
    width: 100%;
    background: #111;
    border: 1px solid #303030;
    border-radius: 8px;
    color: #fff;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.panel-input:focus {
    border-color: #8BAE66;
}

.panel-hr {
    border: 0;
    border-top: 1px solid #303030;
    margin: 22px 0;
    opacity: 1;
}

.profile-msg {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: right;
}

.profile-msg.ok {
    background: rgba(139, 174, 102, .15);
    color: #8BAE66;
}

.profile-msg.err {
    background: rgba(255, 102, 102, .15);
    color: #ff6666;
}

#profile-submit i {
    margin-left: 7px;
}

@media (max-width: 768px) {
    .panel-card {
        padding: 14px;
    }

    .user-box {
        justify-content: space-between !important;
    }
}

/* =====================================================
   FULL GAME VIEW  ->  save as css/panel-game.css
===================================================== */

.sec-full-game {
    padding-bottom: 40px;
}

/* back */
.gv-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1b1b1b;
    border: 1px solid #303030;
    color: #aaa;
    padding: 9px 18px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 18px;
    transition: .2s;
}

.gv-back:hover {
    color: #8BAE66;
    border-color: #8BAE66;
}

.gv-back i {
    transition: transform .2s;
}

.gv-back:hover i {
    transform: translateX(4px);
}

/* hero */
.gv-hero {
    position: relative;
    height: 440px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid #303030;
    background: #1b1b1b;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
}

.gv-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.12);
}

.gv-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, rgba(17, 17, 17, .97) 6%, rgba(17, 17, 17, .55) 45%, rgba(17, 17, 17, .1) 80%),
        linear-gradient(to right, rgba(17, 17, 17, .5), transparent 60%);
}

.gv-hero-content {
    width: 100%;
    padding: 34px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.gv-badge {
    position: absolute;
    top: 22px;
    left: 22px;
    background: rgba(17, 17, 17, .75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(139, 174, 102, .5);
    color: #8BAE66;
    font-size: 12px;
    padding: 7px 15px;
    border-radius: 100px;
}

.gv-badge i {
    margin-left: 6px;
}

.gv-title {
    margin: 0;
    font-size: clamp(28px, 4.5vw, 52px);
    line-height: 1.3;
    font-weight: bold;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .6);
    flex: 1;
    min-width: 220px;
    color: #fff;
}

/* download buttons */
.gv-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #8BAE66;
    color: #111;
    font-weight: bold;
    font-size: 16px;
    padding: 15px 34px;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 10px 30px -8px rgba(139, 174, 102, .6);
    transition: .25s;
    flex-shrink: 0;
}

.gv-download:hover {
    background: #9fc477;
    color: #111;
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -8px rgba(139, 174, 102, .75);
}

.gv-download:hover i {
    animation: gvArrow .6s ease infinite alternate;
}

@keyframes gvArrow {
    to {
        transform: translateY(4px);
    }
}

/* body grid (چیدمان با بوت‌استرپ) */
.gv-grid {
    margin-top: 22px;
}

.gv-card {
    background: #1b1b1b;
    border: 1px solid #303030;
    border-radius: 20px;
    padding: 24px;
}

.gv-about h3 {
    margin: 0 0 16px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gv-about h3 i {
    color: #8BAE66;
}

.gv-desc {
    margin: 0;
    color: #cfcfcf;
    font-size: 15px;
    line-height: 2.1;
    text-align: right;
    white-space: pre-line;
    word-break: break-word;
}

/* side */
.gv-side {
    padding: 14px;
    position: sticky;
    top: 20px;
}

.gv-poster {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    background: #252525;
}

.gv-facts {
    list-style: none;
    margin: 16px 6px 18px;
    padding: 0;
}

.gv-facts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #292929;
    font-size: 13px;
}

.gv-facts li:last-child {
    border-bottom: 0;
}

.gv-facts span {
    color: #888;
}

.gv-facts span i {
    width: 20px;
    color: #8BAE66;
}

.gv-facts b {
    color: #fff;
    font-weight: normal;
}

.gv-download-side {
    width: 100%;
    box-shadow: none;
    padding: 13px;
    font-size: 15px;
    border-radius: 12px;
}

/* entrance (runs each time a game opens) + skeleton */
.sec-full-game.gv-enter .gv-hero {
    animation: gvIn .6s ease both;
}

.sec-full-game.gv-enter .gv-hero-bg {
    animation: gvZoom 1.6s ease both;
}

@keyframes gvIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes gvZoom {
    from {
        transform: scale(1.2);
    }

    to {
        transform: scale(1.12);
    }
}

.sec-full-game.is-loading .gv-title,
.sec-full-game.is-loading .gv-desc {
    min-height: 1.4em;
    border-radius: 10px;
    background: linear-gradient(90deg, #252525 25%, #303030 50%, #252525 75%);
    background-size: 200% 100%;
    animation: gvShimmer 1.2s linear infinite;
}

.sec-full-game.is-loading .gv-desc {
    min-height: 120px;
}

@keyframes gvShimmer {
    to {
        background-position: -200% 0;
    }
}

/* responsive */
@media (max-width: 992px) {
    .gv-side {
        position: static;
    }

    .gv-hero {
        height: 360px;
        border-radius: 22px;
    }
}

@media (max-width: 768px) {
    .gv-hero {
        height: 300px;
        border-radius: 18px;
    }

    .gv-hero-content {
        padding: 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .gv-hero-content .gv-download {
        width: 100%;
        padding: 13px;
        font-size: 15px;
    }

    .gv-badge {
        top: 14px;
        left: 14px;
    }

    .gv-card {
        padding: 18px;
        border-radius: 16px;
    }

    .gv-desc {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .sec-full-game *,
    .sec-full-game *::before {
        animation: none !important;
        transition: none !important;
    }
}

.gv-updates h3 {
    margin: 0 0 16px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gv-updates h3 i {
    color: #8BAE66;
}

.gv-updates-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

.gv-update-item {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #111;
    border: 1px solid #292929;
    border-right: 3px solid #8BAE66;
    border-radius: 12px;
}

.gv-update-item:last-child {
    margin-bottom: 0;
}

.gv-update-date {
    display: block;
    font-size: 12px;
    color: #8BAE66;
    margin-bottom: 6px;
}

.gv-update-txt {
    margin: 0;
    color: #cfcfcf;
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-line;
    word-break: break-word;
    text-align: right;
}

.gv-updates-empty {
    color: #777;
    font-size: 14px;
    text-align: center;
    padding: 10px 0;
}

@media (max-width: 992px) {
    .gv-poster {
        height: 220px;
    }
}