/* ==========================================================================
   GLOBAL COMPONENTS
   ========================================================================== */

:root {
    --bg-body: #fafafa;
    --bg-secondary: rgba(248,250,252,0.78);
    --button: #f8fafc;
    --bg-card: #eff6ff;
    --color-border: #cbd5e1;
    --text-muted: #64748b;    
    --text-main: #1e293b;
    --primary: #0f172a;

    --accent: #3b82f6;
    --accent-2:#67a1ff;
    --playing: #10b981;
    --complete: #3b82f6;
    --on-hold: #f59e0b;
    --dropped:#ef4444;
    --planned:#94a3b8;
    --radius: 20px;
}

/* Different Muted Style for Profile Page (THIS IS IN GLOBAL STYLES SO WE CAN REUSE IT FOR OTHER SITES) */
.muted {
    color: #94a3b8;
    font-weight: 700;
}

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

.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text; 
    background-clip: text;         
    -webkit-text-fill-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden; /* fallback where clip is unsupported */
    -webkit-font-smoothing: antialiased;
}

/* hidden breaks position:sticky on descendants in Chromium/WebKit; clip does not */
@supports (overflow: clip) {
    body {
        overflow-x: clip;
    }
}

/* Default: shows nothing until decided */
#loginBtn,
#navUserWrap,
#userMenu {
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-user-wrap{
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 8px;
}

/* while auth is being decided: hide auth-dependent UI */
/* loading: nichts Auth-bezogen zeigen */
html[data-auth="loading"] #loginBtn,
html[data-auth="loading"] #navUserWrap{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ausgeloggt */
html[data-auth="out"] #loginBtn{
    display: inline-flex !important;
}

html[data-auth="out"] #navUserWrap{
    display: none !important;
}

/* eingeloggt */
html[data-auth="in"] #loginBtn{
    display: none !important;
}

html[data-auth="in"] #navUserWrap{
    display: flex !important;
    align-items: center;
}

[hidden] { display: none !important; }

.navbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 32px;

    padding: 1.35rem 6%;  /* This decides how far right the nav links are, we can change this if we have more stuff */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -1px;
    justify-self: start;
}

.accent { color: var(--accent); }

.logo a {
    text-decoration: none; 
    color: inherit;       
    display: inline-block; 
    cursor: pointer;
}

.logo a:hover {
    opacity: 0.8;
    transition: 0.2s;
}

.nav-item {
    text-decoration: none !important;
    color: var(--text-main) !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0; 
}

/* Active Strich */

.nav-links .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 5px 5px 5px;
    text-decoration: none !important;
    color: #1e293b !important;
    font-weight: 600;
    cursor: pointer;
}

.nav-links .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 3px;
    background: var(--accent);
    border-radius: 5px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.3s ease;
}

.nav-links .nav-item:hover::after {
    width: 100%;
    background: rgba(59, 130, 246, 0.5); 
}

.nav-links .nav-item.active::after {
    width: 100%;
    background: var(--accent); 
    animation: slideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* ===== Global Navbar Search ===== */

/* the component */
.nav-search {
    position: relative;
    isolation:  isolate;
    width: 100%;
    max-width: 560px;
}

.navbar .nav-search-slot{
    position: static;
    left: auto;
    transform: none;
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    width: 100%;
    min-height: 46px;
    display: flex;
}

.navbar .nav-search{
    width: clamp(420px, 34vw, 560px);
    max-width: 100%;
}

.nav-search-input{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 12px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.nav-search-input svg{
  width: 18px;
  height: 18px;
  color:#64748b;
  flex: 0 0 auto;
}

.nav-search-input input{
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.9rem;
  color:#0f172a;
}

.nav-search-panel{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.14);
  overflow: hidden;
  z-index: 200;
}

.nav-search-tabs{
  display:flex;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.nav-search-tab{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor:pointer;
  font-weight: 800;
  font-size: 0.85rem;
  color:#334155;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.nav-search-tab:hover{
  transform: translateY(-1px);
  background: rgba(59,130,246,0.08);
}
.nav-search-tab.active{
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.22);
}

.nav-search-results{
  list-style:none;
  margin:0;
  padding: 8px;
  max-height: 360px;
  overflow:auto;
}

.nav-search-item{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  cursor:pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.nav-search-item:hover{
  background: rgba(59,130,246,0.10);
  transform: translateX(4px);
}

.nav-search-thumb{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow:hidden;
  background: rgba(148,163,184,0.20);
  flex: 0 0 44px;
}
.nav-search-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.nav-search-text{
  min-width: 0;
}
.nav-search-title{
  font-weight: 900;
  color:#0f172a;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.nav-search-sub{
  margin-top: 2px;
  font-size: 0.82rem;
  color:#64748b;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.nav-search-footer{
  padding: 10px 12px;
  border-top: 1px solid rgba(15,23,42,0.08);
  color:#94a3b8;
  font-size: 0.82rem;
  display:flex;
  justify-content: space-between;
  align-items:center;
}

/* responsive: hide in navbar on small screens */
@media (max-width: 980px){
  .nav-search{ width: 240px; }
}
@media (max-width: 740px){
  .nav-search-slot{ display:none; } /* keep explore page search via page slot */
}

.nav-search--games{
  display:flex;
  align-items:center;
  gap:10px;
  height:46px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid #eef2f6;
  background:#fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.nav-search--games input{
  border:none;
  outline:none;
  width:280px; 
  font: inherit;
  background:transparent;
}

/* Navbar Search specific styles */

/* Bigger + centered dropdown panel (NAV variant) */
.nav-search[data-variant="nav"] .nav-search-panel{
  width: min(680px, 92vw);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  top: calc(100% + 12px);

  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);

  box-shadow:
    0 30px 70px rgba(0,0,0,0.18),
    0 10px 30px rgba(0,0,0,0.10);

  overflow: hidden;
  z-index: 2000;
  animation: navPanelIn 140ms ease-out both;
}

@keyframes navPanelIn{
  from { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(0.99); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Tabs: a bit more premium */
.nav-search[data-variant="nav"] .nav-search-tabs{
  gap: 8px;
  padding: 12px;
  background: rgba(248,250,252,0.75);
}

/* Results: more breathing room */
.nav-search[data-variant="nav"] .nav-search-results{
  padding: 10px;
  max-height: 420px;
}

/* Items: cleaner hover and spacing */
.nav-search[data-variant="nav"] .nav-search-item{
  padding: 12px;
  border-radius: 16px;
}

.nav-search[data-variant="nav"] .nav-search-item:hover{
  background: rgba(59,130,246,0.10);
  transform: translateX(6px);
}

/* Thumbs slightly bigger */
.nav-search[data-variant="nav"] .nav-search-thumb{
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex: 0 0 52px;
}

/* Footer a bit nicer */
.nav-search[data-variant="nav"] .nav-search-footer{
  padding: 12px 14px;
  background: rgba(248,250,252,0.75);
}

/* Custom scrollbar for results */

.nav-search-results::-webkit-scrollbar{ width: 10px; }
.nav-search-results::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,0.45);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.9);
}
.nav-search-results::-webkit-scrollbar-track{
  background: transparent;
}

/* Nav User Search */

.nav-search-thumb--user{
  border-radius: 50%;
  background: linear-gradient(145deg, #eef2ff, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nav-search-user-fallback{
  font-size: 1rem;
  font-weight: 900;
  color: #2563eb;
}

.nav-search-mode-picker{
  position: relative;
  flex: 0 0 auto;
}

.nav-search-mode-btn{
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 10px;
  background: rgba(248,250,252,0.92);
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-search-mode-btn:hover{
  transform: translateY(-1px);
  background: rgba(59,130,246,0.10);
  color: #2563eb;
}

.nav-search-mode-menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.14);
  z-index: 99999;
}

.nav-search-mode-option{
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  transition: background 160ms ease, transform 160ms ease;
}

.nav-search-mode-option:hover{
  background: rgba(59,130,246,0.10);
  transform: translateX(3px);
}

.nav-search-thumb--user img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dropdown */

.dropdown {
    position: relative; 
}

.nav-links .nav-item, 
.nav-links .nav-item a, 
.nav-links .nav-item a:visited {
    color: #1e293b !important; 
    text-decoration: none !important;
    font-weight: 300;
}

.nav-links .nav-item:hover, 
.nav-links .nav-item a:hover {
    color: var(--accent) !important; 
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    width: 100%;
    margin-left: 0;
    justify-self: end;
}

.nav-item a, 
.nav-item a:visited {
    text-decoration: none !important;
    color: inherit !important; 
}

.nav-item:hover, 
.nav-item a:hover {
    color: var(--accent) !important;
}

.dropdown > a {
    display: flex;
    align-items: center;
}

.nav-item.dropdown {
    position: relative; 
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    min-width: 220px;
    list-style: none;
    padding: 10px; 
    border-radius: 16px; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 
                0 5px 15px rgba(59, 130, 246, 0.05);
    
    border: 1px solid rgba(255, 255, 255, 0.4);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 9999;
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(8px);
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -15px; 
    left: 0;
    width: 100%;
    height: 15px;
}

.dropdown-menu li a {
    padding: 12px 16px;
    display: block;
    color: #1e293b !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px; 
    transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
    background: rgba(59, 130, 246, 0.08); 
    color: var(--accent) !important;
    padding-left: 22px; 
}

button {
    font-family: 'Inter', sans-serif;
    padding: 0.8rem 1.8rem;
    border-radius: 12px; 
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-btns { display: flex; gap: 2rem; justify-content: center; }

.btn-primary {
    background: var(--accent);
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-decoration: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: #2563eb;
}

.btn-secondary {
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(248, 250, 252, 0.9);
    font-weight: 800;
    cursor: pointer;
    text-decoration: none !important;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

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

.btn-login {
    background-color: var(--primary);
    color: white;
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
}

/* User Dropdown */

.user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.user-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(8px);
  transform-origin: top center;
  min-width: 220px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(20, 20, 25, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.08);
}

.dropdown-divider {
  height: 1px;
  margin: 8px 0;
  background: rgba(255,255,255,0.12);
}

.dropdown-item.danger {
  color: #ffb4b4;
}

/* Reveal Animation */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   Friend Notification Bell
   ========================= */

.notif-bell {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

html[data-auth="in"] .notif-bell {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

html[data-auth="out"] .notif-bell,
html[data-auth="loading"] .notif-bell {
    display: none !important;
}

.notif-bell-btn{
    position: relative;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.notif-bell-btn:hover{
    transform: translateY(-2px);
    color: #4f46e5;
    box-shadow: 0 10px 24px rgba(79,70,229,0.18);
}

.notif-bell-btn i{
    font-size: 18px;
}

.notif-bell-badge{
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(120deg, #ef4444, #f97316);
    color: white;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(239,68,68,0.28);
}

.notif-dropdown{
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 420px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(226,232,240,0.9);
    box-shadow: 0 18px 40px rgba(0,0,0,0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 3000;
}

.notif-dropdown.open{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.notif-dropdown-head{
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(90deg, rgba(59,130,246,0.06), rgba(139,92,246,0.06));
}

.notif-dropdown-list{
    max-height: 360px;
    overflow-y: auto;
}

.notif-empty{
    padding: 18px 16px;
    color: #64748b;
    font-size: 14px;
}

.notif-item{
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    align-items: flex-start;
}

.notif-item:last-child{
    border-bottom: none;
}

.notif-avatar{
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(59,130,246,0.16);
}

.notif-body{
    flex: 1;
    min-width: 0;
}

.notif-text{
    font-size: 14px;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 6px;
}

.notif-user{
    font-weight: 800;
    color: #2563eb;
    text-decoration: none;
}

.notif-user:hover{
    text-decoration: underline;
}

.notif-time{
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.notif-actions{
    display: flex;
    gap: 8px;
}

.notif-action{
    border: none;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.notif-action:hover{
    transform: translateY(-1px);
}

.notif-action.accept{
    background: linear-gradient(120deg, #22c55e, #16a34a);
    color: white;
}

.notif-action.decline{
    background: #e2e8f0;
    color: #334155;
}

@media (max-width: 640px){
    .notif-dropdown{
        width: 300px;
        right: -20px;
    }
}

/* GLOBAL CONFIRM BOXES */

.mgl-modal-backdrop{
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
}

.mgl-modal{
    width: min(100%, 460px);
    border-radius: 24px;
    padding: 22px 22px 18px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92));
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow:
        0 24px 60px rgba(0,0,0,0.22),
        0 0 30px rgba(59,130,246,0.12),
        0 0 32px rgba(139,92,246,0.10);
    animation: mglModalIn 180ms ease;
}

@keyframes mglModalIn{
    from{
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mgl-modal-head h3{
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(90deg, #4f46e5, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mgl-modal-body{
    margin-top: 12px;
}

.mgl-modal-body p{
    margin: 0;
    color: #334155;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
}

.mgl-modal-actions{
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.mgl-modal-btn{
    min-width: 110px;
    height: 46px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.98rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.mgl-modal-btn:hover{
    transform: translateY(-1px);
}

.mgl-modal-btn-cancel{
    background: rgba(226,232,240,0.95);
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}

.mgl-modal-btn-confirm{
    color: white;
    background: linear-gradient(120deg, #3b82f6, #8b5cf6);
    box-shadow:
        0 10px 24px rgba(59,130,246,0.22),
        0 10px 24px rgba(139,92,246,0.16);
}

.mgl-modal-btn-confirm:hover{
    box-shadow:
        0 14px 28px rgba(59,130,246,0.28),
        0 14px 28px rgba(139,92,246,0.20);
}

/* TOAST BOXES */

.toast-container{
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast{
  min-width: 280px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #e5eefc;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.28),
    0 0 24px rgba(59,130,246,0.16),
    0 0 24px rgba(139,92,246,0.12);
  backdrop-filter: blur(10px);
  pointer-events: auto;

  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show{
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.hide{
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
}

.toast--success{
  border-left: 4px solid #22c55e;
}

.toast--error{
  border-left: 4px solid #ef4444;
}

.toast--warning{
  border-left: 4px solid #f59e0b;
}

.toast--info{
  border-left: 4px solid #3b82f6;
}

.toast-title{
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #ffffff;
}

.toast-message{
  font-size: 0.92rem;
  line-height: 1.4;
  color: #cbd5e1;
}

@media (max-width: 1180px){
    .navbar {
        gap: 18px;
        padding: 1.2rem 5%;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .navbar .nav-search-slot {
        min-width: 220px;
    }

    .navbar .nav-search {
        max-width: 460px;
    }
}

@media (max-width: 980px){
    .nav-search-slot {
        display: none;
    }
}

/* Footer Styles */
.main-footer {
    background-color: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 4rem 8% 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h4 {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
}

.link-group a {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    transition: color 0.2s;
}

.link-group a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid #f1f5f9;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsiveness: Stack columns on small screens */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
    .footer-links {
        gap: 2rem;
        flex-wrap: wrap;
    }
}

/* =========================
   Sub Headline Styles (use different versions for different sections)
   ========================= */

/* Base styles for all section titles */

.section-title{
    margin: 0 0 16px;
    font-size: 1.5rem;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #2c1653;
    display: inline-block;
}

.section-title::after{
    content: "";
    display: block;
    width: 84px;
    height: 4px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 18px rgba(99,102,241,0.22);
}

/* Version for Main Headlines */

.section-title--gradient{
    background: linear-gradient(90deg, #7c5cff 0%, #4f7cff 45%, #8b5cf6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Glow Version (good for Sub Sections) */

.section-title--glow{
    color: #280f2a;
    text-shadow:
        0 0 12px rgba(59,130,246,0.28),
        0 0 22px rgba(139,92,246,0.20);
}

/* Version if only one of the words should be highlighted */

.section-title--split{
    color: #0f172a;
}

.section-title--split span{
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Clean Glass Style */

.section-title--glass{ 
    color: rgba(15,23,42,0.92); 
    text-shadow: 0 1px 0 rgba(255,255,255,0.55), 0 8px 24px rgba(99,102,241,0.10); }

/* Neon Style */

.section-title--neon{
    color: #111827;
    text-shadow:
        0 0 10px rgba(59,130,246,0.32),
        0 0 20px rgba(139,92,246,0.26),
        0 0 34px rgba(99,102,241,0.18);
}

/* Metallic Style (Good for very important sections) */

.section-title--metal{
    background: linear-gradient(135deg, #210f2a 0%, #334155 25%, #2563eb 60%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* =========================
   Sub Headline Line Styles
   ========================= */

/* Default section title style */

.section-title--default::after{
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

/* Reversed title style (gradient on the left) */

.section-title--reverse::after{
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}

/* Cooler colors style */

.section-title--cool::after{
    background: linear-gradient(90deg, #60a5fa, #818cf8);
}

/* Stronger more vibrant colors */

.section-title--bold::after{
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    box-shadow: 0 0 24px rgba(99,102,241,0.30);
}

/* Shorter line style */

.section-title--short::after{
    width: 56px;
}

/* Longer line style */

.section-title--long::after{
    width: 120px;
}

.badge-stats {
    background: #e0e7ff;
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Card Button Links */

.card-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border 0.3s;
}

.card-link:hover { border-color: var(--accent); }

/* Text Styles */

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 1.5rem auto;
    line-height: 1.6;
}

.section-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.section-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

/* ==========================================================================
   GLOBAL SETTINGS MODAL
   ========================================================================== */

.settings-overlay{
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.settings-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.settings-modal{
    position: relative;
    z-index: 1;
    width: min(1180px, 96vw);
    height: min(760px, 88vh);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
    box-shadow:
        0 30px 80px rgba(0,0,0,0.28),
        0 0 40px rgba(59,130,246,0.10),
        0 0 36px rgba(139,92,246,0.08);
    animation: settingsModalIn 180ms ease;
}

@keyframes settingsModalIn{
    from{
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.settings-shell{
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.settings-sidebar{
    width: 290px;
    flex: 0 0 290px;
    padding: 26px 18px 22px;
    background:
        linear-gradient(180deg, rgba(15,23,42,0.98), rgba(30,41,59,0.96));
    border-right: 1px solid rgba(255,255,255,0.06);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.settings-sidebar-head{
    padding: 4px 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}

.settings-sidebar-head h2{
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 0 6px;
    color: #ffffff;
}

.settings-sidebar-head p{
    margin: 0;
    font-size: 0.92rem;
    color: #94a3b8;
}

.settings-nav{
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}

.settings-tab{
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: transparent;
    color: #cbd5e1;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.settings-tab i{
    width: 18px;
    text-align: center;
    color: #a5b4fc;
}

.settings-tab:hover{
    transform: translateX(3px);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
    color: #ffffff;
}

.settings-tab.active{
    background: rgba(255,255,255,0.10);
    border-color: rgba(103,161,255,0.18);
    color: #ffffff;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.02),
        0 8px 20px rgba(0,0,0,0.16);
}

.settings-content{
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 26px 28px;
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(139,92,246,0.06), transparent 24%),
        transparent;
}

.settings-topbar{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    margin-bottom: 20px;
}

.settings-panel-title{
    margin: 0 0 6px;
    font-size: 1.7rem;
    font-weight: 900;
    color: #0f172a;
}

.settings-panel-sub{
    margin: 0;
    font-size: 0.96rem;
    color: #64748b;
}

.settings-close{
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    background: rgba(248,250,252,0.95);
    border: 1px solid rgba(15,23,42,0.08);
    color: #334155;
    flex: 0 0 auto;
}

.settings-close:hover{
    transform: translateY(-1px);
    background: rgba(59,130,246,0.08);
    color: #2563eb;
}

.settings-panels{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.settings-panel{
    display: none;
}

.settings-panel.active{
    display: block;
}

.settings-group{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-group h4{
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
}

.settings-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.82);
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.settings-label{
    display: block;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.settings-help{
    display: block;
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.45;
}

.settings-select,
.settings-input{
    min-width: 220px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.10);
    background: rgba(248,250,252,0.95);
    color: #0f172a;
    font: inherit;
    outline: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.settings-select:focus,
.settings-input:focus{
    border-color: rgba(59,130,246,0.45);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.settings-switch{
    appearance: none;
    -webkit-appearance: none;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    flex: 0 0 auto;
}

.settings-switch::before{
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: transform 0.2s ease;
}

.settings-switch:checked{
    background: linear-gradient(120deg, #3b82f6, #8b5cf6);
}

.settings-switch:checked::before{
    transform: translateX(24px);
}

.settings-actions{
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

@media (max-width: 980px){
    .settings-modal{
        width: min(96vw, 960px);
        height: min(90vh, 820px);
    }

    .settings-shell{
        flex-direction: column;
    }

    .settings-sidebar{
        width: 100%;
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding-bottom: 16px;
    }

    .settings-nav{
        flex-direction: row;
        flex-wrap: wrap;
        overflow: visible;
    }

    .settings-tab{
        width: auto;
    }
}

@media (max-width: 640px){
    .settings-overlay{
        padding: 12px;
    }

    .settings-modal{
        width: 100%;
        height: min(92vh, 900px);
        border-radius: 22px;
    }

    .settings-content{
        padding: 20px 18px;
    }

    .settings-row{
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-select,
    .settings-input{
        width: 100%;
        min-width: 0;
    }

    .settings-actions{
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }

    .settings-actions > *{
        width: 100%;
    }
}

.settings-card-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.settings-media-card{
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.82);
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-media-preview{
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,0.08);
    background:
        linear-gradient(135deg, rgba(239,246,255,0.95), rgba(248,250,252,0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #64748b;
    font-weight: 700;
}

.avatar-preview{
    width: 110px;
    height: 110px;
    border-radius: 50%;
    align-self: flex-start;
}

.avatar-preview img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-preview{
    width: 100%;
    height: 110px;
}

.settings-file-btn{
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(248,250,252,0.95);
    border: 1px solid rgba(15,23,42,0.10);
    color: #0f172a;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.settings-file-btn:hover{
    transform: translateY(-1px);
    background: rgba(59,130,246,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.settings-row--stack{
    align-items: flex-start;
    flex-direction: column;
}

.settings-field-wrap{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-note{
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.settings-textarea{
    width: 100%;
    min-height: 110px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,0.10);
    background: rgba(248,250,252,0.95);
    color: #0f172a;
    font: inherit;
    outline: none;
    resize: vertical;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.settings-textarea:focus{
    border-color: rgba(59,130,246,0.45);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.settings-subsection{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.settings-subsection h5{
    margin: 4px 0 2px;
    font-size: 0.98rem;
    font-weight: 900;
    color: #0f172a;
}

.settings-friends-box,
.settings-info-box{
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.82);
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.settings-friends-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.settings-friends-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-friend-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.06);
}

.settings-friend-main{
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.settings-friend-main img{
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(59,130,246,0.14);
}

.settings-friend-main span{
    font-weight: 800;
    color: #0f172a;
}

.settings-remove-btn{
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(239,68,68,0.10);
    color: #b91c1c;
    font-weight: 800;
    border: 1px solid rgba(239,68,68,0.18);
}

.settings-remove-btn:hover{
    background: rgba(239,68,68,0.16);
    transform: translateY(-1px);
}

.settings-password-grid{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.settings-actions--sticky{
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(15,23,42,0.08);
    background: linear-gradient(180deg, rgba(250,250,250,0), rgba(250,250,250,0.7));
}

.settings-switch:disabled{
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 900px){
    .settings-card-grid{
        grid-template-columns: 1fr;
    }

    .settings-friends-head{
        flex-direction: column;
        align-items: flex-start;
    }
}

/* FOR COMPACT INTERFACE SETTINGS */

/* ==========================================
   GLOBAL CUSTOMIZATION SETTINGS
   ========================================== */

/* Compact Interface */
html[data-compact-ui="true"] .navbar{
    padding: 1rem 5%;
}

html[data-compact-ui="true"] .nav-search-input{
    height: 42px;
    padding: 0 10px;
}

html[data-compact-ui="true"] .nav-search-mode-btn{
    width: 30px;
    height: 30px;
}

html[data-compact-ui="true"] .dropdown-btn{
    padding: 0.65rem 1rem;
    min-width: 150px;
}

html[data-compact-ui="true"] .view-toggle{
    padding: 4px;
}

html[data-compact-ui="true"] .view-btn{
    width: 38px;
    height: 34px;
}

html[data-compact-ui="true"] .game-grid[data-view="grid"]{
    --card-min: 200px;
    --card-max: 236px;
    gap: 1.8rem;
}

html[data-compact-ui="true"] .game-grid[data-view="compact"]{
    --card-min: 128px;
    --card-max: 164px;
    gap: 1.1rem;
}

html[data-compact-ui="true"] .game-info{
    padding: 0.95rem 0.95rem 0.7rem;
}

html[data-compact-ui="true"] .game-actions{
    padding: 0 0.95rem 0.95rem;
}

html[data-compact-ui="true"] .game-info h4{
    font-size: 1rem;
}

html[data-compact-ui="true"] .game-sub{
    font-size: 0.8rem;
}

/* Reduced Motion */
html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

html[data-reduced-motion="true"] .theme-bg.is-wiping .wipe-reveal,
html[data-reduced-motion="true"] .theme-bg.is-wiping .wipe-hide{
    animation: none !important;
    transform: scaleX(1) !important;
}