
:root{--primary:#0f0f0f;--secondary:#aaa;--highlight:#ff2e2e;--bg:#111;--card-bg:#1a1a1a;--text-color:white;--radius:16px;--shadow:0 10px 30px rgba(0,0,0,.3)}
body.light-mode{--primary:#f4f4f4;--secondary:#555;--bg:#fff;--card-bg:#f4f4f4;--text-color:#111;--shadow:0 5px 20px rgba(0,0,0,.1)}
*{margin:0;padding:0;box-sizing:border-box;font-family:"Cairo",sans-serif}
body{background:linear-gradient(135deg,#0f0f0f 0%,#1a1a1a 50%,#0f0f0f 100%);color:var(--text-color);min-height:100vh;overflow-x:hidden}
body.light-mode{background:linear-gradient(135deg,#f4f4f4 0%,#fff 50%,#f4f4f4 100%)}
.loading-screen{position:fixed;inset:0;background:#0f0f0f;display:flex;align-items:center;justify-content:center;z-index:99999;transition:.5s}
.loading-screen.hidden{opacity:0;visibility:hidden;pointer-events:none}.loading-content{text-align:center}.loading-logo{font-size:90px;color:var(--highlight);margin-bottom:25px;animation:pulse 2s infinite}.loading-spinner{width:50px;height:50px;border:4px solid rgba(255,46,46,.2);border-top-color:var(--highlight);border-radius:50%;margin:0 auto 20px;animation:spin 1s linear infinite}.loading-text{color:var(--highlight);font-weight:700}.loading-progress{width:220px;height:4px;background:rgba(255,46,46,.2);border-radius:2px;margin:20px auto;overflow:hidden}.loading-progress-bar{height:100%;background:var(--highlight);width:0}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{transform:scale(1.05)}}
header{background:rgba(26,26,26,.95);backdrop-filter:blur(10px);padding:15px 20px;position:sticky;top:0;z-index:1000;border-bottom:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}
body.light-mode header{background:rgba(255,255,255,.95);border-bottom:1px solid rgba(0,0,0,.1)}
.logo{display:flex;align-items:center;gap:12px;font-size:1.5rem;font-weight:900;color:var(--highlight)}.logo-mark{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:rgba(255,46,46,.12)}
.nav-search-wrapper{display:flex;align-items:center;gap:30px;flex:1;justify-content:center}nav ul{display:flex;list-style:none;gap:18px;align-items:center}nav a{color:var(--text-color);text-decoration:none;font-weight:700;padding:8px 14px;border-radius:20px;transition:.3s}nav a:hover,nav a.active{background:rgba(255,46,46,.12);color:var(--highlight)}
.search-container{display:flex;align-items:center;position:relative;flex:.5;max-width:320px}.search-box{width:100%;padding:12px 45px 12px 20px;border:2px solid #444;border-radius:25px;background:#2a2a2a;color:white;font-size:16px}.search-icon{position:absolute;right:15px;color:var(--secondary)}
#toggle-mode-mobile{background:var(--card-bg);border:1px solid rgba(255,255,255,.1);color:var(--text-color);padding:10px;border-radius:50%;cursor:pointer;width:42px;height:42px;display:grid;place-items:center}.icon-moon,.icon-sun{width:20px;height:20px}body:not(.light-mode) .icon-sun{display:none}body.light-mode .icon-moon{display:none}
.hero{text-align:center;padding:70px 20px;background:radial-gradient(circle at center,rgba(255,46,46,.1) 0%,transparent 70%);opacity:0;transform:translateY(30px);transition:1s}.hero.visible{opacity:1;transform:translateY(0)}.hero-icon{font-size:72px;color:var(--highlight);margin-bottom:14px}.hero h1{font-size:3rem;color:var(--highlight);letter-spacing:4px}.hero-subtitle{font-size:1.15rem;color:var(--secondary)}
.devices-section,.games-section{padding:40px 20px;max-width:1400px;margin:0 auto}.hidden-section{display:none}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px;gap:20px;flex-wrap:wrap}.section-header h2{font-size:2.3rem;color:var(--highlight)}.stats{display:flex;gap:14px;flex-wrap:wrap}.stat{background:var(--card-bg);padding:10px 18px;border-radius:25px;border:1px solid rgba(255,46,46,.22);color:var(--secondary);font-weight:700}
.sort-controls{display:flex;justify-content:flex-end;margin-bottom:25px}.sort-dropdown{position:relative}.sort-toggle,.refresh-btn{display:flex;align-items:center;gap:8px;background:var(--card-bg);border:1px solid rgba(255,255,255,.1);color:var(--text-color);padding:10px 15px;border-radius:10px;cursor:pointer}.sort-menu{position:absolute;top:105%;right:0;background:var(--card-bg);border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:8px 0;min-width:210px;opacity:0;visibility:hidden;transform:translateY(-10px);transition:.25s;z-index:10;box-shadow:var(--shadow)}.sort-menu.open{opacity:1;visibility:visible;transform:translateY(0)}.sort-option{display:flex;align-items:center;gap:10px;padding:10px 15px;color:var(--text-color);background:none;border:0;width:100%;text-align:left;cursor:pointer}.sort-option:hover,.sort-option.active{background:rgba(255,46,46,.1);color:var(--highlight)}
.devices-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:22px;margin-top:20px}.device-card{background:var(--card-bg);border:1px solid rgba(255,46,46,.12);border-radius:var(--radius);padding:24px;transition:.3s;position:relative;overflow:hidden}.device-card:hover{border-color:var(--highlight);box-shadow:0 10px 40px rgba(255,46,46,.2);transform:translateY(-6px)}.device-card.unavailable{opacity:.72}.device-header{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px}.device-header h3{font-size:1.25rem}.status-badge{display:flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;font-size:.85rem;font-weight:800;white-space:nowrap}.status-badge.available{background:rgba(46,255,46,.1);color:#2eff2e}.status-badge.unavailable{background:rgba(255,46,46,.1);color:var(--highlight)}.specs{display:flex;align-items:flex-start;gap:10px;color:var(--secondary);margin-bottom:10px}.price{display:flex;align-items:center;gap:10px;color:var(--highlight);font-weight:900;font-size:1.05rem}
.games-tools{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px;flex-wrap:wrap}.category-tabs{display:flex;gap:10px;flex-wrap:wrap}.category-tab{background:var(--card-bg);color:var(--text-color);border:1px solid rgba(255,46,46,.2);border-radius:999px;padding:9px 14px;cursor:pointer;font-weight:800}.category-tab span{color:var(--highlight);margin-left:6px}.category-tab.active,.category-tab:hover{background:rgba(255,46,46,.14);border-color:var(--highlight)}
.games-meta{display:flex;gap:14px;flex-wrap:wrap;color:var(--secondary);margin-bottom:18px}.games-meta span{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);padding:8px 12px;border-radius:10px}
.games-container{display:flex;flex-direction:column;gap:24px}.game-category{background:var(--card-bg);border:1px solid rgba(255,46,46,.18);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}.game-category-header{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:20px 22px;border-bottom:1px solid rgba(255,255,255,.08);background:linear-gradient(90deg,rgba(255,46,46,.11),transparent)}.game-category-header h3{color:var(--highlight);font-size:1.45rem}.game-category-header p{color:var(--secondary)}.category-summary{display:flex;gap:10px;flex-wrap:wrap}.category-summary span{background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.08);padding:8px 10px;border-radius:10px;color:var(--secondary)}
.games-table{width:100%;overflow:hidden}.games-row{display:grid;grid-template-columns:1fr 140px 140px;gap:16px;padding:14px 22px;border-bottom:1px solid rgba(255,255,255,.06);align-items:center}.games-row:last-child{border-bottom:0}.games-row:hover{background:rgba(255,46,46,.055)}.games-head{font-weight:900;color:var(--highlight);background:rgba(0,0,0,.18)}.game-name{font-weight:700;display:flex;align-items:center;gap:8px}.game-price{color:var(--highlight);font-weight:900}
.empty-state{display:none;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;color:var(--secondary);gap:18px}.empty-state i{font-size:70px;color:rgba(255,46,46,.35)}.maintenance-card{grid-column:1/-1;text-align:center;padding:70px 25px;background:var(--card-bg);border:1px solid rgba(255,46,46,.35);border-radius:var(--radius);box-shadow:var(--shadow)}.maintenance-card i{font-size:70px;color:var(--highlight);margin-bottom:18px}.maintenance-card h2{color:var(--highlight);font-size:2rem;margin-bottom:10px}.maintenance-card p{color:var(--secondary)}.mini-notice{position:fixed;bottom:24px;right:24px;background:var(--card-bg);border:1px solid rgba(255,46,46,.35);color:var(--text-color);padding:12px 16px;border-radius:12px;box-shadow:var(--shadow);z-index:9999}
@media(max-width:768px){header{flex-direction:column}.nav-search-wrapper{flex-direction:column;width:100%;gap:14px}nav ul{gap:8px;font-size:.9rem;flex-wrap:wrap;justify-content:center}.search-container{width:100%;max-width:100%;flex:1}.hero h1{font-size:2rem}.section-header{align-items:flex-start}.devices-grid{grid-template-columns:1fr}.sort-controls{justify-content:flex-start}.games-row{grid-template-columns:1fr;gap:5px}.game-category-header{flex-direction:column;align-items:flex-start}}
.login-box{
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,46,46,.3);
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.login-box input{
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #222;
  color: white;
}

.login-box button{
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #ff2e2e;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

/* Auth / profile */
.auth-area{display:flex;align-items:center;gap:10px}
.auth-login-btn,.profile-chip{display:flex;align-items:center;gap:8px;text-decoration:none;border:1px solid rgba(255,46,46,.28);background:var(--card-bg);color:var(--text-color);padding:9px 14px;border-radius:999px;font-weight:900;cursor:pointer;transition:.25s}
.auth-login-btn:hover,.profile-chip:hover{border-color:var(--highlight);background:rgba(255,46,46,.12);color:var(--highlight)}
.hidden{display:none!important}
.profile-avatar,.profile-panel-avatar{display:grid;place-items:center;background:rgba(255,46,46,.18);color:var(--highlight);font-weight:900;border:1px solid rgba(255,46,46,.35)}
.profile-avatar{width:28px;height:28px;border-radius:50%}
.profile-name{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-overlay{position:fixed;inset:0;background:rgba(0,0,0,.65);backdrop-filter:blur(7px);z-index:10000;display:flex;align-items:center;justify-content:center;padding:20px}
.profile-panel{width:min(440px,100%);background:var(--card-bg);border:1px solid rgba(255,46,46,.35);border-radius:22px;padding:24px;box-shadow:var(--shadow);position:relative}
.profile-close{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:var(--text-color);cursor:pointer;font-size:20px}
.profile-panel-header{display:flex;align-items:center;gap:16px;margin-bottom:22px}.profile-panel-avatar{width:64px;height:64px;border-radius:20px;font-size:28px}.profile-panel-header h2{color:var(--highlight);font-size:1.7rem}.profile-panel-header p{color:var(--secondary);font-weight:700}.profile-details{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:20px}.profile-detail{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.03)}.profile-detail span{color:var(--secondary)}.profile-detail strong{color:var(--text-color)}.logout-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;border-radius:12px;border:0;background:linear-gradient(135deg,var(--highlight),#ff5555);color:white;font-weight:900;cursor:pointer}

/* Login page */
.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at center,rgba(255,46,46,.16),transparent 55%),linear-gradient(135deg,#080808,#171717)}
.login-page-wrap{width:min(440px,calc(100% - 32px))}.back-home{display:inline-flex;align-items:center;gap:6px;color:var(--secondary);text-decoration:none;margin-bottom:16px;font-weight:800}.back-home:hover{color:var(--highlight)}.login-card{background:var(--card-bg);border:1px solid rgba(255,46,46,.32);border-radius:24px;padding:32px;box-shadow:var(--shadow)}.login-logo{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;background:rgba(255,46,46,.13);color:var(--highlight);font-size:40px;margin-bottom:18px}.login-card h1{font-size:2rem;color:var(--highlight);margin-bottom:6px}.login-card p{color:var(--secondary);margin-bottom:18px}.login-card label{display:block;color:var(--text-color);font-weight:800;margin:14px 0 7px}.login-card input{width:100%;padding:13px 14px;border-radius:12px;border:1px solid #444;background:#222;color:white;font-size:15px}.login-card input:focus{outline:none;border-color:var(--highlight);box-shadow:0 0 0 3px rgba(255,46,46,.16)}.login-card button{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:18px;padding:13px;border-radius:12px;border:0;background:linear-gradient(135deg,var(--highlight),#ff5555);color:white;font-weight:900;cursor:pointer;font-size:16px}.login-card button:disabled{opacity:.7;cursor:not-allowed}.login-error{padding:10px 12px;background:rgba(255,46,46,.12);border:1px solid rgba(255,46,46,.32);border-radius:10px;color:#ff8b8b!important;margin-top:14px!important;margin-bottom:0!important}
@media(max-width:768px){.auth-area{width:100%;justify-content:center}.profile-name{max-width:180px}.login-card{padding:24px}}

/* Profile data cards */
.profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.profile-stat-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,46,46,.22);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:6px}
.profile-stat-card i{font-size:24px;color:var(--highlight)}
.profile-stat-card span{color:var(--secondary);font-weight:800;font-size:.9rem}
.profile-stat-card strong{color:var(--text-color);font-size:1.25rem;word-break:break-word}
.profile-section-title{display:flex;align-items:center;gap:8px;color:var(--highlight);font-weight:900;margin:8px 0 10px}
.profile-time-products{margin-bottom:18px}
.time-products-list{display:flex;flex-direction:column;gap:10px}
.time-product-item,.time-product-empty{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03);border-radius:12px;padding:12px 14px}
.time-product-item{display:flex;justify-content:space-between;gap:12px;align-items:center}
.time-product-item strong{color:var(--text-color)}
.time-product-item span,.time-product-empty{color:var(--secondary);font-weight:700}
@media(max-width:520px){.profile-stats{grid-template-columns:1fr}.time-product-item{flex-direction:column;align-items:flex-start}}

/* Reserve button and reservation modal */
.reserve-btn{margin-top:14px;width:100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,46,46,.35);background:linear-gradient(135deg,var(--highlight),#ff5555);color:#fff;font-weight:900;cursor:pointer;transition:.25s}
.reserve-btn:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(255,46,46,.25)}
.reservation-overlay{position:fixed;inset:0;background:rgba(0,0,0,.68);backdrop-filter:blur(8px);z-index:10001;display:flex;align-items:center;justify-content:center;padding:20px}
.reservation-modal{width:min(460px,100%);background:var(--card-bg);border:1px solid rgba(255,46,46,.35);border-radius:24px;padding:24px;box-shadow:var(--shadow);position:relative}
.reservation-close{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:var(--text-color);cursor:pointer;font-size:20px}
.reservation-modal-header{display:flex;align-items:center;gap:14px;margin-bottom:20px}.reservation-icon{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:rgba(255,46,46,.14);border:1px solid rgba(255,46,46,.28);color:var(--highlight);font-size:30px}.reservation-modal-header h2{color:var(--highlight);font-size:1.7rem}.reservation-modal-header p{color:var(--secondary);font-weight:800}
.reservation-form{display:flex;flex-direction:column;gap:9px}.reservation-form label{font-weight:900;color:var(--text-color);margin-top:6px}.reservation-form label span{color:var(--secondary);font-size:.85rem}.reservation-form input,.reservation-form select,.reservation-form textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid #444;background:#222;color:white;font-size:15px}.reservation-form input:focus,.reservation-form select:focus,.reservation-form textarea:focus{outline:none;border-color:var(--highlight);box-shadow:0 0 0 3px rgba(255,46,46,.16)}.reservation-submit{margin-top:12px;display:flex;align-items:center;justify-content:center;gap:8px;padding:13px;border-radius:12px;border:0;background:linear-gradient(135deg,var(--highlight),#ff5555);color:white;font-weight:900;cursor:pointer;font-size:16px}.reservation-submit:disabled{opacity:.7;cursor:not-allowed}

/* Modern games cards */
.games-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px;padding:18px}.game-card{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:14px;transition:.25s}.game-card:hover{border-color:rgba(255,46,46,.45);background:rgba(255,46,46,.07);transform:translateY(-3px)}.game-card-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:rgba(255,46,46,.13);color:var(--highlight);font-size:24px}.game-card-info h4{font-size:1rem;color:var(--text-color);line-height:1.35}.game-card-info p{color:var(--secondary);font-size:.85rem;margin-top:3px}.game-card-stats{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid rgba(255,255,255,.07);padding-top:10px}.game-card-stats span{color:var(--secondary);font-weight:800}.game-card-stats strong{color:var(--highlight);font-weight:900}
@media(max-width:520px){.reservation-modal{padding:20px}.games-card-grid{grid-template-columns:1fr;padding:14px}}

/* =========================================================
   MOBILE UI REBUILD - added by ChatGPT
   Keeps desktop design unchanged and only improves phones/tablets
   ========================================================= */
@media (max-width: 768px){
  html{font-size:15px;scroll-padding-top:132px}
  body{min-width:0;background:#0b0b0b;color:var(--text-color)}

  /* Compact app header */
  header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;
    gap:10px;
    padding:10px 12px 12px;
    position:sticky;
    top:0;
    border-bottom:1px solid rgba(255,46,46,.18);
    box-shadow:0 12px 28px rgba(0,0,0,.28);
  }

  .logo{min-width:0;font-size:1rem;gap:8px;line-height:1.1}
  .logo span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .logo-mark{width:34px;height:34px;min-width:34px;font-size:19px}

  .auth-area{width:auto!important;justify-content:flex-end;gap:6px;order:2}
  .auth-login-btn,.profile-chip{
    height:36px;
    padding:0 10px;
    border-radius:999px;
    font-size:.82rem;
    max-width:126px;
  }
  .auth-login-btn i,.profile-chip i{font-size:17px}
  .profile-avatar{width:24px;height:24px;font-size:.78rem;min-width:24px}
  .profile-name{max-width:74px!important;font-size:.82rem}

  #toggle-mode-mobile{
    order:3;
    width:36px;
    height:36px;
    padding:8px;
    min-width:36px;
  }

  /* Search + menu become a small mobile toolbar */
  .nav-search-wrapper{
    order:4;
    grid-column:1 / -1;
    width:100%;
    display:flex!important;
    flex-direction:column!important;
    gap:9px!important;
    align-items:stretch!important;
  }

  nav{width:100%;overflow:hidden}
  nav ul{
    width:100%;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    gap:7px!important;
    overflow-x:auto;
    padding:2px 1px 4px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  nav ul::-webkit-scrollbar,.category-tabs::-webkit-scrollbar{display:none}
  nav li{flex:0 0 auto;scroll-snap-align:start}
  nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:33px;
    padding:7px 11px!important;
    border-radius:999px!important;
    font-size:.82rem;
    line-height:1;
    white-space:nowrap;
    background:rgba(255,255,255,.045);
    border:1px solid rgba(255,255,255,.075);
  }
  nav a.active,nav a:hover{border-color:rgba(255,46,46,.45);background:rgba(255,46,46,.14)}

  .search-container{width:100%!important;max-width:none!important;flex:none!important}
  .search-box{
    height:42px;
    padding:10px 42px 10px 14px!important;
    border-radius:14px!important;
    font-size:.92rem!important;
    background:#1f1f1f;
  }
  .search-icon{right:14px;font-size:19px}

  /* Hero reduced for phone */
  .hero{
    padding:28px 14px 20px!important;
    background:radial-gradient(circle at top,rgba(255,46,46,.16),transparent 64%);
  }
  .hero-icon{font-size:42px!important;margin-bottom:8px!important}
  .hero h1{font-size:1.72rem!important;letter-spacing:1.5px!important;line-height:1.15}
  .hero-subtitle{font-size:.9rem;max-width:310px;margin:6px auto 0;line-height:1.5}

  /* Sections */
  .devices-section,.games-section{padding:20px 12px 28px!important;max-width:100%}
  .section-header{display:grid!important;grid-template-columns:1fr;gap:12px!important;margin-bottom:16px!important}
  .section-header h2{font-size:1.55rem!important;line-height:1.2}
  .stats{gap:8px!important;width:100%}
  .stat{flex:1;min-width:0;text-align:center;padding:8px 10px!important;border-radius:14px!important;font-size:.82rem}

  .sort-controls{justify-content:stretch!important;margin-bottom:15px!important}
  .sort-dropdown{width:100%}
  .sort-toggle,.refresh-btn{
    width:100%;
    min-height:40px;
    justify-content:center;
    border-radius:14px!important;
    padding:9px 12px!important;
    font-size:.86rem;
  }
  .sort-menu{left:0;right:0;min-width:0;width:100%;z-index:1002}
  .sort-option{padding:11px 13px;font-size:.9rem}

  /* PC cards */
  .devices-grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:14px!important}
  .device-card{
    border-radius:18px!important;
    padding:15px!important;
    box-shadow:0 8px 22px rgba(0,0,0,.24);
  }
  .device-card:hover{transform:none!important}
  .device-header{align-items:flex-start;margin-bottom:10px!important}
  .device-header h3{font-size:1.06rem!important;line-height:1.35;word-break:break-word}
  .status-badge{padding:5px 9px!important;font-size:.74rem!important;min-width:max-content}
  .specs,.price{font-size:.87rem!important;line-height:1.45;margin-bottom:7px!important;gap:8px!important}
  .reserve-btn{min-height:42px;border-radius:14px!important;margin-top:12px!important}

  /* Games area */
  .games-tools{display:grid!important;grid-template-columns:1fr;gap:10px!important;margin-bottom:14px!important}
  .category-tabs{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:7px!important;
    overflow-x:auto;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
  }
  .category-tab{
    flex:0 0 auto;
    padding:8px 11px!important;
    font-size:.82rem;
    border-radius:999px!important;
  }
  .games-meta{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important;margin-bottom:12px!important}
  .games-meta span{padding:8px 9px!important;border-radius:12px!important;font-size:.78rem;text-align:center}
  .games-container{gap:14px!important}
  .game-category{border-radius:18px!important}
  .game-category-header{
    padding:14px!important;
    gap:10px!important;
  }
  .game-category-header h3{font-size:1.15rem!important;line-height:1.25}
  .game-category-header p{font-size:.82rem;line-height:1.45}
  .category-summary{width:100%;display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important}
  .category-summary span{font-size:.78rem;padding:7px 8px!important;text-align:center}
  .games-card-grid{grid-template-columns:1fr!important;gap:10px!important;padding:12px!important}
  .game-card{grid-template-columns:40px 1fr!important;gap:10px!important;padding:12px!important;border-radius:15px!important}
  .game-card:hover{transform:none!important}
  .game-card-icon{width:40px;height:40px;border-radius:13px;font-size:21px}
  .game-card-info h4{font-size:.95rem!important;line-height:1.35}
  .game-card-info p{font-size:.78rem!important}
  .game-card-stats{padding-top:9px!important;font-size:.82rem}

  /* Empty / maintenance */
  .maintenance-card,.empty-state{padding:38px 16px!important;border-radius:18px!important}
  .maintenance-card i,.empty-state i{font-size:46px!important}
  .maintenance-card h2,.empty-state h3{font-size:1.22rem!important;line-height:1.45}
  .maintenance-card p,.empty-state p{font-size:.9rem;line-height:1.55}

  /* Profile and reservation become clean mobile sheets */
  .profile-overlay,.reservation-overlay{align-items:flex-end!important;padding:0!important;background:rgba(0,0,0,.72)}
  .profile-panel,.reservation-modal{
    width:100%!important;
    max-height:92vh;
    overflow:auto;
    border-radius:24px 24px 0 0!important;
    padding:22px 16px 18px!important;
    border-left:0!important;
    border-right:0!important;
    border-bottom:0!important;
  }
  .profile-close,.reservation-close{top:12px!important;right:12px!important;width:34px;height:34px}
  .profile-panel-header,.reservation-modal-header{gap:12px!important;margin-bottom:16px!important;padding-right:38px}
  .profile-panel-avatar{width:54px!important;height:54px!important;border-radius:17px!important;font-size:23px!important}
  .profile-panel-header h2,.reservation-modal-header h2{font-size:1.28rem!important;line-height:1.2}
  .profile-panel-header p,.reservation-modal-header p{font-size:.84rem!important;line-height:1.4}
  .profile-stats{grid-template-columns:1fr 1fr!important;gap:9px!important}
  .profile-stat-card{padding:12px!important;border-radius:14px!important}
  .profile-stat-card strong{font-size:1rem!important}
  .profile-detail{padding:10px 11px!important;border-radius:12px!important;font-size:.86rem}
  .time-product-item{align-items:flex-start!important;flex-direction:column!important;gap:4px!important}
  .logout-btn,.reservation-submit{min-height:44px;border-radius:14px!important}
  .reservation-form input,.reservation-form select,.reservation-form textarea{font-size:16px!important;border-radius:13px!important}

  /* Login page */
  .login-page{display:block;padding:22px 0;background:radial-gradient(circle at top,rgba(255,46,46,.18),transparent 48%),#090909}
  .login-page-wrap{width:100%!important;padding:0 14px;margin:0 auto}
  .login-card{padding:22px!important;border-radius:22px!important}
  .login-logo{width:58px!important;height:58px!important;border-radius:18px!important;font-size:32px!important;margin-bottom:14px!important}
  .login-card h1{font-size:1.55rem!important}
  .login-card p{font-size:.9rem!important;line-height:1.5}
  .login-card input{font-size:16px!important;border-radius:13px!important}

  .mini-notice{left:12px!important;right:12px!important;bottom:14px!important;text-align:center;border-radius:14px!important}
}

@media (max-width: 390px){
  .logo span{max-width:142px}
  .auth-login-btn,.profile-chip{max-width:108px;padding:0 8px;font-size:.78rem}
  .profile-name{max-width:58px!important}
  nav a{font-size:.78rem;padding:7px 9px!important}
  .hero h1{font-size:1.52rem!important}
  .section-header h2{font-size:1.4rem!important}
  .games-meta{grid-template-columns:1fr!important}
  .profile-stats{grid-template-columns:1fr!important}
}
