/* ==========================================================================
   0. FILE INFORMATION
   ========================================================================== */
/* Last Updated: 11:42 PM CET, Saturday, November 15, 2025 */
/* ==========================================================================
   1. SIDEBAR TOGGLE BUTTON STYLES
   ========================================================================== */
#sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.4s ease;
  position: relative;
  padding: 0;
  margin: 0 4px;
}
#sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}
#sidebar-toggle svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
}
#sidebar-toggle .open-icon {
  opacity: 1;
}
#sidebar-toggle .close-icon {
  opacity: 0;
}
body.sidebar-open #sidebar-toggle .open-icon {
  opacity: 0;
}
body.sidebar-open #sidebar-toggle .close-icon {
  opacity: 1;
}
#sidebar-toggle:hover {
  background: rgba(0, 0, 0, 0.7);
}
/* ==========================================================================
   2. SIDEBAR LAYOUT AND ANIMATION
   ========================================================================== */
body:not(.sidebar-open) #sidebar,
body:not(.sidebar-open) #sidebar1 {
  transform: translateX(-100%) scale(0.95) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important; /* Prevent layout flash */
}
#sidebar,
#sidebar1 {
  position: fixed;
  top: 80px;
  left: 0;
  width: 280px;
  height: calc(100% - 80px);
  background: #252525;
  padding: 16px;
  border-radius: 0 12px 12px 0;
  box-sizing: border-box;
  z-index: 10000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1.2),
        opacity 0.5s ease,
        visibility 0.5s ease,
        scale 0.5s ease;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
}
body.sidebar-open #sidebar,
body.sidebar-open #sidebar1 {
  transform: translateX(0) scale(1);
  opacity: 1;
  visibility: visible;
  width: 280px;
}
.sidebar-menu,
#sidebar .widget ul,
#sidebar .game-sidebar-menu {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}
/* ==========================================================================
   3. CONTENT PUSH AND OVERLAY
   ========================================================================== */
#games_wrap {
  flex: 3;
  min-width: 0;
  transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1.2);
}
body.sidebar-open #games_wrap {
  margin-left: 280px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: calc(100% - 80px);
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
body.sidebar-open .sidebar-overlay {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
/* ==========================================================================
   4. RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 959px) {
  body.sidebar-open #games_wrap {
    margin-left: 0;
  }
  #sidebar,
  #sidebar1 {
    width: 260px;
  }
}
@media (max-width: 768px) {
  #sidebar,
  #sidebar1 {
    width: 260px !important;
    height: calc(100vh - 80px) !important;
    padding: 16px !important;
    transform: translateX(-100%) scale(0.95) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    display: block !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.sidebar-open #sidebar,
  body.sidebar-open #sidebar1 {
    transform: translateX(0) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 260px !important;
  }
  .sidebar-menu,
  #sidebar .widget ul,
  #sidebar .game-sidebar-menu {
    max-height: calc(100vh - 112px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #header .btns li:not(:first-child) {
    display: none;
  }
  #header .btns li:first-child {
    margin-left: 8px;
  }
  #sidebar-toggle {
    display: flex !important;
  }
}
/* ==========================================================================
   5. SIDEBAR WIDGET STYLES
   ========================================================================== */
#sidebar .widget {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 24px;
  color: #e0e0e0;
}
#sidebar .widget-title {
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  border-bottom: 1px solid #3a3a3a;
  padding-bottom: 8px;
  margin-bottom: 12px;
  line-height: 1.3;
}
#sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#sidebar .widget li {
  padding: 4px 0;
}
#sidebar .widget li a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
  display: block;
}
#sidebar .widget li a:hover {
  color: #fff;
}
/* Game Menu – Special Style */
#sidebar .game-sidebar-menu .widget-title {
  display: none;
}
#sidebar .game-sidebar-menu li {
  margin: 0;
  padding: 0;
}
#sidebar .game-sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #e0e0e0;
  font-weight: 500;
}
#sidebar .game-sidebar-menu li a:hover,
#sidebar .game-sidebar-menu li.current-menu-item a {
  background: #3a3a3a;
  color: #fff;
}
#sidebar .game-sidebar-menu li.menu-divider {
  height: 1px;
  background: #3a3a3a;
  margin: 8px 0;
}
#sidebar .game-sidebar-menu li.menu-divider a {
  display: none;
}
/* Icon Click Fix */
#sidebar-toggle .icon {
  pointer-events: none;
}
/* ==========================================================================
   6. SIDEBAR DIVIDER STYLES
   ========================================================================== */
.sidebar-divider {
  padding: 0 5px;
  text-align: center;
  width: 100%;
}
.sidebar-divider hr {
  border: 0;
  border-top: 1px solid #3a3a3a;
  margin: 10px 0;
  width: 100%;
  display: block;
}
/* ==========================================================================
   7. SOCIAL LINKS STYLES (Override)
   ========================================================================== */
#sidebar .social-links {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
}
#sidebar .social-links.grid-layout {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px !important;
  row-gap: 6px !important;
  justify-content: center !important;
}
#sidebar .social-links li {
  margin: 0 !important;
  width: auto !important;
}
#sidebar .social-links a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 4px !important;
  border-radius: 8px !important;
  color: #e0e0e0 !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  width: 36px !important;
  height: 36px !important;
}
#sidebar .social-links a:hover {
  background: #3a3a3a !important;
  color: #fff !important;
  transform: translateX(4px) !important;
}
#sidebar .social-links svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}
/* ==========================================================================
   8. COPYRIGHT LINE STYLES
   ========================================================================== */
.copyright-line {
  text-align: center;
  padding: 10px 0;
  color: #a0a0a0;
  font-size: 0.9em;
  margin-top: 16px;
}
/* ==========================================================================
   9. HEADER BUTTON STYLES
   ========================================================================== */
/* ==========================================================================
   10. MOBILE SIDEBAR STYLES (SHOW ICONS AND TEXT)
   ========================================================================== */
@media (max-width: 768px) {
  /* --- SHOW SEARCH BAR ON MOBILE --- */
  .side-search {
    display: flex !important;
    flex: 1;
    max-width: 400px;
    min-width: 150px;
    margin: 0 8px;
  }
  /* --- CORRECT MOBILE SIDEBAR STYLES --- */
  body:not(.sidebar-open) #sidebar,
  body:not(.sidebar-open) #sidebar1 {
    transform: translateX(-100%) scale(0.95) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
  }
  #sidebar,
  #sidebar1 {
    width: 260px !important;
    height: calc(100vh - 80px) !important;
    padding: 16px !important;
    display: block !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.sidebar-open #sidebar,
  body.sidebar-open #sidebar1 {
    transform: translateX(0) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 260px !important;
  }
  .sidebar-menu,
  #sidebar .widget ul,
  #sidebar .game-sidebar-menu {
    max-height: calc(100vh - 112px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #sidebar .widget,
  #sidebar .widget ul,
  #sidebar .widget .menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
    list-style: none !important;
  }
  #sidebar .widget ul li,
  #sidebar .widget .menu li {
    display: block !important;
    visibility: visible !important;
    padding: 4px 0 !important;
  }
  #sidebar .widget ul li a,
  #sidebar .widget .menu li a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    color: #e0e0e0 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #sidebar .widget ul li a:hover,
  #sidebar .widget .menu li.current-menu-item a {
    background: #3a3a3a !important;
    color: #fff !important;
  }
  #sidebar .widget ul li a img.menu-image,
  #sidebar .widget .menu li a img.menu-image {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
  }
  #sidebar .widget ul li a .menu-image-title-after,
  #sidebar .widget .menu li a .menu-image-title-after,
  #sidebar .widget ul li a span,
  #sidebar .widget .menu li a span {
    display: inline-block !important;
    font-size: 14px !important;
    color: #e0e0e0 !important;
    visibility: visible !important;
  }
  #sidebar .widget-title {
    display: block !important;
    color: #fff !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #3a3a3a !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
    visibility: visible !important;
  }
  #sidebar .social-links,
  #sidebar .social-links.grid-layout {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    row-gap: 6px !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  #sidebar .social-links li {
    width: auto !important;
  }
  #sidebar .social-links a {
    padding: 4px !important;
    width: 36px !important;
    height: 36px !important;
  }
  #sidebar .social-links svg {
    width: 18px !important;
    height: 18px !important;
  }
  #sidebar .sidebar-divider {
    display: block !important;
    visibility: visible !important;
  }
  #sidebar .copyright-line {
    display: block !important;
    font-size: 0.9em !important;
    padding: 10px 0 !important;
    color: #a0a0a0 !important;
    visibility: visible !important;
  }
  #sidebar .widget ul li,
  #sidebar .widget .menu li,
  #sidebar .widget ul li a,
  #sidebar .widget .menu li a {
    font-size: 14px !important;
    transform: none !important;
  }
  #sidebar-toggle {
    display: flex !important;
  }
}
/* ==========================================================================
   11. STYLE: FINAL FIX (Correct Selectors)
   ========================================================================== */
@media (min-width: 960px) {
  /* --- 1. SIDEBAR CONTAINER (Mini Mode) --- */
  body:not(.sidebar-open) #sidebar,
  body:not(.sidebar-open) #sidebar1 {
    transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 60px !important;
  }
  #sidebar,
  #sidebar1 {
    z-index: 1000;
    padding: 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #252525;
  }
  #sidebar::-webkit-scrollbar,
  #sidebar1::-webkit-scrollbar {
    display: none;
  }
  #games_wrap {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  /* --- 2. GAME ICONS (Always Visible) --- */
  #sidebar ul,
  #sidebar .widget ul,
  #sidebar .menu,
  #sidebar .widget {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100%;
    visibility: visible !important;
  }
  #sidebar li a,
  #sidebar .widget li a {
    font-size: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 40px;
    padding: 0 !important;
    text-decoration: none;
  }
  #sidebar li a span,
  #sidebar li a .menu-image-title-after,
  #sidebar .widget-title {
    display: none !important;
  }
  #sidebar li a svg,
  #sidebar li a img,
  #sidebar li a .menu-image,
  #sidebar li a i {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    fill: #e0e0e0;
    color: #e0e0e0;
  }
  /* --- 3. ELEMENTS TO HIDE IN CLOSED STATE --- */
  #sidebar .menu-game-sidebar-page-container,
  #sidebar .social-links,
  #sidebar .copyright-line,
  #sidebar .sidebar-divider {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
  /* --- 4. OPEN STATE (Sidebar Expanded) --- */
  body.sidebar-open #sidebar,
  body.sidebar-open #sidebar1 {
    width: 260px;
    padding-left: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.sidebar-open #games_wrap {
    margin-left: 260px;
    width: calc(100% - 260px);
  }
  body.sidebar-open #sidebar li a,
  body.sidebar-open #sidebar .widget li a {
    justify-content: flex-start !important;
    padding-left: 10px !important;
    font-size: 14px !important;
    width: auto !important;
  }
  body.sidebar-open #sidebar li a span,
  body.sidebar-open #sidebar li a .menu-image-title-after {
    font-size: 14px !important;
    line-height: normal !important;
    display: inline-block !important;
    margin-left: 12px !important;
  }
  body.sidebar-open #sidebar .widget-title {
    display: block !important;
    margin-top: 15px;
    margin-bottom: 5px;
    padding-left: 10px;
    font-size: 11px !important;
    text-transform: uppercase;
    color: #888;
    font-weight: bold;
  }
  /* --- 5. RESTORE HIDDEN ELEMENTS (Open State) --- */
  body.sidebar-open #sidebar .menu-game-sidebar-page-container {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: auto !important;
    pointer-events: auto !important;
    margin-top: 10px !important;
  }
  body.sidebar-open #sidebar .menu-game-sidebar-page-container li a {
    padding: 8px 10px !important;
    height: auto !important;
    color: #e0e0e0 !important;
  }
  body.sidebar-open #sidebar .menu-game-sidebar-page-container li a:hover {
    color: #fff !important;
    background: #3a3a3a !important;
    border-radius: 6px;
  }
  body.sidebar-open #sidebar .social-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    margin-top: 20px !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  body.sidebar-open #sidebar .social-links li {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
  }
  body.sidebar-open #sidebar .social-links li a {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
  }
  body.sidebar-open #sidebar .social-links li a svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    visibility: visible !important;
  }
  body.sidebar-open #sidebar .copyright-line,
  body.sidebar-open #sidebar .sidebar-divider {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .sidebar-overlay {
    display: none !important;
  }
/* 1. FORCE ROW LAYOUT FOR SOCIAL LINKS (Override Grid & Block) */
    body.sidebar-open #sidebar .social-links,
    body.sidebar-open #sidebar .social-links.grid-layout {
        display: flex !important;
        flex-direction: row !important; /* Forces horizontal line */
        flex-wrap: wrap !important; /* Allows wrapping if you have 10+ icons */
        justify-content: center !important; /* Centers them */
        align-items: center !important;
        gap: 8px !important;
        
        /* Reset Grid Styles */
        grid-template-columns: none !important;
        width: 100% !important;
        margin-top: 20px !important;
        padding: 0 10px !important; /* Prevent touching edges */
        box-sizing: border-box !important;
        
        /* Visibility */
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* 2. FIX INDIVIDUAL ITEMS TO SIT SIDE-BY-SIDE */
    body.sidebar-open #sidebar .social-links li {
        display: inline-flex !important; /* critical: prevents full width */
        width: auto !important;          /* critical: lets it shrink to icon size */
        margin: 0 !important;
        flex: 0 0 auto !important;       /* prevents stretching */
    }

    /* 3. ICON SIZE & ALIGNMENT */
    body.sidebar-open #sidebar .social-links li a {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        background: rgba(255,255,255,0.05); /* Optional: subtle background */
        border-radius: 6px;
    }
    
    body.sidebar-open #sidebar .social-links li a:hover {
        background: #3a3a3a !important;
    }

    body.sidebar-open #sidebar .social-links li a svg {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
    }	
	
}
/* ==========================================================================
   12. SEARCH (Mobile Only)
   ========================================================================== */
.side-search {
  display: none;
}
.side-search form {
  display: flex;
  position: relative;
  width: 100%;
}
.side-search input.text {
  flex: 1;
  padding: 10px 44px 10px 16px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  transition: all 0.3s ease;
}
.side-search input.text::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}
.side-search input.text:focus {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.side-search .submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  opacity: 0.7;
}
.side-search .submit svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}
.side-search .submit:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}