/* ==========================================================================
   Otvut Games Hub Extended Vanilla CSS Enhancements (Dark/Light Mode & Scrollbar Fix)
   ========================================================================== */

:root {
    --otvut-header-height: 60px;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

/* ডার্ক মোড ভ্যারিয়েবল ও স্টাইল */
html.dark {
    --bg-primary: #09090b;
    --bg-secondary: #121214;
    --bg-card: #121214;
    --border-color: #27272a;
    --text-primary: #fafafa;
    --text-secondary: #71717a;
}

.otvut-games-body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s, color 0.2s;
}

.otvut-main-layout {
    width: 100%;
    display: flex;
    flex: 1;
    align-items: flex-start;
    margin-top: var(--otvut-header-height);
    min-height: calc(100vh - var(--otvut-header-height));
}

.games-hub-container {
    width: 100%;
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-sizing: border-box;
}

.games-header-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .games-header-box {
        flex-direction: row;
        align-items: center;
    }
}

.games-main-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.games-main-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.games-search-box {
    width: 100%;
    max-width: 100%;
    position: relative;
}

@media (min-width: 768px) {
    .games-search-box {
        max-width: 288px;
    }
}

.games-search-input {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.games-search-input:focus {
    border-color: #ea580c;
}

.games-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 0.875rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ==========================================================================
   হরিজন্টাল স্ক্রলবার এবং নিচের 'দাঁত' বা দাগ দূর করার ফিক্স
   ========================================================================== */
.games-category-bar,
.games-carousel-box {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    
    /* ব্রাউজারের ডিফল্ট হরিজন্টাল স্ক্রলবার ও নিচে দাগ ফেলার প্রপার্টি রিমুভ করা হলো */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.games-category-bar::-webkit-scrollbar,
.games-carousel-box::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.games-pill-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.games-pill-btn:hover,
.games-pill-btn.active {
    background-color: #ea580c;
    color: #ffffff;
    border-color: #ea580c;
}

.games-section-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.games-section-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.games-title-icon {
    color: #ea580c;
}

.games-loading-text, .games-empty-state {
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 1rem 0;
}

.games-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.games-spinner-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
}

.games-spinner-icon {
    font-size: 1.5rem;
    color: #ea580c;
}

.games-popular-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    min-width: 200px;
    max-width: 200px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s;
    flex-shrink: 0;
    box-sizing: border-box;
}

.games-popular-card:hover {
    border-color: rgba(234, 88, 12, 0.5);
}

.games-card-img-wrap {
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    margin-bottom: 8px;
}

.games-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.games-popular-card:hover .games-card-img,
.games-grid-card:hover .games-card-img {
    transform: scale(1.02);
}

.games-card-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 13px;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.games-play-btn-sm {
    width: 100%;
    background-color: #ea580c;
    border: none;
    color: #ffffff;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.games-featured-row-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    grid-column: 1 / -1;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s;
}

.games-featured-row-card:hover {
    border-color: rgba(234, 88, 12, 0.5);
}

.games-featured-img-wrap {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--bg-secondary);
}

.games-featured-content {
    flex: 1;
    overflow: hidden;
}

.games-category-tag {
    font-size: 9px;
    font-weight: 700;
    color: #fb923c;
    text-transform: uppercase;
}

.games-featured-title {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.games-featured-desc {
    color: var(--text-secondary);
    font-size: 11px;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.games-play-btn-md {
    background-color: #ea580c;
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.games-grid-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s;
}

.games-grid-card:hover {
    border-color: rgba(234, 88, 12, 0.5);
}

.games-card-title-grid {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.games-play-btn-grid {
    margin-top: 1rem;
    width: 100%;
    background-color: var(--border-color);
    border: none;
    color: var(--text-primary);
    padding: 8px 0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.games-play-btn-grid:hover {
    background-color: #ea580c;
    color: #ffffff;
}

.games-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    display: none;
    flex-direction: column;
    z-index: 50;
}

.games-modal-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.games-modal-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin: 0;
}

.games-modal-close-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: var(--border-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.games-modal-close-btn:hover {
    color: var(--text-primary);
}

.games-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000000;
}

.games-iframe-style {
    width: 100%;
    height: 100%;
    border: 0;
}

.theme-btn-container {
    padding: 1.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Otvut Responsive Sidebar Component (Isolated Independent Scrolling)
   ========================================================================== */

.col-sidebar-wrapper {
    position: sticky;
    top: var(--otvut-header-height);
    height: calc(100vh - var(--otvut-header-height));
    overflow-y: auto;
    overflow-x: hidden;
    width: 100% !important;
    max-width: 72px !important;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    color: var(--text-secondary);
    box-sizing: border-box;
    border-right: 1px solid var(--border-color);
    transition: max-width 0.2s ease;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .col-sidebar-wrapper {
        display: flex;
    }
}

.col-sidebar-wrapper::-webkit-scrollbar { 
    width: 4px;
}

.col-sidebar-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.col-sidebar-wrapper .sidebar-title { 
    display: none !important; 
}

.col-sidebar-wrapper .sidebar-link { 
    justify-content: center !important; 
    width: 2.75rem !important; 
    height: 2.75rem !important; 
    padding: 0 !important; 
    margin: 0 !important; 
}

.col-sidebar-wrapper .sidebar-link > div { 
    gap: 0 !important; 
}

.col-sidebar-wrapper .sidebar-text { 
    display: none !important; 
}

.col-sidebar-wrapper .sidebar-chevron { 
    display: none !important; 
}

@media (min-width: 1279px) {
    .col-sidebar-wrapper {
        max-width: 210px !important;
    }
    
    .col-sidebar-wrapper .sidebar-title { 
        display: block !important; 
    }
    
    .col-sidebar-wrapper .sidebar-link { 
        justify-content: space-between !important; 
        width: 100% !important; 
        height: auto !important; 
        padding: 0.625rem 0.75rem !important; 
        margin: 0 !important; 
    }
    
    .col-sidebar-wrapper .sidebar-link > div { 
        gap: 0.75rem !important; 
    }
    
    .col-sidebar-wrapper .sidebar-text { 
        display: inline !important; 
    }
    
    .col-sidebar-wrapper .sidebar-chevron { 
        display: block !important; 
    }
}