/* ═══════ تم جدید سایت (بنفش/قرمز/سبز آبی) ═══════ */
:root{
  --bg:#110D1C;--surface:#1A1530;--surface-2:#221B3E;--line:#2C2547;
  --ink:#EDEAF7;--ink-dim:#A79FC4;
  --accent:#FF5D73;--teal:#35E0C8;--gold:#FFC857;
  --radius:14px;
  --font-body:"Vazirmatn",system-ui,sans-serif;
  --font-display:"Lalezar",var(--font-body);
  --font-mono:"IBM Plex Mono",monospace;
}

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

html{ background:var(--bg); }
body {
    font-family: var(--font-body);
    font-size:16px;
    line-height:1.9;
    background:var(--bg);
    color:var(--ink);
    min-height:100vh;
    background:var(--bg);
}

@property --halo { syntax: "<color>"; inherits: false; initial-value: rgba(195,50,165,.95); }
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    --halo: rgba(195,50,165,.95);
    background: linear-gradient(90deg, transparent 0%, var(--halo) 50%, transparent 100%);
    filter: blur(6px);
    pointer-events: none;
    z-index: 9999;
    animation: haloRGB 9s linear infinite;
}
@keyframes haloRGB {
    0%   { --halo: rgba(195,50,165,.95); }
    33%  { --halo: rgba(140,230,60,.95); }
    66%  { --halo: rgba(53,224,200,.95); }
    100% { --halo: rgba(195,50,165,.95); }
}

.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0;
    color: var(--ink);
}

.games-page .home-layout,
.side-page .home-layout {
    padding-top: 1.25rem;
}

.games-page {
    padding: 0 1.25rem;
}

header h1 {
    color: var(--ink);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    text-shadow: none;
}

.suggestive-search {
    position: relative;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto 1.5rem;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: border-color 0.3s;
    min-height: 2.5rem;
    box-sizing: border-box;
}

.search-wrapper:focus-within {
    border-color: var(--teal);
}

.search-input {
    background: transparent;
    outline: none;
    color: var(--ink);
    width: 100%;
    font-size: 0.875rem;
    border: none;
    font-family: inherit;
    padding: 0;
    margin: 0;
}

.search-overlay {
    position: absolute;
    top: 0;
    left: 2.5rem;
    right: 1rem;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.search-placeholder {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #94a3b8;
}

.typewriter-cursor {
    width: 2px;
    height: 1em;
    background: #94a3b8;
    margin-left: 0.25rem;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.slide-effect,
.fade-effect {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 2.5rem;
    right: 1rem;
    text-align: right;
}

.slide-up {
    animation: slideUp 0.7s ease-out;
}

.slide-down {
    animation: slideDown 0.4s ease-in;
}

@keyframes slideUp {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.fade-in {
    animation: fadeIn 0.7s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease-in forwards;
}

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

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

.suggestive-search .search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
}

.search-results {
    position: absolute;
    background: #366549;
    border: 1px solid #366549;
    border-radius: 12px;
    margin-top: 4px;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    scrollbar-width: thin;
    scrollbar-color: var(--line) var(--surface);
}
.search-results::-webkit-scrollbar {
    width: 6px;
}
.search-results::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 3px;
}
.search-results::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 3px;
}
.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--teal);
}

.search-results div {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.search-results div:last-child {
    border-bottom: none;
}

.search-results div:hover {
    background: var(--surface-2);
}

.mega-menu {
    margin-bottom: 2rem;
    position: relative;
}

.mega-menu .menu-item {
    position: static;
}

.mega-menu .menu-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu .menu-item {
    position: relative;
}

.mega-menu .menu-item > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.mega-menu .menu-item > a:hover {
    background: var(--surface-2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.mega-menu .menu-item a i {
    font-size: 1rem;
}

/* Mega Dropdown - Modern Style */
.mega-menu .mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    width: fit-content;
    min-width: 700px;
    max-width: 95vw;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mega-menu .menu-item.mega-open .mega-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    transform: none !important;
}

/* Grid Layout */
.mega-menu-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-height: 650px;
    overflow-y: auto;
    direction: ltr;
}

.mega-menu-columns::-webkit-scrollbar {
    width: 6px;
}

.mega-menu-columns::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.mega-menu-columns::-webkit-scrollbar-track {
    background: transparent;
}

/* Column */
.mega-column {
    direction: rtl;
    min-width: 0;
}

.mega-menu .mega-dropdown .mega-column-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #5390C6;
    text-align: right;
    color: var(--accent);
}

.mega-menu .mega-dropdown .mega-column-title a {
    color: var(--accent);
    text-decoration: none;
}

.mega-menu .mega-dropdown .mega-column-title a i {
    color: var(--accent);
}

.mega-menu .mega-dropdown .mega-column li a i {
    font-size: 0.8rem;
    width: 1.2rem;
    text-align: center;
    opacity: 0.7;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column li {
    padding: 0;
    border: none;
}

.mega-menu .mega-dropdown .mega-column li a {
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
    font-weight: 400;
}

.mega-menu .mega-dropdown .mega-column li a:hover {
    background: rgba(53,224,200,.1);
    color: var(--ink);
}

.mega-menu .mega-dropdown .mega-column li a i {
    color: var(--accent);
    font-size: 0.8rem;
    width: 1.2rem;
    text-align: center;
    opacity: 1;
}

.mega-menu .mega-dropdown .mega-column li a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
}

.mega-column li a i {
    font-size: 0.8rem;
    width: 1.2rem;
    text-align: center;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1024px) {
    .mega-menu-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mega-menu .mega-dropdown {
        min-width: 240px;
        max-width: 90vw;
        padding: 1.25rem;
    }

    .mega-menu-columns {
        grid-template-columns: 1fr;
        max-height: 400px;
    }

    .mega-column-title {
        font-size: 0.95rem;
    }
}

.card {
    display: block;
    background: var(--surface);
    padding: 2rem 4rem;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.card h2 {
    color: var(--accent);
    font-size: 1.5rem;
}

.form-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: right;
}


.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 700;
    color: var(--ink);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea.additional-notes {
    min-height: 150px;
    height: 150px;
    width: 100%;
    display: block;
    padding: 0.75rem;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 50px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    overflow-y: hidden;
}

.textarea-placeholder {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #999;
    pointer-events: none;
    font-size: 0.9rem;
    font-family: inherit;
}

.textarea-placeholder span {
    display: inline-block;
}

.textarea-placeholder .cursor {
    width: 2px;
    height: 1.2em;
    background: #667eea;
    margin-right: 2px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.textarea-wrapper {
    position: relative;
    display: block;
}

.pin-attachment {
    position: absolute;
    bottom: 10px !important;
    left: 8px;
    width: 32px;
    height: 32px;
    background: #667eea;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.attachment-preview {
    position: absolute;
    bottom: 10px !important;
    right: 8px;
    left: 52px;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 5;
    max-width: none;
}

.pin-attachment:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.pin-attachment i {
    font-size: 18px;
}

.attachment-preview {
    position: absolute;
    bottom: 10px !important;
    right: 8px;
    left: 52px;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 5;
    max-width: none;
}

.attachment-preview:not(.hidden) {
    display: flex;
}

.attachment-preview.hidden {
    display: none;
}

.attachment-preview:not(.hidden) {
    display: flex;
}

.attachment-preview.hidden {
    display: none;
}

.attachment-thumbnail {
    position: relative;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #667eea;
    background: var(--surface);
}

.attachment-thumbnail img,
.attachment-thumbnail .pdf-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-thumbnail .pdf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.6rem;
}

.attachment-thumbnail .remove-attachment {
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.attachment-thumbnail .download-attachment {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.attachment-thumbnail .download-attachment:hover {
    background: #2980b9;
}

.form-group small {
    font-size: 0.85rem;
    color: var(--ink-dim);
}

.success-text {
    color: #27ae60;
}

.warning-text {
    color: #e74c3c;
    font-weight: 700;
}

.btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
}

.support-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #D48445;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 1000;
}

.support-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #FFCA88, transparent 65%);
    border-radius: 50%;
    z-index: 0;
}

.support-icon i {
    color: #FEFEDC;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: block;
}

.modal.active .modal-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.modal.active .support-layout {
    flex: 1;
    display: flex;
    min-height: 0;
    gap: 0;
    color: var(--ink);
}

.modal.active .support-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.modal.active .close-btn {
    font-size: 2rem;
    margin-left: 1rem;
    flex-shrink: 0;
    float: none;
    align-self: flex-start;
}

.modal.active .modal-content > h2 {
    margin: 0;
    padding: 1rem;
    color: var(--accent);
    flex-shrink: 0;
}

.modal.active .support-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
}

.modal.active .admin-chat-main {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.modal.active .admin-chat-header {
    padding: 0.7rem 0.9rem;
    flex-shrink: 0;
}

.modal.active .admin-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 0;
    max-height: none;
    background: var(--bg);
}

.modal.active .admin-chat-header .back-link {
    display: none;
}

.modal.active .admin-chat-messages .message {
    margin: 0;
}

.modal.active .admin-chat-input-area {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
    flex-shrink: 0;
}

.modal.active .sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal.active .sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--ink);
}

.modal.active .new-chat-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--surface-2);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.modal.active .new-chat-btn:hover {
    background: var(--accent);
    color: white;
}

.modal.active .conversations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal.active .conversation-item {
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-align: right;
}

.modal.active .conversation-item:hover {
    border-color: var(--teal);
    background: var(--surface);
}

.modal.active .conversation-item.active {
    background: var(--teal);
    color: var(--bg);
}

.modal.active .conversation-item .conv-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.modal.active .conversation-item .conv-date {
    font-size: 0.75rem;
    color: var(--ink-dim);
}

.modal.active .conversation-item.active .conv-date {
    color: rgba(255, 255, 255, 0.8);
}

.modal.active .support-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.modal.active .support-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal.active .admin-chat-input-area textarea {
    width: 100%;
    min-height: 100px;
    max-height: 300px;
    display: block;
    padding: 0.7rem 0.75rem;
    padding-bottom: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    overflow-y: auto;
    pointer-events: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.modal.active .admin-chat-input-area textarea::-webkit-scrollbar {
    display: none;
}
.modal.active .admin-chat-input-area textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(53, 224, 200, 0.1);
}

.modal.active .admin-chat-input-area .pin-attachment {
    position: absolute;
    bottom: 8px;
    left: 54px;
    width: 38px;
    height: 38px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 16px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.modal.active .admin-chat-input-area .pin-attachment:hover {
    background: var(--gold);
    transform: scale(1.05);
}

.modal.active .admin-chat-input-area .admin-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--teal);
    color: var(--bg);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 10;
}
.modal.active .admin-chat-input-area .admin-send-btn:hover {
    background: var(--accent);
    transform: translateY(-1px);
}
.modal.active .admin-chat-input-area .admin-send-btn:active {
    transform: scale(0.95);
}
.modal.active .admin-chat-input-area .admin-send-btn:disabled {
    background: var(--line);
    color: var(--ink-dim);
    cursor: not-allowed;
    transform: none;
}

.modal.active .admin-chat-input-area .char-counter {
    position: absolute;
    bottom: 8px;
    left: 96px;
    font-size: 0.7rem;
    color: var(--ink-dim);
    white-space: nowrap;
    line-height: 38px;
}

.modal.active .admin-chat-input-area .attachment-preview {
    position: absolute;
    bottom: 8px;
    right: 8px;
    left: 140px;
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 4;
}
.modal.active .admin-chat-input-area .attachment-preview:not(.hidden) {
    display: flex;
}

.modal-content {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-width: 200px;
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.modal-content p {
    margin: 0.5rem 0;
    color: var(--ink);
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.support-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.support-option {
    display: block;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    text-align: center;
    font-weight: 500;
}

.support-option i {
    margin-left: 0.5rem;
    color: var(--accent);
}

.date-fields {
    display: flex;
    gap: 0.5rem;
}

.date-fields input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.info-item {
    padding: 0.5rem 0;
}

.btn-confirm {
    background: #27ae60;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    width: 100%;
}

.chat-container {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.message[data-role="customer"],
.message.support {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.customer-username {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1b5e20;
    display: block;
}

.message {
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

.bubble {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
}

.message.user .bubble {
    background: #667eea;
    color: white;
    border-radius: 16px 4px 16px 16px;
}

.message.support .bubble {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 16px 16px 16px 4px;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.chat-input button {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.profile-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #D48445;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 1000;
}

.profile-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #FFCA88, transparent 65%);
    border-radius: 50%;
    z-index: 0;
}

.profile-icon i {
    color: #FEFEDC;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.profile-field label {
    font-weight: 700;
    color: var(--ink);
}

.field-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.edit-btn {
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
}

.order-icons {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.order-item {
    text-align: center;
}

.order-icon {
    display: block;
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.3rem;
    text-decoration: none;
}

.order-item small {
    display: block;
    margin-top: 0.3rem;
    color: var(--ink);
    font-size: 0.8rem;
}

.order-icon {
    position: relative;
}

.order-icon .order-count {
    position: absolute;
    top: -6px;
    left: -6px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: inherit;
    line-height: 1;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--ink-dim);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    font-weight: 400;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .card {
        padding: 1.5rem 2rem;
    }
    
    .form-card {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .date-fields {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .date-fields input {
        width: 100%;
    }
    
    .btn-next {
        width: 100%;
        padding: 0.8rem 1rem;
    }
    
    .order-icons {
        flex-wrap: wrap;
    }
    
    .order-item {
        flex: 1 1 30%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .card h2 {
        font-size: 1.2rem;
    }
    
    .profile-field {
        padding: 0.3rem 0;
    }
    
    .chat-container {
        height: 300px;
        padding: 0.5rem;
    }
}

.banner-dots {
    text-align: center;
    margin-top: 1rem;
}

.banner-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot:hover {
    transform: scale(1.2);
}

.banner-dot.active {
    background: #667eea !important;
}

.banner-dot:not(.active) {
    background: #ccc;
}

.banner {
    position: relative;
    display: inline-block;
    margin: 0 auto 1rem;
}

.banner img {
    width: 600px;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.banner-link {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .banner img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

.banner-preview {
    margin-bottom: 1rem;
    text-align: center;
}

.banner-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.logo-icon {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    background: #D48445;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 1000;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #FFCA88, transparent 65%);
    border-radius: 50%;
    z-index: 0;
}

.logo-icon i {
    color: #FEFEDC;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.password-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--ink-dim);
    user-select: none;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 4px;
    z-index: 2;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--ink-dim);
    user-select: none;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 4px;
    z-index: 2;
}

.input-wrapper input {
    padding-left: 2.5rem !important;
}

.pricing-category-list,
.pricing-group-list,
.pricing-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-category-list li,
.pricing-group-list li,
.pricing-service-list li {
    padding: 0.9rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 3px solid transparent;
}

.pricing-category-list li:hover,
.pricing-group-list li:hover {
    background: var(--surface-2);
    border-right-color: var(--teal);
}

.pricing-service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-right: 3px solid var(--teal);
}

.pricing-service-item .service-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.pricing-service-item .service-title {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.95rem;
}

.pricing-service-item .service-price {
    font-size: 0.85rem;
    color: var(--ink-dim);
}

.pricing-service-item .service-price.has-price {
    color: #27ae60;
    font-weight: 700;
}

.pricing-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--ink-dim);
    flex-wrap: wrap;
}

.pricing-breadcrumb span {
    cursor: pointer;
    transition: color 0.2s;
}

.pricing-breadcrumb span:hover {
    color: var(--accent);
}

.pricing-breadcrumb .sep {
    color: #999;
    cursor: default;
}

.pricing-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    color: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: background 0.2s;
}

.pricing-back-btn:hover {
    background: #dde4ff;
}

.set-price-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem 0.5rem;
    transition: color 0.2s;
}

.set-price-btn:hover {
    color: #5568d3;
}

.category-header,
.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 700;
    color: var(--ink);
    user-select: none;
}

.category-header:hover,
.group-header:hover {
    background: var(--surface-2);
}

.category-header .fa-chevron-left,
.group-header .fa-chevron-left {
    transition: transform 0.2s;
    font-size: 0.85rem;
    color: #999;
}

.category-body,
.group-body {
    padding-right: 0.8rem;
    margin-top: 0.35rem;
    overflow: hidden;
}

.pricing-group-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.group-item {
    margin-bottom: 0.25rem;
}

.attachment-limit-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #37BBF7, #2D8ADE);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.attachment-limit-toast.show {
    opacity: 1;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.popup-content h3 {
    color: var(--ink);
    margin-bottom: 1rem;
}

.popup-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-popup-content {
    max-width: 760px;
    max-height: 85vh;
    overflow-y: auto;
}

.attachment-popup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.attachment-popup-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
}

.attachment-popup-media {
    width: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface);
}

.attachment-popup-media img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.popup-pdf-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f5f5f5;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.2rem;
}

.attachment-popup-name {
    margin-top: 0.6rem;
    color: var(--ink);
    font-size: 0.85rem;
    word-break: break-word;
}

.popup-image-wrapper {
    position: relative;
    width: 100%;
}

.popup-media-wrapper {
    position: relative;
    display: inline-block;
}

.popup-media-wrapper .popup-pdf-icon {
    position: relative;
    width: 72px;
    height: 72px;
}

.popup-download-icon {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 32px;
    height: 32px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.popup-download-icon:hover {
    background: #667eea;
    transform: scale(1.05);
}

.attachment-view-btn,
.detail-attachment-button,
.admin-attachment-view-btn,
.user-attachment-view-btn {
    border: none;
    background: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.05rem;
    margin-right: 0.5rem;
    padding: 0.2rem;
}

.form-actions .btn-confirm,
.form-actions .btn-next {
    margin: 0;
    width: auto;
}

.order-card {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 0.5rem 0;
    border-right: 3px solid #667eea;
}

.order-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
}

.status-pending {
    background: rgba(255,200,87,.12);
    color: #856404;
}

.status-btns {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.status-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    font-family: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.status-btn:hover {
    background: var(--surface-2);
}

.status-btn.active {
    background: #667eea;
    color: white;
    border-color: var(--accent);
}

.status-btn-pending.active {
    background: rgba(255,200,87,.12);
    color: #856404;
    border-color: #856404;
}

.status-btn-processing.active {
    background: #cce5ff;
    color: #004085;
    border-color: #004085;
}

.status-btn-completed.active {
    background: #d4edda;
    color: #155724;
    border-color: #155724;
}

.support-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.support-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.support-tab:hover {
    background: var(--surface-2);
}

.support-tab.active {
    background: #667eea;
    color: white;
}

.support-panel {
    max-height: 400px;
    overflow-y: auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: right;
}

.faq-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-right: 3px solid #667eea;
}

.faq-item strong {
    display: block;
    color: var(--ink);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.faq-item p {
    color: var(--ink-dim);
    font-size: 0.85rem;
    margin: 0;
}


.modal-content {
    max-width: 420px;
}

.success-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.tracking-code {
    font-size: 1.2rem;
    color: var(--ink);
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f5f5f5;
    border-radius: 8px;
    display: inline-block;
    direction: ltr;
}

.order-title {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.order-actions {
    margin-top: 0.75rem;
    text-align: center;
}

.btn-view-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.btn-view-detail:hover {
    background: #5568d3;
}

.order-detail-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

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

.detail-label {
    font-weight: 700;
    color: var(--ink);
    flex-shrink: 0;
}

.detail-value {
    color: var(--ink);
    text-align: left;
    direction: ltr;
    word-break: break-word;
}

.detail-value-with-attachment {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.detail-notes-text {
    direction: rtl;
    unicode-bidi: plaintext;
}

.detail-attachment-button {
    flex-shrink: 0;
}

.price-value {
    direction: rtl;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.paid-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    background: #d4edda;
    color: #155724;
}

.badge {
    background: #e74c3c;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 8px;
    line-height: 1.2;
}

.chat-messages .message.unread {
    border-right: 3px solid #e74c3c;
}

.chat-messages {
    display: flex !important;
    flex-direction: column !important;
}

.chat-messages .message {
    max-width: 80%;
}

.chat-messages .message.user {
    align-self: flex-start;
}

.chat-messages .message.support,
.chat-messages .message[data-role="customer"] {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.chat-messages .message-text {
    display: block;
    width: 100%;
}

.cost-value {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1rem;
}

.service-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    direction: rtl;
}

.service-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.service-btn img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.service-label {
    width: 170px;
    padding: 0.5rem 0;
    text-align: center;
    color: var(--accent);
    font-weight: 500;
    font-size: 1rem;
    background: transparent;
}

@media (max-width: 768px) {
    .service-buttons {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .service-btn img {
        width: 150px;
        height: 150px;
    }
    
    .service-label {
        width: 150px;
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
}

.btn-back {
    background: #999;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-back:hover {
    background: #777;
}

.quick-access {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
}

.quick-label {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.quick-link {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .quick-access {
        margin-top: 1rem;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .quick-label {
        font-size: 0.8rem;
    }
    
    .quick-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .quick-access {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 1rem;
        padding-left: 1rem;
    }
    
    .quick-label {
        margin-bottom: 0.25rem;
    }
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    color: var(--ink);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
    border-color: var(--teal);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--ink);
}

.subcategory-list {
    text-align: center;
}

.subcategory-list h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.grid-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.grid-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.grid-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.25);
}

.service-info {
    text-align: center;
    margin-top: 2rem;
}

.service-info p {
    color: white;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.accordion {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    cursor: pointer;
    color: white;
    font-weight: 500;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.15);
}

.accordion-header i {
    transition: transform 0.3s;
}

.accordion-header.active i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 500px;
}

.accordion-content a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-content a:last-child {
    border-bottom: none;
}

.accordion-content a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.games-header {
    margin-bottom: 1.5rem;
    direction: rtl;
}

.games-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.25rem 0 1rem;
}

.games-filters {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-field {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.6rem 0 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-dim);
}

.filter-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.18);
}

.filter-field > i {
    font-size: 0.8rem;
    color: var(--accent);
}

.games-page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.filter-select {
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 150px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-field .filter-select {
    padding: 0.55rem 0.25rem 0.55rem 0.6rem;
    border: none;
    background: transparent;
    min-width: 0;
}

.hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 120, 20, 0.45);
    background: rgba(255, 120, 20, 0.12);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.hot-badge:hover {
    background: rgba(255, 120, 20, 0.22);
}

.hot-badge.off {
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(148, 163, 184, 0.1);
}

.hot-badge.off .hot-label {
    color: #94a3b8;
}

.hot-badge.off .hot-flame {
    filter: grayscale(1) opacity(0.55);
    animation: none;
}

 .hot-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffb066;
}

 .hot-flame {
    display: inline-block;
    font-size: 22px;
    line-height: 1;
    animation: hot-flame-flicker 0.9s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
    cursor: default;
}

@keyframes hot-flame-flicker {
    from {
        transform: scale(1) rotate(-4deg);
        filter: drop-shadow(0 0 5px rgba(255, 140, 20, 0.65));
    }
    to {
        transform: scale(1.18) rotate(4deg);
        filter: drop-shadow(0 0 14px rgba(255, 70, 0, 0.9));
    }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.game-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
    border-color: var(--teal);
}

.game-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.game-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.game-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(53, 224, 200, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.game-price {
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.game-date {
    font-size: 0.85rem;
    color: var(--ink-dim);
}

.trending-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1.25rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: #5568d3;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-info {
    color: white;
    font-weight: 500;
}

.loading, .no-games {
    color: white;
    font-size: 1.2rem;
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

.game-list-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0 2rem;
    min-height: 60px;
}

.game-list-end .loading,
.game-list-end .no-games {
    grid-column: auto;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.game-list-end .loading::before {
    content: '';
    display: block;
    width: 26px;
    height: 26px;
    margin: 0 auto 0.5rem;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--teal, #35e0c8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.load-more-btn {
    background: var(--teal, #35e0c8);
    color: #03241f;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.load-more-btn:hover {
    background: var(--teal-bright, #4fec9a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(53, 224, 200, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-arrow {
    display: inline-block;
    font-size: 0.8em;
    margin-right: 0.35rem;
    animation: arrowPulse 1.6s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@media (max-width: 768px) {
    /* موبایل و تبلت کوچک: همیشه یک ستون */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ========== RAWG Games Styles ========== */

.search-section {
    margin-bottom: 1.5rem;
}

/* چیدمان کارت‌ها: دسکتاپ همیشه دو ستون. برای جلوگیری از حالت‌های
   میانیِ تعدادستونیِ متغیر (که در عرض‌های میانی ۳ یا ۴ ستون می‌شدند)،
   مقدار صریح نوشته شده و شکستن چیدمان فقط در نقطه‌ی استاندارد ۷۶۸px
   انجام می‌شود: زیر ۷۶۸ یک ستون، ۷۶۸ به بالا دو ستون. */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.game-card {
    position: relative;
    background: #110D1C;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card-bgblur {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(34px) saturate(1.25) brightness(0.6);
    transform: scale(1.35);
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.games-grid .game-card {
    padding: 0;
    border: none;
}

.game-cover {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: transparent;
}

.admin-card-actions {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 6;
    display: flex;
    gap: 6px;
}

.admin-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.15s, transform 0.15s;
}

.admin-icon-btn:hover {
    background: #2563eb;
    transform: scale(1.08);
}

.admin-icon-btn.danger:hover {
    background: #dc2626;
}

.edit-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.edit-modal {
    width: min(92vw, 520px);
    max-height: 88vh;
    overflow-y: auto;
    background: #0f172a;
    border: 1px solid #1f2937;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    direction: rtl;
    text-align: right;
}

.edit-modal-title {
    margin: 0 0 16px;
    color: #f8fafc;
    font-size: 17px;
}

.edit-modal-label {
    display: block;
    margin: 12px 0 6px;
    color: #94a3b8;
    font-size: 13px;
}

.edit-modal-input {
    width: 100%;
    border: 1px solid #334155;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.edit-modal-textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.7;
}

.edit-modal-input:focus {
    outline: none;
    border-color: #2563eb;
}

.edit-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.edit-modal-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    background: #334155;
    color: #e2e8f0;
}

.edit-modal-btn.primary {
    background: #2563eb;
    color: #fff;
}

.edit-modal-btn.primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.edit-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.edit-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #1e293b;
    aspect-ratio: 16/9;
}

.edit-gallery-item.active {
    border-color: #34d399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

.edit-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.edit-gallery-actions {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    gap: 5px;
    z-index: 3;
}

.edit-gal-star,
.edit-gal-del {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: background 0.15s, transform 0.15s;
}

.edit-gal-star:hover,
.edit-gal-star.active {
    background: #f59e0b;
    transform: scale(1.08);
}

.edit-gal-del:hover {
    background: #dc2626;
    transform: scale(1.08);
}

.game-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card:hover .game-cover img {
    transform: scale(1.05);
}

.game-rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    color: #ffd84d;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
}

.game-cover-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35rem;
    margin: 0;
    z-index: 2;
    padding: 1.2rem 0.6rem 0.35rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.85);
}

.game-info {
    position: relative;
    z-index: 1;
    padding: 1rem;
}

.game-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    min-width: 0;
}

.game-genres, .game-platforms {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: #e2e8f0;
    background: rgba(255,255,255,0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.game-genres {
    flex: 0 0 auto;
    direction: ltr;
    text-align: right;
    font-size: 0.9rem;
}

.game-platforms {
    flex: 1 1 auto;
    direction: ltr;
}

.game-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    white-space: nowrap;
}

.date-sep {
    margin: 0 0.4rem;
    color: #94a3b8;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* والد `<main>` متن را وسط‌چین می‌کند، پس این دکمه باید خودش را
   به ابتدای خط (سمت چپ در چیدمان راست‌به‌چپ) بچسباند. */
.side-page .back-btn,
.home-layout .back-btn {
    display: flex;
    width: fit-content;
    margin-left: 0;
    margin-right: auto;
}

.game-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.game-detail-hero {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    min-height: 300px;
    background: #0a2e28;
}

/* وقتی تصویر بنر لود شده، ارتفاع بنر باید با خود تصویر هماهنگ شود،
   وگرنه min-height باعث می‌شود زیر تصویر فضای خالی بماند و
   hero-overlay (که به پایین بنر چسبیده) روی تصویر نیفتد. */
.game-detail-hero:has(.hero-image) {
    min-height: 0;
}

.hero-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem;
    padding-top: 4rem;
}

.hero-overlay h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.game-meta-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #e2e8f0;
    backdrop-filter: blur(4px);
}

.tag.rating {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-weight: 700;
}

.game-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-section {
    background: rgba(255,255,255,0.04);
    padding: 1.5rem;
    border-radius: 12px;
}

.info-section h2 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.game-summary {
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* پاراگراف‌های متن معرفی با فاصله‌ی عمودی از هم جدا می‌شوند، نه با تورفتگی.
   اندازه‌گیریِ سایت‌های فارسیِ مرجع (BBC فارسی، خبرآنلاین، تک‌کرانچ فارسی،
   ویکی‌پدیای فارسی) نشان می‌دهد همه `text-indent: 0` دارند و پاراگراف را با
   `margin` جدا می‌کنند. تورفتگیِ خطِ اول قاعده‌ی متنِ چاپی/پایان‌نامه است، نه وب. */
.game-summary>p {
    margin: 0 0 1rem;
}

.game-summary>p:last-child {
    margin-bottom: 0;
}

/* راست‌چین، نه توجیه. «توجیه» در وب فارسی توصیه نمی‌شود چون مرورگرها کشیده‌گذاری
   (kashida) ندارند و برای پر کردن خط فقط فاصله‌ی کلمات را می‌کشند؛ نتیجه همان
   «رودخانه‌ی فضای سفید» است که خوانایی را خراب می‌کند. `start` جهتِ خودِ
   عنصر را می‌پیروی کند، پس متنِ لاتینِ بازنویسی‌نشده هم درست می‌ماند. */
.about-text .game-summary {
    text-align: start;
}

.about-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.reviews-rich {
    margin-top: 1.75rem;
}

.mc-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.mc-score-block {
    flex: 1 1 260px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.1rem;
}

.mc-score-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
}

.mc-score-value {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.35rem;
    direction: ltr;
    text-align: left;
}

.mc-score-value small {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 400;
}

.mc-score-inline {
    direction: ltr;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.mc-score-inline small {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

.mc-li-score {
    direction: ltr;
    font-weight: 800;
}

.mc-li-score small {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

.mc-meter {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #1e293b;
}

.mc-meter i {
    display: block;
    height: 100%;
}

.cs-bar i.cs-seg {
    cursor: pointer;
    transition: filter 0.15s ease;
}

.cs-bar i.cs-seg:hover {
    filter: brightness(1.25);
}

.cs-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.6rem;
    /* چیدمان RTL: ترتیب رنگ‌ها با ترتیب نوار بالا یکی می‌ماند */
    direction: rtl;
}

.cs-legend-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 1px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cs-legend-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* نقطه‌ی رنگی راهنما. `display:block` و اندازه در CSS می‌آید، نه در
   استایل درون‌خطی، چون width/height روی عنصر inline بی‌اثر است و
   در بعضی مرورگرها (سافاری با کش قدیمی) نقطه نامرئی می‌شد. */
.cs-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    margin-left: 0.22rem;
}

.cs-tip {
    position: absolute;
    z-index: 9999;
    top: 0;
    left: 0;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.cs-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.mc-meter-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    margin-top: 0.55rem;
    font-size: 0.72rem;
    color: #94a3b8;
    justify-content: center;
}

.mc-meter-legend span {
    display: inline-flex;
    align-items: center;
}

.mc-meter-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.3rem;
}

.review-cards-section {
    margin-bottom: 1.75rem;
}

.review-list-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin: 1.5rem 0 0.9rem;
}

.review-list-head h3 {
    color: #fff;
    font-size: 1.05rem;
    margin: 0;
}

.review-list-head h3 i {
    color: #34d399;
    margin-left: 0.4rem;
}

.review-list-head span {
    color: #94a3b8;
    font-size: 0.78rem;
}

.review-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.review-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.review-score {
    flex: 0 0 auto;
    min-width: 3rem;
    height: 3rem;
    padding: 0 0.9rem;
    border: none;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1;
    color: #05120F;
    background: linear-gradient(135deg, #4DE8D0, #35E0C8 55%, #22C3A8);
    box-shadow: 0 12px 30px -10px rgba(53, 224, 200, 0.55);
}

.review-card-meta {
    min-width: 0;
    direction: ltr;
    text-align: left;
}

.review-card-meta strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.review-card-meta span {
    color: #94a3b8;
    font-size: 0.75rem;
    direction: rtl;
}

.review-quote {
    color: #cbd5e1;
    font-size: 0.85rem;
    line-height: 1.75;
    margin: 0;
    direction: rtl;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-quote.long.open {
    display: block;
    overflow: visible;
}

.review-quote.long {
    cursor: pointer;
}

.review-more {
    align-self: flex-start;
    background: none;
    border: none;
    color: #34d399;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
}

.review-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.review-card-date {
    color: #94a3b8;
    font-size: 0.78rem;
    direction: rtl;
}

.review-full-link {
    display: inline-block;
    color: #60a5fa;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.review-full-link i.review-link__icon {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    vertical-align: -1px;
}

.review-full-link:hover {
    text-decoration: underline;
}

.review-plat {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
}

.review-card-meta .review-plat {
    display: inline-block;
    margin-top: 0.3rem;
}

.review-seeall-wrap {
    margin-top: 1rem;
    text-align: left;
}

.review-seeall {
    display: inline-block;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    transition: all 0.2s;
}

.review-seeall:hover {
    color: #fff;
    border-color: rgba(148, 163, 184, 0.6);
}

.review-card.user .review-score {
    border-radius: 50%;
}

.about-layout .about-text {
    flex: 1 1 auto;
    min-width: 0;
}

.about-layout .game-specs {
    width: 100%;
    padding: 0.25rem 0;
}

.game-specs-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.game-card .game-summary {
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.55;
    overflow: hidden;
    max-height: calc(0.78rem * 1.55 * 2);
    margin-top: 0.4rem;
    word-break: break-word;
    direction: rtl;
    text-align: right;
}

@media (max-width: 640px) {
.game-card .game-summary {
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.4rem;
    word-break: break-word;
}

.about-layout {
        flex-direction: column;
    }
    .about-layout .game-specs {
        flex: 1 1 auto;
        width: 100%;
    }
}

.info-list {
    list-style: none;
    color: #cbd5e1;
}

.info-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.info-list strong {
    color: #94a3b8;
    margin-left: 0.5rem;
}

/* ── نسخه موبایل: مشخصات بازی در دو ستون + انتقال پلتفرم/ژانر از روی بنر ── */
@media (max-width: 768px) {
    .game-meta-tags .tag.spec-desktop-only {
        display: none;
    }

    /* عنوان بازی و تگ امتیاز در یک لاین */
    .hero-overlay {
        display: flex;
        flex-wrap: nowrap;
        align-items: baseline;
        justify-content: center;
        gap: 0.6rem;
        padding: 0.85rem 1rem;
    }
    .hero-overlay h1 {
        flex: 0 1 auto;
        margin-bottom: 0;
        min-width: 0;
    }
    .hero-overlay .game-meta-tags {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        order: -1;
    }

    .info-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 0.85rem;
        align-content: start;
    }
    .info-list li {
        min-width: 0;
        padding: 0.55rem 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .info-list li.spec-mobile-only {
        display: block;
    }
    .info-list li.spec-hide-mobile {
        display: none;
    }
    .info-list strong {
        display: block;
        margin-left: 0;
        margin-bottom: 0.1rem;
        font-size: 0.78rem;
    }
}

@media (min-width: 769px) {
    .info-list li.spec-mobile-only {
        display: none;
    }
}

.stores-section, .screenshots-section, .similar-section {
    margin-bottom: 2rem;
}

.stores-section h2, .screenshots-section h2, .similar-section h2 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.store-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: #fff;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.screenshot {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.screenshot-wrap {
    position: relative;
}

.shot-del-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.15s, transform 0.15s;
}

.shot-del-btn:hover {
    background: #dc2626;
    transform: scale(1.08);
}

.screenshot:hover {
    transform: scale(1.02);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 92vw;
    max-height: 82vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox .lb-count {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 0.9rem;
}

/* ── گالری تصاویر بازی (الگوی صفحه‌ی خبر: تصویر اصلی + بندانگشتی) ── */
/* بدون پس‌زمینه و بدون کادر: گالری باید روی پس‌زمینه‌ی خودِ بخش بنشیند،
   نه اینکه یک مستطیل بنفش جدا از صفحه بسازد. */
.screenshots-section .gallery-container {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
}

.screenshots-section .images-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.screenshots-section .gallery-primary-wrap {
    position: relative;
}

.screenshots-section .image-button.primary {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    line-height: 0;
}

.screenshots-section .mini-thumb {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 0;
    direction: ltr;
    justify-content: center;
}

.screenshots-section .mini-thumb .image-button {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 10px;
    flex: 0 1 auto;
    /* اندازه‌ی بندانگشتی با عرض صفحه کوچک می‌شود (حداکثر ۱۲۰px مثل دسکتاپ) */
    width: clamp(72px, 28%, 120px);
    min-width: 0;
    transition: transform 0.2s;
    position: relative;
    line-height: 0;
}

.screenshots-section .mini-thumb .image-button img {
    width: 100%;
    aspect-ratio: 120 / 85;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.screenshots-section .mini-thumb .image-button:hover img {
    transform: scale(1.05);
}

.screenshots-section .mini-thumb .image-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    /* درصد در font-size نسبت به فونت والد حساب می‌شود، نه به عرض دایره،
       پس اندازه‌ی متن با عرض صفحه تنظیم می‌شود. */
    font-size: clamp(9px, 2.6vw, 14px);
    font-weight: 700;
    /* قطر نشان متناسب با اندازه‌ی بندانگشتی کوچک می‌شود (حداکثر ۴۲px) */
    width: min(42px, 54%);
    height: auto;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.screenshots-section .shots-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.screenshots-section .shots-more-btn:hover:not(:disabled) {
    background: var(--surface);
    transform: translateY(-1px);
}

.screenshots-section .shots-more-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.lightbox .lb-del {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s, transform 0.15s;
}

.lightbox .lb-del:hover {
    background: #ef4444;
    transform: scale(1.08);
}

.lightbox .lb-del:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.lb-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lb-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.lb-prev {
    right: 16px;
}

.lb-next {
    left: 16px;
}

@media (max-width: 768px) {
    .lb-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        bottom: 18px;
        top: auto;
        transform: none;
    }
    .lightbox .lb-count {
        margin-top: 0;
    }
}

.similar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.similar-head h2 {
    margin: 0;
}

/* ردیف «بازی‌های مشابه» همیشه اسکرول افقی است تا دکمه‌ی «همه»
   (عضو همین ردیف) هیچ‌وقت به لاین بعدی نیفتد */
.similar-grid {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 4px 2px 10px;
    scrollbar-width: none;
}

.similar-grid::-webkit-scrollbar {
    display: none;
}

.similar-card {
    flex: 0 0 auto;
    width: clamp(150px, 21%, 200px);
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
}

.similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.similar-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.similar-card h4 {
    padding: 0.75rem;
    color: #fff;
    font-size: 0.9rem;
    margin: 0;
}

.similar-card span {
    display: block;
    padding: 0 0.75rem 0.75rem;
    color: #ffd700;
    font-size: 0.8rem;
}

/* دکمه‌ی «همه» — مینیمال، بدون پس‌زمینه‌ی اضافه، همیشه در همان ردیف کارت‌ها */
.similar-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    align-self: stretch;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    background: none;
    border: none;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.similar-more:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.similar-more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: auto;
    height: 32px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.similar-more-icon b {
    font-size: 1rem;
    font-weight: 800;
}

/* ── موبایل: کارت‌ها و دکمه‌ی «همه» جمع می‌شوند تا اسکرول افقی فعال بماند ── */
@media (max-width: 768px) {
    .similar-grid {
        gap: 0.75rem;
        padding: 4px 1rem 10px;
        margin: 0 -1rem;
    }
    .similar-grid .similar-card {
        width: clamp(118px, 40%, 150px);
    }
    .similar-card h4 {
        font-size: 0.82rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.error {
    color: #ef4444;
    font-size: 1.2rem;
    text-align: center;
    padding: 3rem;
}

.game-detail .loading {
    color: white;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}

.game-detail-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sk-hero {
    height: 320px;
    border-radius: 20px;
    min-height: 320px;
}
.sk-title {
    height: 2.2rem;
    width: 45%;
    border-radius: 8px;
}
.sk-tags {
    display: flex;
    gap: 0.5rem;
}
.sk-tag {
    height: 1.9rem;
    width: 6.5rem;
    border-radius: 20px;
}
.sk-about-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.sk-line {
    height: 0.95rem;
    border-radius: 6px;
}
.sk-line.w90 { width: 90%; }
.sk-line.w75 { width: 75%; }
.sk-line.w60 { width: 60%; }
.sk-line.w100 { width: 100%; }
.sk-specs {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.sk-spec {
    height: 1.1rem;
    width: 55%;
    border-radius: 6px;
}
.sk-section-head {
    height: 1.4rem;
    width: 30%;
    border-radius: 6px;
}
.sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.sk-card {
    height: 180px;
    border-radius: 12px;
}
.loader-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .sk-hero, .sk-card { min-height: 220px; }
}

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

    .hero-overlay h1 {
        font-size: 1.4rem;
    }

    /* موبایل و تبلت کوچک: همیشه یک ستون */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .games-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .games-page-title {
        font-size: 1.25rem;
        text-align: center;
    }

    .games-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-field,
    .filter-select {
        width: 100%;
    }

    .filter-select {
        max-width: none;
    }

    .filter-field .filter-select {
        width: 100%;
    }

    .hot-badge {
        justify-content: center;
    }

    .screenshot-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}



/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface-2);
    border-radius: 10px;
    color: var(--ink-dim);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-icon:active {
    transform: scale(0.95);
    background: var(--teal);
    color: var(--bg);
}

.nav-icon i {
    font-size: 1.2rem;
}

/* Hide ALL old fixed/floating icons on mobile, show bottom nav instead */
@media (max-width: 768px) {
    /* Hide any fixed-position icon containers except bottom-nav */
    a[class*="icon"]:not(.nav-icon),
    .profile-icon,
    .support-icon,
    .floating-icon,
    .fixed-icon {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
    }

    /* Hide any fixed/sticky header elements that might contain icons */
    header,
    .header,
    .top-bar,
    .navbar {
        position: relative !important;
    }

    .bottom-nav {
        display: flex !important;
    }

    body {
        padding-bottom: 60px;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .profile-icon,
    .support-icon {
        display: none !important;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 60px;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 0.9rem;
    }

    .hero-overlay h1 {
        font-size: 1.2rem;
    }
}

/* Seller Grid Styles */
.seller-grid {
    margin-top: 2rem;
}

.sellers-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.seller-card {
    background: #1A1530;
    border: 1px solid #2C2547;
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.seller-card:hover {
    transform: scale(1.05);
    border-color: #35E0C8;
}

.seller-icon {
    margin-bottom: 1rem;
}

.seller-icon img {
    max-height: 60px;
    max-width: 120px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.seller-card h3 {
    color: #EDEAF7;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.seller-card p {
    color: #A79FC4;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Sidebar Layout */
.home-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    text-align: right;
    direction: rtl;
    margin: 0;
    min-height: 100vh;
}

.home-layout main {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0 2rem;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: rgba(26,21,48,0.32);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid var(--line);
    border-radius: 0;
    padding: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-login {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 0.8rem;
}

.sidebar-login a {
    color: var(--teal);
    font-weight: 700;
}
.sidebar-login .admin-submenu{display:flex;flex-direction:column;gap:2px;margin-top:6px;padding-top:6px;border-top:1px solid var(--line)}
.sidebar-login .admin-submenu a{color:var(--ink-dim);font-weight:500;padding:5px 10px;border-radius:8px;font-size:13px;transition:.15s}
.sidebar-login .admin-submenu a:hover{background:var(--surface-2);color:var(--teal)}

/* ── sidebar-search — Soft Beam (Libraries.dev border-beam, pure CSS) ── */
.sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-2);
    border: none;
    border-radius: 12px;
    padding: 0.8rem 0.85rem;
    min-height: 2.9rem;
    margin-bottom: 1rem;
    direction: ltr;
    overflow: hidden;
    isolation: isolate;
}

/* لایه ۱: گرادیان مخروطی چرخان با fade نرم — هاله رنگی افتاده رو لبه‌ها */
.sidebar-search::before {
    content: "";
    position: absolute;
    inset: -60%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 200deg,
        rgba(124, 108, 255, 0.15) 240deg,
        rgba(124, 108, 255, 0.65) 280deg,
        rgba(255, 93, 115, 0.95) 310deg,
        rgba(255, 200, 87, 0.9) 330deg,
        rgba(53, 224, 200, 0.7) 350deg,
        rgba(53, 224, 200, 0.15) 370deg,
        transparent 380deg,
        transparent 360deg
    );
    animation: beam-soft-spin 7s linear infinite;
    filter: blur(20px);
    opacity: 0.75;
    will-change: transform;
}

/* لایه ۲: پوشش وسط — نور فقط به‌صورت حاشیه‌ای نازک دور لبه دیده می‌شه */
.sidebar-search::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    background: var(--surface-2);
    z-index: 0;
    pointer-events: none;
}

/* لایه ۳: حلقه لبه‌ای نرم — نسخه واضح‌تر همون گرادیان که روی مرز می‌چرخه */
.sidebar-search .glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 12px;
    padding: 1.5px;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 180deg,
        rgba(124, 108, 255, 0.08) 230deg,
        rgba(255, 93, 115, 0.45) 300deg,
        rgba(255, 200, 87, 0.4) 325deg,
        rgba(53, 224, 200, 0.3) 350deg,
        transparent 380deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: beam-soft-spin 7s linear infinite;
    filter: blur(8px);
    opacity: 0.9;
}

.sidebar-search i,
.sidebar-search input {
    position: relative;
    z-index: 2;
}

.sidebar-search i {
    color: var(--ink-dim);
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.sidebar-search:focus-within i { color: #E9E6F7; }

.sidebar-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--ink);
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    /* WebKit با `appearance:auto` یک دکمه‌ی پاک‌کننده‌ی بومی داخل input
       می‌کشد (همان ضربدر). Chrome این را نشان نمی‌دهد، پس مشکل فقط در
       سافاری دیده می‌شد. `appearance:none` آن را حذف می‌کند. */
    -webkit-appearance: none;
    appearance: none;
}

/* دکمه‌ی پاک‌کننده‌ی بومی را در صورت بازگشتش هم پنهان نگه می‌داریم */
.sidebar-search input::-webkit-search-cancel-button,
.sidebar-search input::-webkit-search-decoration,
.sidebar-search input::-webkit-search-results-button,
.sidebar-search input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.sidebar-search input::placeholder {
    color: var(--ink-dim);
}

/* focus: نرم‌تر و پررنگ‌تر */
.sidebar-search:focus-within::before {
    opacity: 1;
    filter: blur(26px);
    transition: opacity 0.5s ease, filter 0.5s ease;
}
.sidebar-search:focus-within .glow {
    opacity: 1;
    filter: blur(10px);
}

@keyframes beam-soft-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-search::before,
    .sidebar-search .glow { animation: none; }
}

.sidebar-search + .sidebar-section {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.sidebar-section {
    margin-bottom: 1.2rem;
}

.sidebar-section h3 {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}

.sidebar-section h3 i {
    margin-left: 0.4rem;
    font-size: 0.85rem;
}

.sidebar-section a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    color: var(--ink-dim);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.sidebar-section a:hover {
    background: rgba(53,224,200,.1);
    color: var(--teal);
}

.sidebar-section a i {
    font-size: 0.8rem;
    width: 18px;
    text-align: center;
}

.sidebar-toggle,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

@media (max-width: 900px) {
    .home-layout {
        flex-direction: column;
    }
    .home-layout main {
        padding: 0 1rem;
    }

    /* ── بنر بازی در موبایل: از صفر صفحه و تمام‌عرض شروع می‌شود؛
       دکمه بازگشت و همبرگری و نوار رنگی بالای سایت روی تصویر بنر می‌مانند. ── */
    .container.side-page:has(.game-detail) {
        /* پدینگ افقی برای محتوای دیگر لازم است، ولی از بالا نه: تا بنر
           به صفر صفحه بچسبد و نوار رنگی (body::before) روی آن بیفتد */
        padding-top: 0;
    }
    .side-page:has(.game-detail) .home-layout {
        padding-top: 0;
    }
    .side-page .back-btn {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1100;
        margin: 0;
        color: #E9E6F7;
        background: rgba(20,16,40,.88);
        border: 1px solid var(--line);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 12px 30px -16px rgba(0,0,0,.7);
    }
    .game-detail-hero,
    .game-detail-skeleton .sk-hero {
        width: auto;
        /* با پر کردن عرض از دو طرف، از پدینگ کانتینر بیرون می‌زند و
           دقیقاً از لبه تا لبه ویوپورت را پر می‌کند */
        margin-right: calc(50% - 50vw);
        margin-left: calc(50% - 50vw);
        border-radius: 0;
    }
    .game-detail-hero {
        margin-bottom: 1.5rem;
    }

    /* دکمه همبرگری منو */
    .sidebar-toggle {
        position: fixed;
        top: 14px;
        right: 20px;
        z-index: 1100;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(20,16,40,.88);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        color: #fff;
        font-size: 1.15rem;
        cursor: pointer;
        box-shadow: 0 12px 30px -16px rgba(0,0,0,.7);
        transition: transform .2s ease;
        font-family: inherit;
    }
    .sidebar-toggle:hover { color: #fff; }
    .sidebar-toggle:active { transform: scale(.92); }

    /* سایدبار کشویی تمام‌صفحه از راست */
    .sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        z-index: 1200;
        background: rgba(18,14,36,.98);
        border-left: 1px solid var(--line);
        box-shadow: -24px 0 70px rgba(0,0,0,.55);
        transform: translateX(102%);
        visibility: hidden;
        opacity: 0;
        transition: transform .32s cubic-bezier(.2,.8,.25,1), visibility .32s, opacity .32s;
        overflow-y: auto;
        border-radius: 0;
    }
    .sidebar.open {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    /* وقتی منوی کشویی باز است، نوار پایین نباید روی سایدبار بیفتد
       (bottom-nav فرزند مستقیم body است و z-index سایدبار را در stacking
       context کانتینر محبوس می‌کند) */
    body.menu-open .bottom-nav {
        display: none !important;
    }
    body.menu-open {
        padding-bottom: 0;
    }
    .sidebar .sidebar-search {
        margin-top: 3.7rem;
    }
    /* دکمه بستن داخل سایدبار تمام‌صفحه */
    .sidebar-close {
        display: none;
        position: fixed;
        top: 14px;
        right: 14px;
        z-index: 1210;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(20,16,40,.88);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        color: var(--teal);
        font-size: 1.15rem;
        cursor: pointer;
        box-shadow: 0 12px 30px -16px rgba(0,0,0,.7);
        font-family: inherit;
    }
    .sidebar.open .sidebar-close {
        display: flex;
    }
    .sidebar-close:active { transform: scale(.92); }
    .sidebar-section {
        flex: none;
        min-width: 0;
        margin-bottom: 1.2rem;
    }

    /* پس‌زمینه تیره پشت سایدبار */
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1150;
        display: none;
        background: rgba(4,3,10,.65);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
    .sidebar-backdrop.show {
        display: block;
    }
}

/* ═══ موبایل: تصاویر و نقدها در دو تب جدا ═══
   در دسکتاپ نوار تب پنهان است و هر دو بخش مثل قبل پشت سر هم نمایش داده
   می‌شوند؛ در موبایل (≤۷۶۸px) فقط تب فعال دیده می‌شود تا صفحه کوتاه بماند. */
.mobile-split {
    margin-top: 1.5rem;
}
.ms-bar {
    display: none;
}

/* دسکتاپ: ترتیبِ نمایش برعکسِ موبایل است. در موبایل «تصاویر» تبِ اول است،
   ولی در دسکتاپ چیزی این ترتیب را الزام نمی‌کند و بهتر است امتیاز کاربران و
   نقدها بالا بیایند و گالری تصاویر درست بالای «بازی‌های مشابه» بنشیند.
   ترتیبِ DOM عوض نمی‌شود تا تبِ موبایل سالم بماند؛ فقط `order` جابه‌جا می‌کند. */
@media (min-width: 769px) {
    .ms-track {
        display: flex;
        flex-direction: column;
    }

    .ms-track>.ms-panel[data-ms-panel="reviews"] {
        order: 1;
    }

    .ms-track>.ms-panel[data-ms-panel="shots"] {
        order: 2;
    }
}

@media (max-width: 768px) {
    .ms-bar {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 5px;
        margin-bottom: 1.1rem;
        background: rgba(255, 255, 255, .05);
        border: 1px solid var(--line);
        border-radius: 16px;
    }
    /* نشانگر گرادیانی که با تعویض تب نرم جابه‌جا می‌شود */
    .ms-ind {
        position: absolute;
        z-index: 0;
        top: 5px;
        bottom: 5px;
        right: 5px;
        width: calc(50% - 7px);
        border-radius: 12px;
        background: linear-gradient(135deg, #35E0C8, #2CC8E8);
        box-shadow: 0 10px 24px -12px rgba(53, 224, 200, .9);
        transition: transform .42s cubic-bezier(.22, .9, .28, 1);
    }
    .mobile-split[data-active="reviews"] .ms-ind {
        /* درصدِ translateX نسبت به پهنای خودِ نشانگر است، پس یک
           اسلات (عرض نشانگر) + فاصله‌ی ۴px جابه‌جا می‌شود */
        transform: translateX(calc(-100% - 4px));
    }
    .ms-tab {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 11px 8px;
        border: 0;
        background: transparent;
        color: var(--ink-dim);
        font-family: inherit;
        font-size: .92rem;
        font-weight: 700;
        border-radius: 12px;
        cursor: pointer;
        transition: color .28s ease, transform .2s ease;
    }
    .ms-tab i {
        font-size: .95rem;
    }
    .ms-tab.is-active {
        color: #0B0A16;
    }
    .ms-tab:active {
        transform: scale(.96);
    }
    .ms-panel {
        display: none;
    }
    .ms-panel.is-active {
        display: block;
        animation: msPanelIn .42s cubic-bezier(.22, .9, .28, 1) both;
    }
    /* وقتی تب «تصاویر» حذف شد، نوار تب کنار می‌رود و نقدها تنها می‌مانند */
    .mobile-split.ms-one .ms-bar {
        display: none;
    }
    .mobile-split.ms-one .ms-panel[data-ms-panel="reviews"] {
        display: block;
    }
}

@keyframes msPanelIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.99);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-panel.is-active {
        animation: none;
    }
    .ms-ind,
    .ms-tab {
        transition: none;
    }
}
