/* WebView saját "Windows" sáv – pontos RGBA */
.ys-winbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 46px;
  z-index: 9999;
  background: rgba(14, 19, 27, 0.85); /* EZ PONT AZ */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: stretch;
}

.ys-winbar__drag{
  flex: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 .9rem;
  user-select: none;
}

.ys-winbar__logo{ width: 18px; height: 18px; border-radius: 4px; }
.ys-winbar__title{ color: rgba(255,255,255,.88); font-weight: 650; font-size: .9rem; letter-spacing: .02em; }

.ys-winbar__btns{
  display: flex;
  align-items: stretch;
}

.ys-winbar__btn{
  width: 48px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  cursor: pointer;
  transition: background .12s ease;
}
.ys-winbar__btn:hover{ background: rgba(255,255,255,.08); }
.ys-winbar__btn--close:hover{ background: rgba(244,67,54,.70); }

/* hogy ne csússzon a tartalom a sáv alá */
body{ padding-top: 46px; }

/* Launcher Layout */
.launcher-layout {
  display: flex;
  flex-wrap: nowrap;
  min-height: calc(100vh - 46px);
}

/* Launcher Main Content */
.launcher-main {
  padding-left: 1rem;
  padding-right: 1rem;
  overflow-y: auto;
  flex: 1;
}

@media (min-width: 768px) {
  .launcher-main {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Launcher Sidebar Styles */
.launcher-sidebar {
  background: rgba(30, 30, 40, 0.95);
  border-radius: 0;
  padding: 1.5rem;
  position: fixed;
  top: 46px;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

/* Left Sidebar */
.launcher-sidebar:not(.launcher-sidebar-right) {
  left: 0;
  width: 250px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Right Sidebar */
.launcher-sidebar-right {
  right: 0;
  width: 280px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, right 0.3s ease;
  will-change: transform;
}

/* Collapsed state */
.launcher-sidebar-right.collapsed {
  transform: translateX(230px);
}

.launcher-sidebar-right.collapsed .launcher-sidebar-header,
.launcher-sidebar-right.collapsed .tab-content,
.launcher-sidebar-right.collapsed .launcher-sidebar-footer {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: rgba(30, 30, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-btn:hover {
  background: rgba(40, 40, 50, 0.95);
  color: rgba(255, 255, 255, 0.9);
  width: 45px;
  left: -45px;
}

.sidebar-toggle-btn i {
  transition: transform 0.3s ease;
  pointer-events: none;
}

/* Main content offset adjustment */
@media (min-width: 768px) {
  .launcher-main {
    margin-left: 250px;
    margin-right: 280px;
    transition: margin-right 0.3s ease;
  }
}

/* Ha collapsed a jobb sidebar, csökkentsd a margin-t */
body:has(.launcher-sidebar-right.collapsed) .launcher-main {
  margin-right: 50px !important;
}

/* Responsive behavior */
@media (max-width: 1399px) {
  .launcher-sidebar-right:not(.collapsed) {
    /* Kis képernyőn is maradjon kint */
  }
}

@media (max-width: 767px) {
  .launcher-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    height: auto;
    min-height: auto;
  }
  
  .sidebar-toggle-btn {
    display: none;
  }
  
  .launcher-layout {
    flex-wrap: wrap;
  }
  
  .launcher-main {
    margin-left: 0;
    margin-right: 0;
  }
  
  .launcher-sidebar-right.collapsed {
    transform: none;
  }
}

.launcher-sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.launcher-games-list,
.friends-list {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  flex: 1;
  max-height: calc(100vh - 300px);
}

.launcher-games-list::-webkit-scrollbar {
  width: 6px;
}

.launcher-games-list::-webkit-scrollbar-track {
  background: transparent;
}

.launcher-games-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.launcher-settings-btn {
  transition: all 0.3s ease;
}

.launcher-settings-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Friends Tabs */
.friends-tabs {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.25rem;
}

.friends-tabs .nav-link {
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 0.5rem;
  transition: all 0.2s ease;
  border: none;
}

.friends-tabs .nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.friends-tabs .nav-link.active {
  background: rgba(74, 144, 226, 0.2);
  color: #4a90e2;
}

/* Friends Search */
.friends-search .input-group-text,
.friends-search .form-control {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.friends-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.friends-search .form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(74, 144, 226, 0.5);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

/* Friends List */
.friends-list {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.friends-list::-webkit-scrollbar {
  width: 6px;
}

.friends-list::-webkit-scrollbar-track {
  background: transparent;
}

.friends-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Friends Empty State */
.friends-empty {
  color: rgba(255, 255, 255, 0.6);
}

.friends-empty h6 {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.friends-empty .btn {
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

/* Friend Item (amikor lesznek barátok) */
.friend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.friend-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.friend-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(30, 30, 40, 0.95);
}

.friend-status.online {
  background: #43b581;
}

.friend-status.offline {
  background: #747f8d;
}

.friend-status.away {
  background: #faa61a;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-game {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tab Content */
.tab-content {
  overflow-y: auto;
}
