/* Windows */
#windows-layer{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:var(--z-windows);}
.window{position:fixed;top:10%;left:10%;width:80%;height:80%;background:rgba(15,15,15,.95);border:1px solid #333;border-radius:12px;z-index:500;display:flex;flex-direction:column;pointer-events:auto;opacity:0;transform:scale(.95);transition:all .3s cubic-bezier(.19,1,.22,1);}
.window.active{opacity:1;pointer-events:auto;transform:scale(1);}
.window.minimized{transform:translateY(100%) scale(.5);opacity:0;pointer-events:none;}
.win-header{position:absolute;top:0;left:0;width:100%;height:45px;background:#111;border-bottom:1px solid #333;display:flex;align-items:center;justify-content:space-between;padding:0 20px;z-index:100;transform:translateY(-100%);transition:transform .3s ease;border-radius:12px 12px 0 0;}
.header-visible .win-header{transform:translateY(0);}
.win-title{font-family:var(--font-header);font-size:13px;color:#aaa;letter-spacing:2px;}
.win-controls{display:flex;gap:15px;align-items:center;}
.win-btn{width:16px;height:16px;border-radius:50%;cursor:pointer;transition:all .2s;display:flex;justify-content:center;align-items:center;color:transparent;position:relative;}
.win-btn:hover{color:#fff;}
.btn-min{background:#444;border:1px solid #666;}
.btn-min:hover{background:#888;transform:scale(1.15);}
.btn-min::before{content:'';width:8px;height:2px;background:currentColor;border-radius:2px;}
.btn-close{background:#555;border:1px solid #777;}
.btn-close:hover{transform:scale(1.15);box-shadow:0 0 8px #fff;background:#fff;color:#000;}
.btn-close::before,.btn-close::after{content:'';position:absolute;width:8px;height:2px;background:currentColor;border-radius:2px;}
.btn-close::before{transform:rotate(45deg);}
.btn-close::after{transform:rotate(-45deg);}
.win-body{
  flex:1;
  min-height:0;
  width:100%;
  overflow:hidden;
  position:relative;
  background:#000;
  border-radius:0 0 12px 12px;
  display:flex;
  flex-direction:column;
}
.win-body iframe{
  flex:1;
  min-height:0;
  width:100%;
  border:none;
  display:block;
  background:#fff;
}

/* Triggers */
#top-trigger{position:fixed;top:0;left:0;width:100%;height:20px;z-index:var(--z-triggers);}
#bottom-trigger{position:fixed;bottom:0;left:0;width:100%;height:30px;z-index:var(--z-triggers);}

/* Context menus */
.os-context-menu{position:fixed;display:none;background:#111;border:1px solid #333;border-radius:12px;padding:8px;min-width:220px;z-index:9999999!important;box-shadow:0 15px 35px rgba(0,0,0,.9);font-family:var(--font-main);list-style:none;}
.ctx-item{padding:10px 15px;color:#fff;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:12px;transition:.2s;border-radius:6px;}
.ctx-item i{color:#888;font-size:16px;transition:.2s;width:20px;text-align:center;}
.ctx-item:hover{background:#222;}
.ctx-item:hover i{color:#fff;}
.ctx-separator{height:1px;background:#333;margin:6px 0;}
.ctx-row{display:flex;gap:8px;padding:0 4px;}
.ctx-btn{flex:1;background:#222;border:1px solid #444;color:#ccc;border-radius:6px;padding:8px 0;cursor:pointer;transition:.2s;display:flex;justify-content:center;align-items:center;}
.ctx-btn:hover{background:#fff;color:#000;border-color:#fff;}

/* Toasts */
#toast-container{position:fixed;bottom:70px;right:20px;z-index:99999;display:flex;flex-direction:column;gap:10px;pointer-events:none;}
.toast-notification{background:#111;border:1px solid #333;border-radius:8px;width:340px;padding:15px;color:#fff;box-shadow:0 8px 25px rgba(0,0,0,.9);transform:translateX(120%);transition:transform .4s cubic-bezier(.2,.8,.2,1);pointer-events:auto;cursor:pointer;}
.toast-notification.show{transform:translateX(0);}
.toast-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.toast-app-info{display:flex;align-items:center;gap:8px;font-size:12px;color:#888;font-weight:700;}
.toast-icon{width:16px;height:16px;background:#333;border-radius:4px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;}
.toast-close{color:#888;font-size:14px;cursor:pointer;transition:.2s;}
.toast-close:hover{color:#fff;}
.toast-title{font-family:var(--font-main);font-weight:bold;font-size:15px;margin-bottom:4px;letter-spacing:.5px;}
.toast-body{font-family:var(--font-main);font-size:13px;color:#ccc;line-height:1.4;}

/* Modals (update-modal) */
.modal__backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:999999;align-items:center;justify-content:center;backdrop-filter:blur(10px);border:none;width:100%;height:100%;}
.modal__content{background:#111;border:1px solid #333;border-radius:16px;padding:30px;width:400px;max-width:90%;font-family:var(--font-main);}
.modal__header{margin-bottom:15px;border-bottom:1px solid #333;padding-bottom:10px;font-family:'Orbitron',sans-serif;color:#fff;}
.modal__list{color:#ccc;font-size:14px;margin-left:20px;line-height:1.8;margin-bottom:20px;}
.modal__btn{width:100%;padding:12px;background:#fff;color:#000;border:none;border-radius:8px;font-weight:bold;cursor:pointer;}

/* Legal modal */
#legal-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.85);backdrop-filter:blur(10px);z-index:999999;align-items:center;justify-content:center;padding:20px;}
#legal-modal>div{animation:legalSlideUp .4s ease;}
@keyframes legalSlideUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}
#legal-scroll::-webkit-scrollbar{width:6px;}
#legal-scroll::-webkit-scrollbar-track{background:#0d0d0d;border-radius:3px;}
#legal-scroll::-webkit-scrollbar-thumb{background:#444;border-radius:3px;}

/* Mobile warning */
#mobile-warning{display:none;position:fixed;inset:0;background:rgba(0,0,0,.95);z-index:999999;align-items:center;justify-content:center;backdrop-filter:blur(10px);border:none;}
#mobile-warning.show-warning{display:flex;}
.mobile-box{background:#111;border:2px solid #333;border-radius:16px;padding:30px;text-align:center;max-width:80%;box-shadow:0 10px 40px rgba(255,255,255,.05);}
.mobile-box i{font-size:3rem;color:#fff;margin-bottom:15px;}
.mobile-box h2{font-family:var(--font-header);font-size:1.2rem;color:#fff;margin-bottom:10px;}
.mobile-box p{color:#888;font-size:1rem;font-weight:600;}

/* Game mode indicator */
#game-mode-indicator{position:fixed;bottom:20px;right:20px;background:rgba(0,0,0,.7);color:#0f0;font-family:monospace;font-size:11px;padding:5px 10px;border-radius:5px;z-index:99999;pointer-events:none;display:none;}
#game-mode-indicator.show{display:block;}
.game-mode-active{cursor:none!important;}
.game-mode-active iframe{cursor:crosshair;}
.game-fullscreen{position:fixed!important;top:0!important;left:0!important;width:100vw!important;height:100vh!important;z-index:99999!important;border:none!important;border-radius:0!important;}

/* Scrollbars */
::-webkit-scrollbar{width:8px;height:8px;}
::-webkit-scrollbar-track{background:rgba(255,255,255,.05);}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.3);border-radius:4px;}
