
  :root{--bg:#0d1117;--panel:#161b22;--panel2:#1c2128;--panel3:#222831;--blue:#0088cc;--gold:#ffd700;--win:#3dff9e;--text:#e6edf3;--text-muted:#8b949e}
  *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
  html, body{margin:0;padding:0;width:100%;overflow-x:hidden;}
  body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--text);padding-bottom:70px; overscroll-behavior-y: none;}

  .header{display:flex;justify-content:space-between;align-items:center;padding:10px 15px;background:var(--panel);position:sticky;top:0;z-index:10;border-bottom:1px solid #333}
  .balances{display:flex;align-items:center;background:var(--panel2);padding:6px 12px;border-radius:20px;font-size:13px;gap:8px;font-weight:bold;border:1px solid #333}
  .bal-item{display:flex;align-items:center;gap:4px}
  .header-right{display:flex;align-items:center;gap:10px}
  .topup-btn{width:34px;height:34px;border-radius:50%;background:var(--blue);border:none;color:#fff;font-size:24px;font-weight:bold;display:flex;align-items:center;justify-content:center;cursor:pointer}
  .profile-btn{width:34px;height:34px;border-radius:50%;background:var(--panel2);border:1px solid #444;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:14px}
  .help-btn{width:34px;height:34px;border-radius:50%;background:var(--panel2);border:1px solid #444;color:var(--text-muted);font-size:16px;font-weight:bold;cursor:pointer;display:flex;align-items:center;justify-content:center}
  .help-btn:active{transform:scale(0.94)}

  /* ===== ONBOARDING MODAL ===== */
  .onboard-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.85);z-index:200;display:none;align-items:center;justify-content:center;padding:20px;animation:fadeIn 0.2s ease}
  .onboard-overlay.active{display:flex}
  @keyframes fadeIn{from{opacity:0}to{opacity:1}}
  .onboard-modal{background:var(--panel);border-radius:24px;padding:24px 20px;width:100%;max-width:400px;border:1px solid #333;position:relative;max-height:90vh;overflow-y:auto;animation:slideUp 0.3s ease}
  @keyframes slideUp{from{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}
  .onboard-close{position:absolute;top:12px;right:12px;width:32px;height:32px;border-radius:50%;background:var(--panel2);border:none;color:var(--text-muted);font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center}
  .onboard-icon{font-size:56px;text-align:center;margin-bottom:12px}
  .onboard-title{font-size:22px;font-weight:900;text-align:center;margin:0 0 8px 0}
  .onboard-subtitle{font-size:14px;color:var(--text-muted);text-align:center;line-height:1.5;margin:0 0 20px 0}
  .onboard-step{display:flex;gap:12px;margin-bottom:14px;align-items:flex-start}
  .onboard-step-num{width:28px;height:28px;border-radius:50%;background:var(--blue);color:#fff;font-weight:bold;font-size:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
  .onboard-step-text{font-size:13px;line-height:1.5;color:var(--text);padding-top:4px}
  .onboard-cta{display:flex;flex-direction:column;gap:10px;margin-top:20px}
  .onboard-btn{width:100%;padding:14px;border-radius:14px;border:none;font-size:15px;font-weight:bold;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}
  .onboard-btn-primary{background:var(--blue);color:#fff}
  .onboard-btn-secondary{background:var(--panel2);color:var(--text);border:1px solid #333}
  .onboard-footer{text-align:center;font-size:12px;color:var(--text-muted);margin-top:16px;padding-top:16px;border-top:1px solid #333}

  /* Banner для new user в меню кейсов */
  .new-user-banner{grid-column:1/-1;background:linear-gradient(135deg,rgba(0,136,204,.25),rgba(0,212,255,.08));border-radius:20px;padding:18px;border:1px solid rgba(0,136,204,.5);margin-bottom:10px}
  .new-user-banner-title{font-size:17px;font-weight:900;margin:0 0 8px 0;color:var(--text)}
  .new-user-banner-text{font-size:13px;color:var(--text-muted);line-height:1.5;margin:0 0 14px 0}
  .new-user-banner-actions{display:flex;gap:8px}
  .new-user-banner-btn{flex:1;padding:10px;border-radius:10px;border:none;font-size:13px;font-weight:bold;cursor:pointer}
  .new-user-banner-btn.primary{background:var(--blue);color:#fff}
  .new-user-banner-btn.secondary{background:var(--panel2);color:var(--text);border:1px solid #444}


  .view{display:none; width:100%; overflow-x:clip; overflow-y:visible;}.view.active{display:block}
  
    /* ===== 100 TON GIVEAWAY ===== */
  .ton-giveaway-banner { margin: 0 15px 15px 15px; background: linear-gradient(135deg, #fbbf24, #f59e0b); border-radius: 20px; padding: 16px; position: relative; overflow: hidden; cursor: pointer; box-shadow: 0 8px 24px rgba(245,158,11,0.4), inset 0 1px 0 rgba(255,255,255,0.3); }
  .ton-giveaway-banner:active { transform: scale(0.98); }
  .ton-giveaway-banner::before { content: "💰"; position: absolute; top: -20px; right: -20px; font-size: 100px; opacity: 0.15; transform: rotate(15deg); }
  .ton-giveaway-title { font-size: 18px; font-weight: 900; color: #000; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
  .ton-giveaway-sub { font-size: 12px; font-weight: 700; color: rgba(0,0,0,0.7); margin-bottom: 12px; }
  .ton-giveaway-status { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; font-size: 12px; font-weight: 900; }
  .ton-giveaway-status.unlocked { background: rgba(0,0,0,0.85); color: #3dff9e; border: 1px solid rgba(61,255,158,0.5); }
  .ton-giveaway-status.locked { background: rgba(0,0,0,0.5); color: #fff; }
  .ton-giveaway-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 24px; color: #000; opacity: 0.5; }
  /* ===== /100 TON GIVEAWAY ===== */

  /* ===== CONTEST CAROUSEL ===== */
  .contest-carousel { margin: 0 15px 15px 15px; position: relative; }
  .contest-carousel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 0 4px; }
  .contest-carousel-title-text { font-size: 12px; font-weight: 900; color: #888; text-transform: uppercase; letter-spacing: 1px; }
  .contest-carousel-title-link { font-size: 11px; font-weight: 900; color: #00d4ff; cursor: pointer; }
  .contest-carousel-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .contest-carousel-track::-webkit-scrollbar { display: none; }
  .contest-slide { flex: 0 0 calc(100% - 20px); scroll-snap-align: center; border-radius: 16px; padding: 14px; position: relative; overflow: hidden; cursor: pointer; transition: transform 0.15s; }
  .contest-slide:active { transform: scale(0.98); }
  .contest-slide-title { font-size: 15px; font-weight: 900; color: #000; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
  .contest-slide-sub { font-size: 12px; font-weight: 700; color: rgba(0,0,0,0.7); margin-bottom: 8px; }
  .contest-slide-tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 10px; font-weight: 900; }
  .contest-slide-tag { background: rgba(0,0,0,0.4); padding: 3px 8px; border-radius: 6px; color: #fff; }
  .contest-slide-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 20px; color: #000; opacity: 0.4; }
  .contest-carousel-dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
  .contest-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.2s; }
  .contest-dot.active { background: #00d4ff; width: 18px; border-radius: 3px; }

  /* ===== MENU TABS ===== */
  .top-tabs-bar { position: sticky; top: 55px; z-index: 9; background: var(--bg); border-bottom: 1px solid #2a2a2a; padding: 8px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
  .top-tabs-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 0 15px; scrollbar-width: none; }
  .top-tabs-scroll::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; padding: 8px 16px; border-radius: 12px; border: 1px solid #333; background: var(--panel2); color: var(--text-muted); font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
  .tab-btn[data-active="1"] { background: linear-gradient(135deg, #0088cc, #00d4ff); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(0,136,204,0.4); }
  .tab-btn:active { transform: scale(0.95); }
  .tab-content { padding: 12px 0; }
  .h-section { margin-bottom: 20px; }
  .h-section-header { display: flex; justify-content: space-between; align-items: center; padding: 0 15px; margin-bottom: 10px; cursor: pointer; }
  .h-section-title { font-size: 16px; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 8px; }
  .h-section-all { font-size: 12px; color: #00d4ff; font-weight: 800; padding: 4px 10px; background: rgba(0,136,204,0.12); border-radius: 8px; }
  .h-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 15px 10px 15px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .h-scroll::-webkit-scrollbar { display: none; }
  .h-card { flex-shrink: 0; width: 140px; scroll-snap-align: start; background: var(--panel2); border-radius: 16px; overflow: hidden; cursor: pointer; border: 1px solid #333; position: relative; }
  .h-card:active { transform: scale(0.96); }
  .h-card-cover { aspect-ratio: 1; background: #111; overflow: hidden; position: relative; }
  .h-card-cover img { width: 100%; height: 100%; object-fit: cover; }
  .h-card-info { padding: 8px 10px; }
  .h-card-name { font-size: 12px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
  .h-card-price { font-size: 11px; color: #00d4ff; font-weight: 900; }
  .h-card-badge { position: absolute; top: 6px; left: 6px; background: linear-gradient(135deg,#ff4500,#ff8c00); color: #fff; font-size: 10px; font-weight: 900; padding: 3px 8px; border-radius: 8px; z-index: 2; }
  .h-empty { padding: 24px 15px; text-align: center; color: #888; font-size: 13px; background: var(--panel2); border-radius: 16px; margin: 0 15px; }
  .h-category-header { display: flex; align-items: center; padding: 12px 15px; gap: 12px; background: var(--panel); border-bottom: 1px solid #2a2a2a; margin-bottom: 12px; }
  /* ===== /MENU TABS ===== */

  .cases-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:15px}
  .case-card{background:#1c2128;border-radius:20px;padding:10px 8px;text-align:center;cursor:pointer;border:1px solid rgba(255,255,255,0.08);position:relative;transition:transform 0.2s ease;box-shadow:0 4px 12px rgba(0,0,0,0.2)}
  .case-card:active{transform:scale(0.96)}
  .case-card.locked{opacity:0.5;filter:grayscale(1);cursor:not-allowed}
  .case-img-main{width: 90px; height: 90px; object-fit: contain; margin-bottom:10px;}
  .case-name{font-weight:bold;font-size:14px;margin-bottom:5px}
  .case-price{color:var(--blue);font-weight:900;font-size:16px}
  .case-price.free{color:var(--win)}
  .lock-icon{position:absolute;top:10px;right:10px;font-size:20px}

  .case-header{display:flex;align-items:center;padding:15px;background:var(--panel);margin-bottom:10px;border-bottom:1px solid #333}
  .back-btn{background:none;border:none;color:var(--text);font-size:24px;cursor:pointer;margin-right:15px}
  
  .viewport{position:relative;width:95%;margin:0 auto 20px auto;height:130px;overflow:hidden;border-radius:12px;background:#0a0a0a;border:1px solid #333; }
  .track{display:flex;gap:10px;padding:15px 0; /* will-change removed */ transform: translate3d(0,0,0); backface-visibility: hidden;}
  .card{width:80px;height:100px;flex:0 0 80px;border-radius:8px;background:var(--panel2);border:2px solid #444;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;overflow:hidden;contain: layout paint style;}
  .card.win{border-color:var(--win);}
  .marker{position:absolute;top:0;bottom:0;left:50%;width:2px;background:var(--gold);transform:translateX(-1px);z-index:5;}
  .card-img { width: 60px; height: 60px; object-fit: contain; }

  .btn{width:90%;margin:0 auto 25px auto;display:block;padding:16px;border-radius:12px;border:none;background:var(--blue);color:#fff;font-size:16px;font-weight:bold;cursor:pointer;text-transform:uppercase;letter-spacing:1px}
  .btn:disabled{background:#333;color:#888}
  .btn.free-btn{background:var(--win);color:#000}

  .case-content-section { padding: 0 10px 30px 10px; width:100%; }
  .case-content-title { font-size: 14px; font-weight: bold; color: var(--text); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; text-align: center; }
  .case-content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
  .content-item { 
    background: var(--panel2); border-radius: 12px; padding: 8px 4px; text-align: center;
    border: 1px solid rgba(255,255,255,0.05); border-bottom: 3px solid #444;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    position: relative; transition: transform 0.2s;
    /* content-visibility removed */ contain-intrinsic-size: 100px 100px; overflow: hidden;
  }
  .content-item:active { transform: scale(0.95); }
  .content-item.common { border-bottom-color: #888; }
  .content-item.uncommon { border-bottom-color: #3dff9e; }
  .content-item.rare { border-bottom-color: #0088cc; }
  .content-item.epic { border-bottom-color: #a855f7; }
  .content-item.legendary { border-bottom-color: #ffd700; }
  
  .content-img-wrapper { width: 70px; height: 70px; margin-bottom: 6px; position: relative; display: flex; align-items: center; justify-content: center; }
  .content-img { width: 100%; height: 100%; object-fit: contain; position: absolute; z-index: 2; opacity: 0; transition: opacity 0.3s ease-in; }
  .content-img.loaded { opacity: 1; }
  .skeleton {
    width: 70px; height: 70px; border-radius: 8px;
    background: linear-gradient(90deg, #1c2128 25%, #2a313a 50%, #1c2128 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    position: absolute; z-index: 1;
  }
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  .content-name { font-size: 11px; font-weight: 700; line-height: 1.1; margin-bottom: 6px; height: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; text-overflow: ellipsis; width: 100%; padding: 0 2px;}
  .content-price { font-size: 10px; font-weight: 900; color: var(--blue); background: rgba(0,136,204,0.1); padding: 2px 6px; border-radius: 6px; display: inline-block; }

  .topup-page{padding:15px}
  .pay-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}
  .pay-btn{background:var(--panel2);border-radius:12px;padding:12px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #333;cursor:pointer;}
  .pay-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;margin-bottom:8px}
  .pay-name{font-size:11px;font-weight:bold;text-align:center}
  .pay-icon-ton{background:#0098EA;color:#fff;font-size:22px}
  .pay-icon-stars{background:#fff;color:#000;font-size:22px}
  .topup-card{background:var(--panel2);border-radius:20px;padding:20px;border:1px solid #333}
  .input-label{font-size:12px;color:var(--text-muted);margin-bottom:8px;text-transform:uppercase;font-weight:bold}
  .amount-input{width:100%;background:var(--bg);border:1px solid #333;border-radius:12px;padding:15px;color:var(--text);font-size:18px;font-weight:bold;display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
  .amount-input input{background:none;border:none;color:var(--text);font-size:18px;font-weight:bold;width:100%;outline:none}
  .amount-input span{color:var(--text-muted);font-size:14px}
  .quick-amounts{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:20px}
  .quick-btn{background:var(--bg);border:1px solid #333;border-radius:10px;padding:12px;color:var(--text);font-weight:bold;cursor:pointer;text-align:center}
  .submit-btn{width:100%;padding:16px;border-radius:12px;border:none;background:var(--blue);color:#fff;font-size:16px;font-weight:bold;cursor:pointer}

  .nav{position:fixed;bottom:0;left:0;right:0;background:var(--panel);display:flex;justify-content:space-around;padding:10px 0;border-top:1px solid #333;z-index:10}
  .nav-item{display:flex;flex-direction:column;align-items:center;font-size:10px;color:var(--text-muted);cursor:pointer}
  .nav-item.active{color:var(--blue)}
  .nav-icon{font-size:20px;margin-bottom:4px}

  .modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);display:none;align-items:center;justify-content:center;z-index:100;padding:20px}
  .modal-content{background:var(--panel);border-radius:20px;padding:20px;width:100%;max-width:400px;text-align:center;border:1px solid #333}
  .copy-box{background:var(--bg);border:1px solid #333;padding:10px;border-radius:10px;margin:10px 0;display:flex;justify-content:space-between;align-items:center;font-family:monospace;font-size:12px;word-break:break-all;text-align:left}
  .copy-btn{background:var(--blue);color:white;border:none;padding:5px 10px;border-radius:5px;cursor:pointer;margin-left:10px;white-space:nowrap}

  .profile-page{padding:15px}
  .profile-card{background:var(--panel2);border-radius:20px;padding:24px 20px;text-align:center;border:1px solid #333;margin-bottom:15px}
  .profile-avatar{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,var(--blue),#00d4ff);color:#fff;font-size:30px;font-weight:900;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;}
  .profile-name{font-weight:900;font-size:20px;margin-bottom:4px}
  .profile-id{color:var(--text-muted);font-size:12px;font-family:monospace}
  .profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:15px}
  .stat-item{background:var(--panel2);border-radius:16px;padding:16px;text-align:center;border:1px solid #333}
  .stat-value{font-size:24px;font-weight:900;color:var(--blue);line-height:1.2}
  .stat-label{font-size:11px;color:var(--text-muted);margin-top:4px;text-transform:uppercase;}
  .invite-card{background:linear-gradient(135deg,rgba(0,136,204,.15),rgba(0,212,255,.05));border-radius:20px;padding:20px;border:1px solid rgba(0,136,204,.4)}
  .invite-title{font-size:16px;font-weight:bold;margin-bottom:8px}
  .invite-desc{color:var(--text-muted);font-size:13px;line-height:1.5;margin-bottom:15px}
  .invite-btn{width:100%;padding:14px;border-radius:12px;border:none;background:var(--blue);color:#fff;font-size:15px;font-weight:bold;cursor:pointer;}

  .live-page{padding:15px}
  .live-info{font-size:12px;color:var(--text-muted);text-align:center;margin-bottom:15px}
  .live-item{display:flex;align-items:center;gap:12px;background:var(--panel2);border-radius:14px;padding:12px;margin-bottom:8px;border-left:3px solid #444;}
  .live-item.common{border-left-color:#888}
  .live-item.uncommon{border-left-color:#3dff9e}
  .live-item.rare{border-left-color:#0088cc}
  .live-item.epic{border-left-color:#a855f7}
  .live-item.legendary{border-left-color:#ffd700;}
  .live-avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--blue),#00d4ff);color:#fff;font-weight:bold;font-size:15px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
  .live-user{flex:1;min-width:0}
  .live-username{font-size:13px;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .live-time{font-size:11px;color:var(--text-muted);margin-top:2px}
  .live-prize{text-align:right;flex-shrink:0}
  .live-prize-name{font-size:13px;font-weight:bold}
  .live-prize-value{font-size:11px;color:var(--text-muted);margin-top:2px}

  /* ===== PROFILE V2 ===== */
  .profile-v2-page{padding:15px;display:flex;flex-direction:column;gap:15px}
  .profile-v2-hero{background:var(--panel2);border-radius:20px;padding:20px;border:1px solid #333;display:flex;gap:15px;align-items:center}
  .profile-v2-avatar{width:70px;height:70px;border-radius:50%;background:linear-gradient(135deg,var(--blue),#00d4ff);color:#fff;font-size:28px;font-weight:900;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 0 0 3px rgba(0,136,204,.25)}
  .profile-v2-info{flex:1;min-width:0}
  .profile-v2-username{font-size:18px;font-weight:900;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .profile-v2-id{font-size:11px;color:var(--text-muted);font-family:monospace;margin-bottom:8px}
  .profile-v2-balance-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .profile-v2-balance-label{color:#0098EA;font-weight:bold;font-size:11px}
  .profile-v2-balance-value{font-weight:900;font-size:18px}
  .profile-v2-withdraw-btn{background:transparent;color:var(--blue);border:1px solid var(--blue);border-radius:8px;padding:5px 10px;font-size:11px;font-weight:bold;cursor:pointer;margin-left:auto}
  .profile-v2-card{background:var(--panel2);border-radius:20px;padding:18px;border:1px solid #333}
  .profile-v2-card-title{font-size:16px;font-weight:bold;margin:0 0 14px 0}
  .profile-v2-setting{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #2a2a2a;font-size:14px}
  .profile-v2-setting:last-of-type{border-bottom:none}
  .profile-v2-setting-col{padding:10px 0;border-top:1px solid #2a2a2a;margin-top:10px}
  .profile-v2-setting-label{font-size:12px;color:var(--text-muted);margin-bottom:8px;text-transform:uppercase;font-weight:bold}
  .profile-v2-lang{display:flex;gap:6px}
  .lang-btn{background:var(--bg);border:1px solid #333;color:var(--text-muted);padding:6px 12px;border-radius:8px;font-weight:bold;font-size:12px;cursor:pointer}
  .lang-btn.active{background:var(--blue);color:#fff;border-color:var(--blue)}
  .toggle-switch{position:relative;display:inline-block;width:44px;height:24px}
  .toggle-switch input{opacity:0;width:0;height:0}
  .toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#333;border-radius:24px;transition:.2s}
  .toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.2s}
  .toggle-switch input:checked + .toggle-slider{background:var(--blue)}
  .toggle-switch input:checked + .toggle-slider:before{transform:translateX(20px)}
  .profile-v2-promo-row{display:flex;gap:8px}
  .profile-v2-promo-input{flex:1;background:var(--bg);border:1px solid #333;border-radius:10px;padding:10px;color:var(--text);font-size:14px;outline:none;text-transform:uppercase}
  .profile-v2-promo-btn{background:var(--blue);color:#fff;border:none;padding:10px 14px;border-radius:10px;font-weight:bold;font-size:13px;cursor:pointer}
  .profile-v2-inv-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
  .profile-v2-inv-title{font-size:16px;font-weight:bold}
  .profile-v2-inv-count{background:var(--bg);color:var(--text-muted);padding:2px 8px;border-radius:8px;font-size:12px;margin-left:6px}
  .profile-v2-sell-all{background:var(--panel3);color:var(--text);border:1px solid #333;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:bold;cursor:pointer}
  .profile-v2-sell-all:disabled{opacity:.4;cursor:not-allowed}
  .profile-v2-inv-empty{text-align:center;padding:30px 10px;color:var(--text-muted);font-size:13px}
  
  .inv-card-v2-header{display:flex;gap:10px;margin-bottom:10px;align-items:center}
  
  
  @keyframes floatItem {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
  }
  
  .inv-card-v2-info{flex:1;min-width:0}
  
  .inv-card-v2-value{font-size:12px;color:var(--win);font-weight:bold}
  .inv-card-v2-rarity{font-size:10px;color:var(--text-muted);text-transform:uppercase;margin-top:2px}
  
  
  
  
  
  .profile-v2-support{background:var(--blue);color:#fff;border:none;padding:14px;border-radius:14px;font-size:15px;font-weight:900;cursor:pointer;margin-bottom:20px;width:100%;display:flex;align-items:center;justify-content:center;gap:8px}

  /* ===== BONUSES ===== */
  .bonuses-page{padding:15px;display:flex;flex-direction:column;gap:15px}
  .bonus-card{background:var(--panel2);border-radius:20px;padding:18px;border:1px solid #333}
  .bonus-card-title{font-size:18px;font-weight:bold;margin:0 0 12px 0}
  .bonus-card-desc{color:var(--text-muted);font-size:13px;line-height:1.5;margin:0 0 15px 0}
  .friends-stats{display:flex;align-items:center;gap:10px;margin-bottom:12px}
  .friends-stat{flex:1;text-align:center}
  .friends-stat-value{font-size:24px;font-weight:900;color:var(--text);margin-bottom:4px}
  .friends-stat-label{font-size:11px;color:var(--text-muted);text-transform:uppercase}
  .friends-divider{width:1px;height:44px;background:#333}
  .friends-withdraw-btn{background:transparent;color:var(--blue);border:1px solid var(--blue);border-radius:8px;padding:4px 10px;font-size:11px;margin-top:6px;cursor:pointer}
  .friends-actions{display:flex;gap:8px;margin-bottom:12px}
  .bonus-btn-primary{flex:1;background:var(--blue);color:#fff;border:none;padding:12px;border-radius:12px;font-weight:bold;font-size:14px;cursor:pointer}
  .bonus-btn-icon{background:var(--bg);border:1px solid #333;color:var(--text);padding:12px;border-radius:12px;cursor:pointer;font-size:16px}
  .bonus-btn-secondary{background:var(--bg);color:var(--text);border:1px solid #333;padding:8px 12px;border-radius:8px;font-size:12px;cursor:pointer}
  .friends-total{display:flex;justify-content:space-between;align-items:center;padding-top:12px;border-top:1px solid #333;font-size:13px;color:var(--text-muted)}
  .friends-total-value{color:var(--text);font-weight:bold;font-size:15px}
  .promo-input-wrap{display:flex;gap:8px}
  .promo-input-wrap input{flex:1;background:var(--bg);border:1px solid #333;border-radius:12px;padding:12px;color:var(--text);font-size:14px;outline:none}
  .promo-create-btn{background:var(--blue);color:#fff;border:none;padding:12px 16px;border-radius:12px;font-weight:bold;font-size:13px;cursor:pointer}
  .promo-hint{font-size:11px;color:var(--text-muted);margin-top:8px}
  .promo-my-code{display:flex;flex-direction:column;gap:8px;background:var(--bg);border:1px solid #333;border-radius:12px;padding:12px}
  .promo-my-code-label{font-size:11px;color:var(--text-muted)}
  .promo-my-code-value{font-size:22px;font-weight:900;color:var(--gold);letter-spacing:2px;font-family:monospace}
  .task-row{display:flex;align-items:center;gap:10px;background:var(--bg);border-radius:12px;padding:12px;margin-bottom:8px;border:1px solid #333}
  .task-row.completed{opacity:.55}
  .task-row-icon{width:36px;height:36px;border-radius:8px;background:var(--panel2);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
  .task-row-body{flex:1;min-width:0}
  .task-row-title{font-weight:bold;font-size:13px}
  .task-row-reward{color:var(--win);font-size:12px;margin-top:4px}
  .task-row-check{background:var(--blue);color:#fff;border:none;padding:8px 12px;border-radius:8px;font-size:12px;font-weight:bold;cursor:pointer;flex-shrink:0}
  .task-row-check:disabled{background:#333;color:#888;cursor:not-allowed}


  /* ===== INVENTORY GRID (v3, гарантированная вставка) ===== */
  
  #profile-v2-inventory-list::-webkit-scrollbar {
    display: none !important;
  }
  #profile-v2-inventory-list > 
  #profile-v2-inventory-list::-webkit-scrollbar {
    display: none;
  }
  #profile-v2-inventory-list > 
  .inv-sort-btn {
    background: var(--panel3);
    border: 1px solid #333;
    color: var(--text);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .inv-selection-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,136,204,0.12);
    border: 1px solid rgba(0,136,204,0.3);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
  }
  .inv-selection-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
  }
  .inv-selection-check { color: var(--win); font-weight: 900; font-size: 16px; }
  .inv-selection-sum { font-size: 13px; font-weight: 800; color: #ffd700; white-space: nowrap; }
  .inv-selection-actions { display: flex; align-items: center; gap: 8px; }
  .inv-sell-all-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(34,197,94,0.35);
    transition: transform 0.12s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    white-space: nowrap;
  }
  .inv-sell-all-btn:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(34,197,94,0.25); }
  .inv-sell-all-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
  .inv-selection-sell {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
  }
  
  .inv-card-v2:active { transform: scale(0.97); }
  .inv-card-v2.common { border-color: rgba(136,136,136,0.5); }
  .inv-card-v2.uncommon { border-color: rgba(61,255,158,0.5); }
  .inv-card-v2.rare { border-color: rgba(0,136,204,0.6); }
  .inv-card-v2.epic { border-color: rgba(168,85,247,0.6); }
  .inv-card-v2.legendary { border-color: rgba(255,215,0,0.7); }
  .inv-card-v2.selected {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 1px var(--blue), 0 0 16px rgba(0,136,204,0.35);
  }
  .inv-card-v2.sold { opacity: .4; pointer-events: none; }
  .inv-card-v2.pending { opacity: .6; }
  
  .inv-card-v2.selected 
  
  
  
  
  
  
  
  
  
  
  
  .inv-card-v2-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.6);
    letter-spacing: .5px;
  }
  .inv-card-v2-badge.common { color: #aaa; }
  .inv-card-v2-badge.uncommon { color: #3dff9e; }
  .inv-card-v2-badge.rare { color: #4dc8f0; }
  .inv-card-v2-badge.epic { color: #c084fc; }
  .inv-card-v2-badge.legendary { color: #ffd700; }

  /* Поддержка синяя */
  .profile-v2-support {
    background: var(--blue) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .inv-empty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 10px;
    color: var(--text-muted);
    font-size: 13px;
    width: 100%;
    flex-basis: 100%;
  }

  /* ===== INVENTORY HSCROLL — FINAL AUTHORITATIVE ===== */
  
  #profile-v2-inventory-list::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  
  
  
  
  
  


  /* ===== INVENTORY: горизонтальный скролл как stories ===== */
  #profile-v2-inventory-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 10px !important;
    padding: 4px 2px 12px 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #profile-v2-inventory-list::-webkit-scrollbar {
    display: none;
  }
  #profile-v2-inventory-list > .inv-card-v2 {
    scroll-snap-align: start;
  }
  #profile-v2-inventory-list > .inv-card-v2 {
    flex: 0 0 145px !important;
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    margin: 0 !important;
    float: none !important;
  }
  /* Родители не должны обрезать скролл */
  .profile-v2-page,
  #view-profile,
  #view-profile .profile-v2-card {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }


  /* ===== CaseMint glow for content-items ===== */
  .content-item.common    .content-img { filter: drop-shadow(0 0 6px rgba(136,136,136,0.55)); }
  .content-item.uncommon  .content-img { filter: drop-shadow(0 0 9px rgba(61,255,158,0.65)); }
  .content-item.rare      .content-img { filter: drop-shadow(0 0 9px rgba(0,136,204,0.65)); }
  .content-item.epic      .content-img { filter: drop-shadow(0 0 11px rgba(168,85,247,0.7)); }
  .content-item.legendary .content-img { filter: drop-shadow(0 0 13px rgba(255,215,0,0.8)); }

  .case-page__panel{margin:0 15px 12px 15px}
  .case-page__promo{background:linear-gradient(135deg,rgba(0,136,204,0.18),rgba(0,136,204,0.04));border:1px solid rgba(0,136,204,0.4);border-radius:20px;padding:20px;display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center}
  .case-page__promo-btn{width:100%;background:var(--blue);color:#fff;border:none;padding:14px 20px;border-radius:12px;font-size:15px;font-weight:900;cursor:pointer}
  .case-page__promo-btn:active{transform:scale(0.98)}
  .case-page__promo-hint{font-size:12px;color:var(--text-muted);margin:0;line-height:1.5}
  .case-page__promo-input{width:100%;padding:14px;border-radius:12px;border:1px solid #333;background:var(--bg);color:var(--text);font-size:14px;outline:none;text-align:center;letter-spacing:1px;font-weight:bold}
  .case-page__promo-input::placeholder{letter-spacing:normal;font-weight:normal;color:var(--text-muted);text-transform:none}
  .case-hero{margin:0 15px 12px 15px;border-radius:20px;padding:22px 18px;min-height:110px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(255,255,255,0.08)}
  .case-hero-info{flex:1;min-width:0}
  .case-hero-title{font-size:22px;font-weight:900;margin:0;line-height:1.1}
  .case-hero-emoji{font-size:64px;line-height:1}
  .case-hero--daily{background:linear-gradient(135deg,#0088cc,#00d4ff)}
  .case-hero--legendary{background:linear-gradient(135deg,#ffd700,#ff8c00)}
  .case-hero--autumn{background:linear-gradient(135deg,#ff6b1a,#c41e3a)}
  .case-hero--valentine{background:linear-gradient(135deg,#ff4d85,#ff0066)}
  .case-hero--default{background:linear-gradient(135deg,#1c2128,#2a313a)}

  /* ===== CASE V2 (clean rebuild) ===== */
  #view-case-v2{padding:0 0 100px 0}
  .cv2-topbar{display:flex;align-items:center;padding:12px 15px;gap:12px;background:var(--panel);border-bottom:1px solid #333}
  .cv2-back{background:none;border:none;color:var(--text);font-size:24px;cursor:pointer}
  .cv2-title{font-weight:900;font-size:16px;flex:1}
  .cv2-hero{margin:15px 15px 12px 15px;border-radius:20px;padding:22px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:100px;border:1px solid rgba(255,255,255,0.08)}
  .cv2-hero-info{flex:1;min-width:0}
  .cv2-hero-name{font-size:22px;font-weight:900;margin:0 0 6px 0;line-height:1.1}
  .cv2-hero-sub{font-size:12px;opacity:.85;line-height:1.4;margin:0}
  .cv2-hero-img{width:80px;height:80px;object-fit:contain;filter:drop-shadow(0 4px 14px rgba(0,0,0,0.5))}
  .cv2-hero-emoji{font-size:64px;line-height:1}
  .cv2-hero--daily{background:linear-gradient(135deg,#0088cc,#00d4ff)}
  .cv2-hero--legendary{background:linear-gradient(135deg,#ffd700,#ff8c00);color:#000}
  .cv2-hero--autumn{background:linear-gradient(135deg,#ff6b1a,#c41e3a)}
  .cv2-hero--valentine{background:linear-gradient(135deg,#ff4d85,#ff0066)}
  .cv2-hero--default{background:linear-gradient(135deg,#1c2128,#2a313a)}
  .cv2-spinner{position:relative;width:100%;height:130px;overflow:clip !important;touch-action:pan-y !important;background:#0a0a0a;border-top:1px solid #333;border-bottom:1px solid #333;margin-bottom:16px;/* contain removed */}
  .cv2-track{touch-action:pan-y;display:flex;gap:10px;padding:15px 0;will-change:transform;transform:translate3d(0,0,0);backface-visibility:hidden}
  .cv2-marker{position:absolute;top:0;bottom:0;left:50%;width:2px;background:#ffd700;transform:translateX(-1px);z-index:5;box-shadow:0 0 8px #ffd700}
  .cv2-card{width:80px;height:100px;flex:0 0 80px;border-radius:8px;background:var(--panel2);border:2px solid #444;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;position:relative;contain:layout paint style}
  .cv2-card.common{border-color:rgba(136,136,136,0.6)}
  .cv2-card.uncommon{border-color:rgba(61,255,158,0.7);box-shadow:0 0 12px rgba(61,255,158,0.3)}
  .cv2-card.rare{border-color:rgba(0,136,204,0.8);box-shadow:0 0 14px rgba(0,136,204,0.4)}
  .cv2-card.epic{border-color:rgba(168,85,247,0.8);box-shadow:0 0 16px rgba(168,85,247,0.45)}
  .cv2-card.legendary{border-color:rgba(255,215,0,0.9);box-shadow:0 0 20px rgba(255,215,0,0.6)}
  .cv2-card.win{transform:scale(1.05)}
  .cv2-card-img{width:60px;height:60px;object-fit:contain}
  .cv2-card-emoji{font-size:36px}
  .cv2-card-name{font-size:10px;margin-top:4px;text-align:center;width:100%;padding:0 2px;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff}
  .cv2-action{margin:0 15px 16px 15px}
  .cv2-promo-row{display:flex;gap:8px}
  .cv2-promo-input{flex:1;min-width:0;padding:14px;border-radius:12px;border:1px solid #333;background:var(--bg);color:var(--text);font-size:14px;outline:none;text-align:center;letter-spacing:1px;font-weight:bold}
  .cv2-promo-input::placeholder{letter-spacing:normal;font-weight:normal;color:var(--text-muted);text-transform:none}
  .cv2-spin-btn{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;padding:14px 24px;border-radius:12px;border:none;background:var(--blue);color:#fff;font-size:15px;font-weight:900;cursor:pointer;white-space:nowrap;text-transform:uppercase;letter-spacing:1px}
  .cv2-spin-btn:disabled{background:#333;color:#888}
  .cv2-spin-btn.full{width:100%}
  .cv2-hint{font-size:12px;color:var(--text-muted);margin:8px 0 0 0;line-height:1.4;text-align:center}
  .cv2-rarity{margin:0 15px 16px 15px}
  .cv2-rarity-title{font-size:12px;color:var(--text-muted);margin-bottom:8px;text-align:center;text-transform:uppercase;letter-spacing:1px}
  .cv2-rarity-bar{display:flex;gap:2px;height:8px;border-radius:4px;overflow:hidden}
  .cv2-rarity-seg{flex-grow:1}
  .cv2-rarity-seg.common{background:#888}
  .cv2-rarity-seg.uncommon{background:#3dff9e}
  .cv2-rarity-seg.rare{background:#0088cc}
  .cv2-rarity-seg.epic{background:#a855f7}
  .cv2-rarity-seg.legendary{background:#ffd700}
  .cv2-rarity-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px;font-size:11px;color:#aaa;justify-content:center}
  .cv2-rarity-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;vertical-align:middle}
  .cv2-rarity-dot.common{background:#888}
  .cv2-rarity-dot.uncommon{background:#3dff9e}
  .cv2-rarity-dot.rare{background:#0088cc}
  .cv2-rarity-dot.epic{background:#a855f7}
  .cv2-rarity-dot.legendary{background:#ffd700}
  .cv2-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 15px 20px 15px}
  .cv2-item{background:var(--panel2);border-radius:14px;padding:10px 6px;text-align:center;display:flex;flex-direction:column;align-items:center;position:relative;border:1px solid rgba(255,255,255,0.06);border-bottom-width:3px;overflow:hidden}
  .cv2-item.common{border-bottom-color:#888}
  .cv2-item.uncommon{border-bottom-color:#3dff9e}
  .cv2-item.rare{border-bottom-color:#0088cc}
  .cv2-item.epic{border-bottom-color:#a855f7}
  .cv2-item.legendary{border-bottom-color:#ffd700}
  .cv2-item-img-wrap{width:70px;height:70px;display:flex;align-items:center;justify-content:center;margin-bottom:6px;position:relative}
  .cv2-item-img{width:100%;height:100%;object-fit:contain}
  .cv2-item.common .cv2-item-img{filter:drop-shadow(0 0 6px rgba(136,136,136,0.5))}
  .cv2-item.uncommon .cv2-item-img{filter:drop-shadow(0 0 8px rgba(61,255,158,0.6))}
  .cv2-item.rare .cv2-item-img{filter:drop-shadow(0 0 10px rgba(0,136,204,0.6))}
  .cv2-item.epic .cv2-item-img{filter:drop-shadow(0 0 12px rgba(168,85,247,0.7))}
  .cv2-item.legendary .cv2-item-img{filter:drop-shadow(0 0 14px rgba(255,215,0,0.8))}
  .cv2-item-emoji{font-size:42px}
  .cv2-item-name{font-size:11px;font-weight:700;line-height:1.15;margin-bottom:6px;min-height:26px;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}
  .cv2-item-price{font-size:10px;font-weight:900;color:var(--blue);background:rgba(0,136,204,0.12);padding:2px 8px;border-radius:6px}
.case-card-badge{position:absolute;top:8px;right:8px;background:rgba(0,0,0,0.75);border:1px solid rgba(255,255,255,0.15);border-radius:12px;padding:3px 8px;display:flex;align-items:center;gap:4px;font-size:11px;font-weight:900;color:#fff;z-index:10}.case-card-badge-icon{font-size:12px;line-height:1}
  .cv2-qty-row{display:flex;gap:6px;margin-top:8px}
  .cv2-pill{flex:1;padding:10px 6px;border-radius:10px;border:1px solid #333;background:var(--panel2);color:var(--text-muted);font-weight:900;font-size:13px;cursor:pointer;text-align:center;user-select:none}
  .cv2-pill.active{background:var(--blue);color:#fff;border-color:var(--blue)}
  .cv2-fast-btn{padding:10px 14px;border-radius:10px;border:1px solid #333;background:var(--panel2);color:var(--text);font-size:18px;font-weight:900;cursor:pointer;min-width:50px;text-align:center;user-select:none}
  .cv2-fast-btn:active{background:#ffb300;color:#000;border-color:#ffb300}
  .cv2-spinner-stack{display:flex;flex-direction:column;gap:6px}
  .cv2-spinner-stack .cv2-spinner{margin-bottom:0}

  .cv2-fast-btn.active{background:#22c55e;color:#fff;border-color:#22c55e;box-shadow:0 0 12px rgba(34,197,94,0.5)}
  .cv2-fast-btn{transition:background 0.2s, box-shadow 0.2s}
.cv2-slot-grid{position:relative;display:flex;gap:6px;justify-content:center;padding:10px;margin-bottom:16px;touch-action:pan-y !important;user-select:none;-webkit-user-select:none;}.cv2-slot-col{flex:1;min-width:0;max-width:80px;height:150px;overflow:clip !important;position:relative;border-radius:10px;border:1px solid #333;background:#0a0a0a}.cv2-slot-track{display:flex;flex-direction:column;gap:3px;will-change:transform}.cv2-slot-card{width:100%;height:72px;border-radius:8px;background:var(--panel2);border:1px solid #444;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;position:relative;transition:transform 0.2s}.cv2-slot-card.common{border-color:rgba(136,136,136,0.6)}.cv2-slot-card.uncommon{border-color:rgba(61,255,158,0.7);box-shadow:0 0 8px rgba(61,255,158,0.2)}.cv2-slot-card.rare{border-color:rgba(0,136,204,0.8);box-shadow:0 0 10px rgba(0,136,204,0.3)}.cv2-slot-card.epic{border-color:rgba(168,85,247,0.8);box-shadow:0 0 12px rgba(168,85,247,0.35)}.cv2-slot-card.legendary{border-color:rgba(255,215,0,0.9);box-shadow:0 0 14px rgba(255,215,0,0.5)}.cv2-slot-card.win{transform:scale(1.06);z-index:2}.cv2-slot-card-img{width:44px;height:44px;object-fit:contain}.cv2-slot-card-emoji{font-size:28px;line-height:1}.cv2-slot-card-name{font-size:9px;margin-top:2px;text-align:center;width:100%;padding:0 2px;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff}.cv2-slot-marker{position:absolute;top:50%;left:10px;right:10px;height:2px;background:#ffd700;transform:translateY(-1px);z-index:5;box-shadow:0 0 8px #ffd700;pointer-events:none}


  .cv2-won-panel{background:linear-gradient(135deg,rgba(34,197,94,0.18),rgba(34,197,94,0.04));border:1px solid rgba(34,197,94,0.45);border-radius:16px;padding:12px;margin:0 15px 12px 15px}
  .cv2-won-title{font-size:13px;font-weight:900;color:#fff;text-align:center;margin-bottom:10px}
  .cv2-won-items{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:10px}
  .cv2-won-item{width:82px;display:flex;flex-direction:column;align-items:center;padding:8px 4px;border-radius:10px;background:rgba(0,0,0,0.35);border:1.5px solid #333;border-bottom-width:3px;cursor:pointer;user-select:none;transition:transform 0.1s, border-color 0.15s}
  .cv2-won-item:active{transform:scale(0.96)}
  .cv2-won-item.common{border-bottom-color:#888}
  .cv2-won-item.uncommon{border-bottom-color:#3dff9e}
  .cv2-won-item.rare{border-bottom-color:#0088cc}
  .cv2-won-item.epic{border-bottom-color:#a855f7}
  .cv2-won-item.legendary{border-bottom-color:#ffd700}
  .cv2-won-item.sold{opacity:0.35;pointer-events:none}
  .cv2-won-item.selected{border-color:#3dff9e;box-shadow:0 0 0 1px #3dff9e, 0 0 12px rgba(61,255,158,0.5)}
  .cv2-won-item-img{width:48px;height:48px;object-fit:contain}
  .cv2-won-item-emoji{font-size:30px;line-height:1}
  .cv2-won-item-name{font-size:9px;font-weight:bold;margin-top:4px;text-align:center;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}
  .cv2-won-item-value{font-size:9px;color:#3dff9e;font-weight:900;margin-top:2px}
  .cv2-won-check{position:absolute;top:4px;right:4px;width:14px;height:14px;border-radius:50%;background:#3dff9e;color:#000;font-size:10px;font-weight:900;display:none;align-items:center;justify-content:center;line-height:1}
  .cv2-won-item.selected .cv2-won-check{display:flex}
  .cv2-won-sell-btn{width:100%;padding:12px;border-radius:12px;border:none;background:#22c55e;color:#fff;font-size:14px;font-weight:900;cursor:pointer;display:none}
  .cv2-won-sell-btn.visible{display:block}

  .cv2-card.cv2-nft-card, .cv2-slot-card.cv2-nft-card{cursor:pointer}
  .cv2-card.cv2-nft-card.selected, .cv2-slot-card.cv2-nft-card.selected{border-color:#3dff9e !important;box-shadow:0 0 0 2px #3dff9e, 0 0 16px rgba(61,255,158,0.7) !important}
  .cv2-card.cv2-nft-card.sold, .cv2-slot-card.cv2-nft-card.sold{opacity:0.3;pointer-events:none}
  .cv2-sell-selected-btn{width:100%;padding:12px;border-radius:12px;border:none;background:#22c55e;color:#fff;font-size:14px;font-weight:900;cursor:pointer;margin-bottom:8px;display:none}
  .cv2-sell-selected-btn.visible{display:block}

/* ===== SLOT IMPROVEMENTS (stagger + glow) ===== */
@keyframes cv2GlowGold {
  0%,100% { box-shadow: 0 0 18px rgba(255,215,0,0.85), 0 0 36px rgba(255,215,0,0.5); }
  50%     { box-shadow: 0 0 30px rgba(255,215,0,1),    0 0 60px rgba(255,215,0,0.75); }
}
@keyframes cv2GlowPurple {
  0%,100% { box-shadow: 0 0 16px rgba(168,85,247,0.85), 0 0 32px rgba(168,85,247,0.5); }
  50%     { box-shadow: 0 0 28px rgba(168,85,247,1),    0 0 56px rgba(168,85,247,0.75); }
}
@keyframes cv2GlowBlue {
  0%,100% { box-shadow: 0 0 14px rgba(0,136,204,0.85), 0 0 28px rgba(0,136,204,0.5); }
  50%     { box-shadow: 0 0 24px rgba(0,136,204,1),    0 0 48px rgba(0,136,204,0.75); }
}
@keyframes cv2GlowGreen {
  0%,100% { box-shadow: 0 0 12px rgba(61,255,158,0.85), 0 0 24px rgba(61,255,158,0.5); }
  50%     { box-shadow: 0 0 22px rgba(61,255,158,1),    0 0 44px rgba(61,255,158,0.75); }
}
.cv2-slot-card.win.legendary, .cv2-card.win.legendary { animation: cv2GlowGold 1.2s ease-in-out infinite; }
.cv2-slot-card.win.epic,      .cv2-card.win.epic      { animation: cv2GlowPurple 1.2s ease-in-out infinite; }
.cv2-slot-card.win.rare,      .cv2-card.win.rare      { animation: cv2GlowBlue 1.2s ease-in-out infinite; }
.cv2-slot-card.win.uncommon,  .cv2-card.win.uncommon  { animation: cv2GlowGreen 1.2s ease-in-out infinite; }

/* ===== DROP PANEL v1 ===== */
.cv2-drop-panel{margin:0 15px 12px 15px;background:linear-gradient(135deg,rgba(34,197,94,0.15),rgba(34,197,94,0.04));border:1px solid rgba(34,197,94,0.45);border-radius:16px;padding:12px}
.cv2-drop-panel.hidden{display:none}
.cv2-drop-title{font-size:13px;font-weight:900;color:#fff;text-align:center;margin-bottom:10px}
.cv2-drop-scroll{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cv2-drop-scroll::-webkit-scrollbar{display:none}
.cv2-drop-item{flex:0 0 96px;display:flex;flex-direction:column;align-items:center;padding:8px 6px;border-radius:10px;background:rgba(0,0,0,0.35);border:1.5px solid #333;border-bottom-width:3px;cursor:pointer;user-select:none;position:relative;transition:transform .12s,border-color .15s}
.cv2-drop-item:active{transform:scale(0.96)}
.cv2-drop-item.common{border-bottom-color:#888}
.cv2-drop-item.uncommon{border-bottom-color:#3dff9e}
.cv2-drop-item.rare{border-bottom-color:#0088cc}
.cv2-drop-item.epic{border-bottom-color:#a855f7}
.cv2-drop-item.legendary{border-bottom-color:#ffd700}
.cv2-drop-item.selected{border-color:#3dff9e;box-shadow:0 0 0 1px #3dff9e,0 0 12px rgba(61,255,158,0.4)}
.cv2-drop-item.sold{opacity:.35;pointer-events:none}
.cv2-drop-item-img{width:52px;height:52px;object-fit:contain}
.cv2-drop-item-emoji{font-size:34px;line-height:1}
.cv2-drop-item-name{font-size:9px;font-weight:bold;margin-top:4px;text-align:center;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}
.cv2-drop-item-value{font-size:9px;color:#3dff9e;font-weight:900;margin-top:2px}
.cv2-drop-check{position:absolute;top:4px;right:4px;width:16px;height:16px;border-radius:50%;background:#3dff9e;color:#000;font-size:10px;font-weight:900;display:none;align-items:center;justify-content:center;line-height:1}
.cv2-drop-item.selected .cv2-drop-check{display:flex}
.cv2-drop-btn{width:100%;padding:11px;border-radius:11px;border:none;background:#22c55e;color:#fff;font-size:13px;font-weight:900;cursor:pointer;margin-top:8px}
.cv2-drop-btn:disabled{opacity:.45;cursor:not-allowed}

/* ===== DROP PANEL v2 (single sell-all button) ===== */
.cv2-drop-panel{background:transparent!important;border:none!important;padding:0!important;margin:0 15px 10px 15px!important;border-radius:0!important}
.cv2-drop-panel.hidden{display:none!important}
.cv2-sell-all-simple{width:100%;padding:14px 16px;border-radius:12px;border:none;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;font-size:15px;font-weight:900;cursor:pointer;letter-spacing:0.5px;box-shadow:0 4px 14px rgba(34,197,94,0.35);text-align:center}
.cv2-sell-all-simple:active{transform:scale(0.98)}
.cv2-sell-all-simple:disabled{opacity:.5;cursor:not-allowed;transform:none}

/* ===== INVENTORY RARITY FILTER ===== */
.inv-rarity-chips{display:flex;gap:6px;overflow-x:auto;padding:4px 0 10px 0;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.inv-rarity-chips::-webkit-scrollbar{display:none}
.inv-rarity-chip{flex:0 0 auto;padding:6px 12px;border-radius:16px;border:1px solid #333;background:var(--panel3);color:var(--text-muted);font-size:11px;font-weight:bold;cursor:pointer;white-space:nowrap;transition:background .15s}
.inv-rarity-chip.active{color:#fff;border-color:transparent}
.inv-rarity-chip[data-r="all"].active{background:#0088cc}
.inv-rarity-chip[data-r="common"].active{background:#888}
.inv-rarity-chip[data-r="uncommon"].active{background:#22c55e}
.inv-rarity-chip[data-r="rare"].active{background:#0088cc}
.inv-rarity-chip[data-r="epic"].active{background:#a855f7}
.inv-rarity-chip[data-r="legendary"].active{background:#ffd700;color:#000}

/* ===== AUTO-SPIN TOGGLE ===== */
.cv2-auto-btn{padding:10px 14px;border-radius:10px;border:1px solid #333;background:var(--panel2);color:var(--text);font-size:16px;font-weight:900;cursor:pointer;min-width:50px;text-align:center;user-select:none;transition:background .2s,box-shadow .2s,color .2s}
.cv2-auto-btn.active{background:#3dff9e;color:#000;border-color:#3dff9e;animation:cv2AutoPulse 1.4s ease-in-out infinite}
@keyframes cv2AutoPulse{0%,100%{box-shadow:0 0 12px rgba(61,255,158,0.5)}50%{box-shadow:0 0 20px rgba(61,255,158,0.85)}}

.cv2-auto-list{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;max-height:200px;overflow-y:auto;margin-bottom:8px;padding:4px}
.cv2-auto-list-item{width:70px;display:flex;flex-direction:column;align-items:center;padding:6px 4px;border-radius:8px;background:rgba(0,0,0,0.3);border:1px solid #333}
.cv2-auto-list-item img{width:42px;height:42px;object-fit:contain}
.cv2-auto-list-item .emoji{font-size:28px;line-height:1}
.cv2-auto-list-item .name{font-size:9px;font-weight:bold;margin-top:2px;text-align:center;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}

/* ===== LIVE FEED ANIMATIONS ===== */
@keyframes liveSlideIn {
  from { opacity: 0; transform: translateY(-24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.live-item.live-new {
  animation: liveSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.live-item.epic {
  box-shadow: 0 0 0 1px rgba(168,85,247,0.35), inset 0 0 20px rgba(168,85,247,0.08);
}
.live-item.legendary {
  box-shadow: 0 0 0 1px rgba(255,215,0,0.5), inset 0 0 24px rgba(255,215,0,0.12);
  background: linear-gradient(90deg, rgba(28,33,40,1) 0%, rgba(40,35,15,1) 100%);
}

/* ===== LIVE HEADER (pulse + counter) ===== */
.live-hero{display:flex;align-items:center;gap:10px;padding:14px 16px;background:linear-gradient(135deg,rgba(255,71,87,0.12),rgba(255,71,87,0.03));border:1px solid rgba(255,71,87,0.35);border-radius:16px;margin-bottom:14px}
.live-pulse{width:12px;height:12px;border-radius:50%;background:#ff4757;flex-shrink:0;position:relative;box-shadow:0 0 0 0 rgba(255,71,87,0.7);animation:livePulse 1.6s ease-out infinite}
@keyframes livePulse{
  0%   { box-shadow: 0 0 0 0 rgba(255,71,87,0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(255,71,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,71,87,0); }
}
.live-hero-text{flex:1;min-width:0}
.live-hero-title{font-size:14px;font-weight:900;color:#fff;letter-spacing:1px;display:flex;align-items:center;gap:6px}
.live-hero-sub{font-size:11px;color:#8b949e;margin-top:2px}
.live-hero-count{background:rgba(255,71,87,0.2);color:#ff4757;padding:4px 10px;border-radius:10px;font-size:12px;font-weight:900;flex-shrink:0}
.live-hero-count.zero{background:rgba(139,148,158,0.15);color:#8b949e}

  /* ============ FIX ДЛЯ ПК, WEB И ЯНДЕКС БРАУЗЕРА ============ */
  html, body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
  }
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: #0d1117; }
  ::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
  ::-webkit-scrollbar-thumb:hover { background: #0088cc; }

  #profile-v2-inventory-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    overflow-x: hidden !important;
    padding: 4px 0 12px 0 !important;
  }
  

  @media (min-width: 768px) {
    body {
      max-width: 900px;
      margin: 0 auto;
      box-shadow: 0 0 50px rgba(0,0,0,0.8);
      border-left: 1px solid #333;
      border-right: 1px solid #333;
    }
    .header, .nav {
      max-width: 900px;
      left: 50%;
      transform: translateX(-50%);
      width: 100%;
    }
    .cases-grid { grid-template-columns: repeat(3, 1fr); }
    .cv2-grid { grid-template-columns: repeat(5, 1fr); }
    #profile-v2-inventory-list { grid-template-columns: repeat(4, 1fr) !important; }
  }


  /* ============ SCROLL FIX v2 ============ */
  /* Убираем "gotcha": overflow-x:hidden делает overflow-y:auto у .view,
     из-за чего каждый .view становится отдельным скролл-контейнером. */
  .view {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
  #view-case-v2 {
    overflow: visible !important;
  }
  /* Единственный скролл-контейнер — body. */
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
  }


  /* ============ SCROLL FIX v4 FINAL ============ */
  /* Desktop: html — фиксированная рамка, body — единственный скролл-контейнер */
  html {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 70px 0 !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }
  .view, .view.active {
    overflow: visible !important;
    height: auto !important;
  }
  /* Вложенные элементы ни в коем случае не должны быть scroll-контейнерами */
  .view * {
    overflow-y: visible;
  }

  /* PC: центрируем и добавляем рамку */
  @media (min-width: 768px) {
    html { overflow-y: auto !important; height: auto !important; }
    body {
      height: auto !important;
      min-height: 100vh !important;
      max-width: 900px;
      margin: 0 auto !important;
      box-shadow: 0 0 50px rgba(0,0,0,0.8);
      border-left: 1px solid #333;
      border-right: 1px solid #333;
    }
    .cases-grid { grid-template-columns: repeat(3, 1fr); }
    .cv2-grid { grid-template-columns: repeat(5, 1fr); }
    #profile-v2-inventory-list { grid-template-columns: repeat(4, 1fr) !important; }
  }

  /* ===== NEW CASE CARDS ===== */
  .case-card-new { position: relative; border-radius: 20px; background: linear-gradient(135deg, var(--theme-c1, #8774E1), var(--theme-c2, #7B68D4)); padding: 2px; cursor: pointer; transition: transform 0.2s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.4); overflow: hidden; box-sizing: border-box; min-width: 0; }
  .case-card-new:active { transform: scale(0.96); }
  .case-card-inner { background: #1c2128; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; }
  .case-cover-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #0d1117; } .case-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .case-info-row { padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .case-title-new { font-weight: 800; font-size: 14px; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .case-price-pill { background: var(--theme-c1, #8774E1); padding: 5px 10px; border-radius: 10px; font-size: 13px; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 4px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
  .case-badge-free { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, #facc15, #f59e0b); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 900; display: flex; align-items: center; gap: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 2; }
  .case-badge-locked { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.75); padding: 6px; border-radius: 50%; font-size: 14px; z-index: 2; }

  /* ===== DAILY CASE (Кейс Дня) ===== */
  .case-badge-daily {
    position: absolute; top: 10px; left: 10px;
    background: linear-gradient(135deg, #ff4500, #ff8c00);
    color: #fff; padding: 4px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 900;
    display: flex; align-items: center; gap: 4px;
    box-shadow: 0 4px 10px rgba(255,69,0,0.4); z-index: 2;
    animation: dailyPulse 2s ease-in-out infinite;
  }
  @keyframes dailyPulse {
    0%,100% { box-shadow: 0 4px 10px rgba(255,69,0,0.4); }
    50%     { box-shadow: 0 4px 18px rgba(255,69,0,0.9), 0 0 24px rgba(255,140,0,0.5); }
  }
  .case-card-new.daily {
    box-shadow: 0 4px 24px rgba(255,69,0,0.35), 0 0 0 1px rgba(255,140,0,0.5) !important;
  }
  .case-card-new.daily::after {
    content: ""; position: absolute; inset: 0; border-radius: 20px;
    pointer-events: none;
    background: radial-gradient(circle at 100% 0%, rgba(255,140,0,0.15), transparent 40%);
  }
  .case-old-price {
    text-decoration: line-through; opacity: 0.55; margin-right: 4px; font-weight: 800;
  }
  .case-price-pill.daily-price {
    background: linear-gradient(135deg, #ff4500, #ff8c00) !important;
    animation: dailyPillGlow 2s ease-in-out infinite;
  }
  @keyframes dailyPillGlow {
    0%,100% { box-shadow: 0 0 8px rgba(255,69,0,0.4); }
    50%     { box-shadow: 0 0 16px rgba(255,140,0,0.8); }
  }
  .daily-timer { font-variant-numeric: tabular-nums; font-weight: 900; }
  /* ===== LEVELS / XP ===== */
  .level-card { background: linear-gradient(135deg, rgba(135,116,225,0.15), rgba(0,136,204,0.1)); border: 1px solid rgba(135,116,225,0.4); border-radius: 20px; padding: 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
  .level-icon { width: 64px; height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; position: relative; }
  .level-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(135,116,225,0.6)); }
  .level-icon .level-number { position: absolute; bottom: -4px; right: -4px; background: linear-gradient(135deg, #8774E1, #0088cc); color: #fff; font-weight: 900; font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 2px solid var(--panel); box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
  .level-info { flex: 1; min-width: 0; }
  .level-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
  .level-title { font-size: 16px; font-weight: 900; color: #fff; }
  .level-tier { font-size: 11px; font-weight: bold; color: #8774E1; text-transform: uppercase; letter-spacing: 0.5px; }
  .level-progress { background: rgba(0,0,0,0.4); height: 8px; border-radius: 4px; overflow: hidden; margin-top: 6px; position: relative; }
  .level-progress-fill { background: linear-gradient(90deg, #8774E1, #00d4ff); height: 100%; border-radius: 4px; transition: width 0.5s ease; box-shadow: 0 0 8px rgba(0,212,255,0.6); }
  .level-progress-text { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
  .level-reward-btn { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; border: none; border-radius: 10px; padding: 8px 14px; font-weight: 900; font-size: 12px; cursor: pointer; margin-top: 8px; width: 100%; }
  .level-reward-btn:active { transform: scale(0.97); }

  /* Levelup modal */
  #levelup-modal { position: fixed; inset: 0; z-index: 9100; display: none; align-items: center; justify-content: center; padding: 20px; }
  #levelup-modal.active { display: flex; }
  #levelup-modal .lu-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
  #levelup-modal .lu-content { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 32px 24px; border-radius: 28px; text-align: center; border: 2px solid #ffd700; box-shadow: 0 0 80px rgba(255,215,0,0.4), inset 0 0 60px rgba(60,40,0,0.4); background: radial-gradient(circle at 50% 20%, rgba(255,215,0,0.15) 0%, transparent 60%), linear-gradient(180deg, #1c1c1c 0%, #0d0d0d 100%); animation: luSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; }
  #levelup-modal .lu-content::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 80px); }
  @keyframes luSlideUp { from { transform: translateY(60px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
  #levelup-modal .lu-title { font-size: 14px; font-weight: 900; color: #ffd700; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 8px; }
  #levelup-modal .lu-level { font-size: 56px; font-weight: 900; color: #fff; text-shadow: 0 0 24px rgba(255,215,0,0.8); margin-bottom: 8px; }
  #levelup-modal .lu-icon { width: 120px; height: 120px; margin: 0 auto 16px auto; display: flex; align-items: center; justify-content: center; font-size: 80px; animation: luFloat 3s ease-in-out infinite; }
  #levelup-modal .lu-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 30px rgba(255,215,0,1)); }
  @keyframes luFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
  #levelup-modal .lu-tier { font-size: 16px; color: #ffd700; font-weight: bold; margin-bottom: 4px; }
  #levelup-modal .lu-name { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 20px; }
  #levelup-modal .lu-reward { background: rgba(255,215,0,0.15); border: 1px solid rgba(255,215,0,0.4); border-radius: 14px; padding: 14px; margin-bottom: 16px; font-size: 15px; font-weight: 900; color: #ffd700; }
  #levelup-modal .lu-btn { padding: 14px; border-radius: 14px; border: none; background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; font-size: 15px; font-weight: 900; cursor: pointer; width: 100%; }
  #levelup-modal .lu-btn-close { margin-top: 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.2); background: transparent; color: #ccc; font-size: 14px; cursor: pointer; width: 100%; }

  /* ===== LEADERBOARD ===== */
  .leaderboard-page { padding: 15px; }
  .lb-hero { background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.08)); border: 1px solid rgba(255,215,0,0.4); border-radius: 16px; padding: 18px; margin-bottom: 15px; text-align: center; }
  .lb-hero-title { font-size: 20px; font-weight: 900; color: #ffd700; margin-bottom: 6px; }
  
  .lb-list { display: flex; flex-direction: column; gap: 8px; }
  .lb-item { display: flex; align-items: center; gap: 12px; background: var(--panel2); border-radius: 14px; padding: 12px 14px; border: 1px solid #333; cursor: pointer; transition: transform 0.15s; }
  .lb-item:active { transform: scale(0.98); }
  .lb-item.gold { background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.05)); border-color: rgba(255,215,0,0.5); box-shadow: 0 0 16px rgba(255,215,0,0.15); }
  .lb-item.silver { background: linear-gradient(135deg, rgba(192,192,192,0.12), rgba(160,160,160,0.05)); border-color: rgba(192,192,192,0.4); }
  .lb-item.bronze { background: linear-gradient(135deg, rgba(205,127,50,0.12), rgba(160,100,40,0.05)); border-color: rgba(205,127,50,0.4); }
  .lb-rank { font-size: 18px; font-weight: 900; min-width: 32px; text-align: center; color: #888; }
  .lb-rank.gold { color: #ffd700; font-size: 22px; }
  .lb-rank.silver { color: #c0c0c0; font-size: 22px; }
  .lb-rank.bronze { color: #cd7f32; font-size: 22px; }
  .lb-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #8774E1, #0088cc); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; flex-shrink: 0; overflow: hidden; }
  .lb-info { flex: 1; min-width: 0; }
  .lb-name { font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lb-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .lb-value { text-align: right; }
  .lb-value-gram { font-weight: 900; font-size: 15px; color: #ffd700; }
  .lb-you { margin-top: 15px; background: rgba(0,136,204,0.1); border: 1px solid rgba(0,136,204,0.4); border-radius: 14px; padding: 12px 14px; }
  .lb-you-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
  .lb-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }

  /* ===== STREAK CSS ===== */
  .streak-banner { background: linear-gradient(135deg, rgba(255,140,0,0.15), rgba(255,69,0,0.15)); border: 1px solid rgba(255,140,0,0.4); border-radius: 16px; padding: 12px 15px; display: flex; align-items: center; gap: 12px; margin-bottom: 15px; cursor: pointer; transition: transform 0.15s; }
  .streak-banner:active { transform: scale(0.98); }
  .streak-banner.disabled { opacity: 0.6; cursor: default; }
  .streak-banner-icon { font-size: 28px; }
  .streak-banner-info { flex: 1; min-width: 0; }
  .streak-banner-title { font-weight: 900; font-size: 14px; color: #fff; }
  .streak-banner-sub { font-size: 12px; color: #ff8c00; font-weight: bold; margin-top: 2px; }
  .streak-banner-btn { background: linear-gradient(135deg, #ff8c00, #ff4500); color: #fff; border: none; border-radius: 10px; padding: 8px 14px; font-weight: 900; font-size: 12px; cursor: pointer; animation: dailyPulse 2s ease-in-out infinite; }
  .streak-timer { font-variant-numeric: tabular-nums; font-weight: 900; color: #ff8c00; }
  #streak-badge { position: absolute; top: -4px; right: -4px; background: #ff4500; color: #fff; font-size: 10px; font-weight: 900; padding: 2px 6px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); z-index: 10; }

  .cv2-daily-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 10px;
    background: linear-gradient(135deg, #ff4500, #ff8c00);
    color: #fff; font-size: 11px; font-weight: 900;
    margin-left: 8px; box-shadow: 0 2px 8px rgba(255,69,0,0.5);
    vertical-align: middle;
  }


  /* ===== UI POLISH ===== */
  body {
    background-color: #0d1117 !important;
    background-image: 
      radial-gradient(circle at 15% 50%, rgba(135, 116, 225, 0.12), transparent 45%),
      radial-gradient(circle at 85% 30%, rgba(0, 136, 204, 0.12), transparent 45%) !important;
    /* background-attachment: fixed removed: causes flicker on iOS WebView */
  }
  .nav-item.active {
    color: #00d4ff !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6) !important;
    transform: translateY(-2px);
    transition: all 0.2s ease;
  }
  .nav-item.active .nav-icon {
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.8)) !important;
    transform: scale(1.1);
  }
  .balances {
    background: linear-gradient(135deg, rgba(28, 33, 40, 0.9), rgba(13, 17, 23, 0.9)) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-weight: 900 !important;
    border: 1px solid rgba(0, 136, 204, 0.4) !important;
    box-shadow: inset 0 0 10px rgba(0, 136, 204, 0.1), 0 2px 10px rgba(0,0,0,0.3) !important;
  }


  /* ===== CASE V2 POLISH ===== */
  .cv2-hero { position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 0 60px rgba(255,255,255,0.06); }
  .cv2-hero::before { content:""; position:absolute; inset:-40%; background: radial-gradient(circle at 80% 50%, rgba(255,255,255,0.25), transparent 60%); pointer-events:none; }
  .cv2-hero-img { filter: drop-shadow(0 6px 20px rgba(0,0,0,0.6)) drop-shadow(0 0 30px rgba(255,255,255,0.3)); animation: cv2Float 3s ease-in-out infinite; }
  @keyframes cv2Float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
  
  .cv2-spin-btn { background: linear-gradient(135deg, #0088cc, #00d4ff) !important; box-shadow: 0 4px 20px rgba(0,136,204,0.5), inset 0 0 0 1px rgba(255,255,255,0.2); transition: transform .15s, box-shadow .2s; }
  .cv2-spin-btn:active:not(:disabled) { transform: scale(0.97); }
  .cv2-spin-btn:disabled { background: #333 !important; box-shadow: none; }
  
  .cv2-spinner { border-radius: 14px; box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 4px 20px rgba(0,0,0,0.4); }
  .cv2-marker { width: 3px !important; box-shadow: 0 0 12px #ffd700, 0 0 24px rgba(255,215,0,0.6) !important; }
  
  .cv2-item { background: linear-gradient(180deg, rgba(28,33,40,0.95), rgba(20,25,32,0.95)) !important; transition: transform .15s, box-shadow .2s; }
  .cv2-item:active { transform: scale(0.96); }
  .cv2-item.common    { box-shadow: 0 0 0 1px rgba(136,136,136,0.15), 0 0 12px rgba(136,136,136,0.08) !important; }
  .cv2-item.uncommon  { box-shadow: 0 0 0 1px rgba(61,255,158,0.2), 0 0 14px rgba(61,255,158,0.12) !important; }
  .cv2-item.rare      { box-shadow: 0 0 0 1px rgba(0,136,204,0.25), 0 0 16px rgba(0,136,204,0.15) !important; }
  .cv2-item.epic      { box-shadow: 0 0 0 1px rgba(168,85,247,0.3), 0 0 18px rgba(168,85,247,0.18) !important; }
  .cv2-item.legendary { box-shadow: 0 0 0 1px rgba(255,215,0,0.35), 0 0 22px rgba(255,215,0,0.22) !important; }
  
  .cv2-hero-name { text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
  .cv2-hero-sub  { text-shadow: 0 1px 4px rgba(0,0,0,0.5); }


  /* ===== PROFILE V3 POLISH ===== */
  .profile-v2-hero { background: linear-gradient(135deg, rgba(28,33,40,0.95), rgba(13,17,23,0.95)) !important; border: 1px solid rgba(135, 116, 225, 0.3) !important; box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 20px rgba(135,116,225,0.05) !important; }
  .profile-v2-avatar { box-shadow: 0 0 0 3px rgba(135,116,225,0.3), 0 0 20px rgba(135,116,225,0.5) !important; background: linear-gradient(135deg, #8774E1, #0088cc) !important; }
  .gram-coin-svg { display: inline-block; width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; filter: drop-shadow(0 2px 4px rgba(0,136,204,0.4)); }
  
  
  
  
  .sell-all-btn { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; border: none; padding: 8px 12px; border-radius: 10px; font-weight: bold; font-size: 12px; cursor: pointer; box-shadow: 0 4px 12px rgba(239,68,68,0.3); display: flex; align-items: center; gap: 6px; transition: transform 0.15s; }
  .sell-all-btn:active { transform: scale(0.95); }
  .sell-all-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }


  .cv2-qty-row.locked { pointer-events: none; }
  .cv2-qty-row.locked .cv2-pill,
  .cv2-qty-row.locked .cv2-fast-btn,
  .cv2-qty-row.locked .cv2-auto-btn { opacity: 0.4; filter: grayscale(0.5); }


  /* ===== CV2 GRID POLISH ===== */
  .cv2-grid-header { padding: 0 15px 12px 15px; }
  .cv2-grid-title { font-size: 13px; font-weight: 900; color: #fff; text-align: center; margin-bottom: 10px; letter-spacing: 0.5px; }
  .cv2-grid-title small { color: #888; font-weight: 600; font-size: 11px; }
  .cv2-grid-filter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; justify-content: center; }
  .cv2-grid-filter::-webkit-scrollbar { display: none; }
  .cv2-grid-filter .chip { flex: 0 0 auto; padding: 5px 11px; border-radius: 14px; border: 1px solid #333; background: #1c2128; color: var(--text-muted); font-size: 11px; font-weight: 800; cursor: pointer; user-select: none; white-space: nowrap; transition: all 0.15s; }
  .cv2-grid-filter .chip.active { color: #fff; border-color: transparent; }
  .cv2-grid-filter .chip[data-r="all"].active       { background: #0088cc; }
  .cv2-grid-filter .chip[data-r="common"].active    { background: #888; }
  .cv2-grid-filter .chip[data-r="uncommon"].active  { background: #3dff9e; color: #000; }
  .cv2-grid-filter .chip[data-r="rare"].active      { background: #0088cc; }
  .cv2-grid-filter .chip[data-r="epic"].active      { background: #a855f7; }
  .cv2-grid-filter .chip[data-r="legendary"].active { background: #ffd700; color: #000; }
  
  .cv2-item { padding: 12px 8px 10px 8px !important; position: relative; overflow: hidden; transition: transform .15s, box-shadow .25s !important; }
  .cv2-item::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55; }
  .cv2-item.common::before    { background: radial-gradient(circle at 50% 100%, rgba(136,136,136,0.25), transparent 65%); }
  .cv2-item.uncommon::before  { background: radial-gradient(circle at 50% 100%, rgba(61,255,158,0.30), transparent 65%); }
  .cv2-item.rare::before      { background: radial-gradient(circle at 50% 100%, rgba(0,136,204,0.35), transparent 65%); }
  .cv2-item.epic::before      { background: radial-gradient(circle at 50% 100%, rgba(168,85,247,0.40), transparent 65%); }
  .cv2-item.legendary::before { background: radial-gradient(circle at 50% 100%, rgba(255,215,0,0.45), transparent 65%); }
  
  .cv2-item-img-wrap { width: 78px !important; height: 78px !important; position: relative; z-index: 1; }
  .cv2-item-rarity-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; z-index: 2; box-shadow: 0 0 6px currentColor; }
  .cv2-item.common    .cv2-item-rarity-dot { background: #888; color: #888; }
  .cv2-item.uncommon  .cv2-item-rarity-dot { background: #3dff9e; color: #3dff9e; }
  .cv2-item.rare      .cv2-item-rarity-dot { background: #0088cc; color: #0088cc; }
  .cv2-item.epic      .cv2-item-rarity-dot { background: #a855f7; color: #a855f7; }
  .cv2-item.legendary .cv2-item-rarity-dot { background: #ffd700; color: #ffd700; animation: cv2DotPulse 1.6s infinite; }
  @keyframes cv2DotPulse { 0%,100% { box-shadow: 0 0 6px currentColor; } 50% { box-shadow: 0 0 14px currentColor; } }
  
  .cv2-item-name { min-height: 28px !important; z-index: 1; }
  .cv2-item-price { display: inline-flex; align-items: center; gap: 3px; z-index: 1; }


  /* ===== PREMIUM BUTTONS ===== */
  /* Главная кнопка (Крутить) */
  .cv2-spin-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0088cc, #00d4ff) !important;
    box-shadow: 0 6px 20px rgba(0,136,204,0.4), inset 0 1px 0 rgba(255,255,255,0.3) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    transition: transform 0.15s, box-shadow 0.2s !important;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .cv2-spin-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -100%; width: 50%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    animation: btnShimmer 3.5s infinite;
    pointer-events: none;
  }
  .cv2-spin-btn:active:not(:disabled) {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 10px rgba(0,136,204,0.3) !important;
  }
  .cv2-spin-btn:disabled {
    background: #333 !important;
    box-shadow: none !important;
    color: #888 !important;
    animation: none !important;
  }
  .cv2-spin-btn:disabled::after { display: none; }
  @keyframes btnShimmer {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
  }

  /* Кнопки выбора количества (x1-x5) */
  .cv2-pill {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(4px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #aaa !important;
  }
  .cv2-pill.active {
    background: linear-gradient(135deg, rgba(0,136,204,0.9), rgba(0,212,255,0.9)) !important;
    border-color: #00d4ff !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(0,212,255,0.4), inset 0 1px 0 rgba(255,255,255,0.3) !important;
    transform: translateY(-1px);
  }

  /* Кнопки Fast (⚡) и Auto (🔄) */
  .cv2-fast-btn, .cv2-auto-btn {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(4px);
    transition: all 0.2s !important;
  }
  .cv2-fast-btn.active {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    border-color: #fbbf24 !important;
    color: #000 !important;
    box-shadow: 0 0 16px rgba(245,158,11,0.6) !important;
    animation: fastPulse 1.5s infinite;
  }
  .cv2-auto-btn.active {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    border-color: #34d399 !important;
    color: #000 !important;
    box-shadow: 0 0 16px rgba(16,185,129,0.6) !important;
    animation: autoPulse 1.5s infinite;
  }
  @keyframes fastPulse { 0%,100% { box-shadow: 0 0 16px rgba(245,158,11,0.6); } 50% { box-shadow: 0 0 24px rgba(245,158,11,0.9); } }
  @keyframes autoPulse { 0%,100% { box-shadow: 0 0 16px rgba(16,185,129,0.6); } 50% { box-shadow: 0 0 24px rgba(16,185,129,0.9); } }

  /* Кнопка Продать всё */
  .cv2-sell-all-simple {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 6px 20px rgba(16,185,129,0.3), inset 0 1px 0 rgba(255,255,255,0.2) !important;
    border: none !important;
    transition: transform 0.15s, box-shadow 0.2s !important;
  }
  .cv2-sell-all-simple:active {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 10px rgba(16,185,129,0.2) !important;
  }


  
  
  
  
  
  
  
  
  
  
  
  /* ===== DESKTOP FIX X2 (HEADER FIXED) ===== */
  @media (min-width: 768px) {
    /* Фиксим хедер и нижнее меню: убираем сдвиг влево */
    .header, .nav {
      max-width: 100% !important;
      left: 0 !important;
      right: 0 !important;
      transform: none !important;
      margin: 0 auto !important;
      width: 100% !important;
    }
    
    /* Дефолтная ширина страницы (900px) */
    body {
      max-width: 900px !important;
      margin: 0 auto !important;
    }
    
    /* Расширяем страницу до 1200px ТОЛЬКО внутри кейса */
    body:has(#view-case-v2.active), body.case-active {
      max-width: 1200px !important;
      border-left: none !important;
      border-right: none !important;
      overflow-x: clip !important;
    }
    
    html, body { overflow-x: clip !important; }
    #view-case-v2, .view.active { overflow-x: clip !important; }
    
    .cv2-topbar, .cv2-hero, .cv2-action, .cv2-rarity, .cv2-grid-header,
    .cv2-grid, .cv2-slot-grid, .cv2-spinner, .cv2-drop-panel, .cv2-won-panel {
      max-width: 1100px !important;
      margin-left: auto !important;
      margin-right: auto !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
    
    /* Х1: сетка 5 колонок */
    .cv2-grid { grid-template-columns: repeat(5, 1fr) !important; gap: 15px !important; padding: 0 15px 40px 15px !important; }
    .cv2-item { padding: 16px 10px !important; }
    .cv2-item-img-wrap { width: 120px !important; height: 120px !important; }
    .cv2-item-name { font-size: 14px !important; min-height: 36px !important; margin-bottom: 8px !important; }
    .cv2-item-price { font-size: 12px !important; padding: 4px 10px !important; }
    
    /* Х2-Х5: вертикальный спиннер (220px) */
    .cv2-slot-grid { display: flex !important; flex-direction: row !important; gap: 24px !important; padding: 30px !important; position: relative !important; overflow: hidden !important; }
    .cv2-slot-col { flex: 1 1 0 !important; min-width: 0 !important; max-width: 300px !important; height: 480px !important; border-radius: 20px !important; overflow: hidden !important; position: relative !important; }
    .cv2-slot-track { display: flex !important; flex-direction: column !important; gap: 8px !important; will-change: transform !important; }
    .cv2-slot-card { width: 100% !important; height: 220px !important; flex: 0 0 220px !important; border-radius: 16px !important; }
    .cv2-slot-card-img { width: 140px !important; height: 140px !important; }
    .cv2-slot-card-emoji { font-size: 88px !important; }
    .cv2-slot-card-name { font-size: 16px !important; margin-top: 8px !important; }
    .cv2-slot-marker { position: absolute !important; top: 50% !important; left: 10px !important; right: 10px !important; height: 4px !important; width: auto !important; transform: translateY(-2px) !important; z-index: 5 !important; box-shadow: 0 0 16px #ffd700, 0 0 32px rgba(255,215,0,0.7) !important; }
    
    /* Х1: одиночный спиннер */
    .cv2-spinner { height: 180px !important; overflow: hidden !important; }
    .cv2-card { width: 110px !important; height: 140px !important; }
    .cv2-card-img { width: 80px !important; height: 80px !important; }
    .cv2-card-name { font-size: 12px !important; }
  }


  /* ===== BACKGROUND PARTICLES ===== */
  #bg-particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: #0d1117; }
  .bg-star { position: absolute; background: #fff; border-radius: 50%; opacity: 0.3; animation: floatStar linear infinite; }
  @keyframes floatStar { 0% { transform: translateY(100vh) scale(0.5); opacity: 0; } 50% { opacity: 0.8; } 100% { transform: translateY(-10vh) scale(1); opacity: 0; } }

  /* ===== TOASTS (вместо alert) ===== */
  #toast-container { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: 90%; max-width: 400px; }
  .toast { background: rgba(28, 33, 40, 0.95); backdrop-filter: blur(10px); border-radius: 12px; padding: 12px 16px; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); transform: translateY(20px); opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-align: center; }
  .toast.show { transform: translateY(0); opacity: 1; }
  .toast.success { border-left: 4px solid #10b981; box-shadow: 0 0 16px rgba(16,185,129,0.2); }
  .toast.error { border-left: 4px solid #ef4444; box-shadow: 0 0 16px rgba(239,68,68,0.2); }
  .toast.info { border-left: 4px solid #0088cc; box-shadow: 0 0 16px rgba(0,136,204,0.2); }

  /* ===== GLASSMORPHISM MODALS ===== */
  .modal-overlay { backdrop-filter: blur(5px); }
  .modal-content { background: rgba(28, 33, 40, 0.85) !important; backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.15) !important; box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05) !important; }
  .amount-input { background: rgba(13, 17, 23, 0.6) !important; border: 1px solid rgba(255,255,255,0.1) !important; }
  .copy-box { background: rgba(13, 17, 23, 0.6) !important; border: 1px solid rgba(255,255,255,0.1) !important; }


  .profile-v2-avatar { position: relative; cursor: pointer; overflow: hidden; transition: transform 0.2s; }
  .profile-v2-avatar:active { transform: scale(0.95); }
  
  
  


  .profile-v2-gen-avatar-btn {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(135, 116, 225, 0.4);
    background: linear-gradient(135deg, rgba(135,116,225,0.2), rgba(0,136,204,0.2));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
  }
  .profile-v2-gen-avatar-btn:active { transform: scale(0.97); }
  .profile-v2-gen-avatar-btn:disabled { opacity: 0.6; cursor: not-allowed; }


  #user-profile-modal { z-index: 250; }
  #user-profile-modal .modal-content { position: relative; padding: 32px 20px 20px 20px; text-align: left; max-width: 400px; }
  .up-avatar { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 10px auto; background: linear-gradient(135deg, #8774E1, #0088cc); display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 900; overflow: hidden; box-shadow: 0 0 0 3px rgba(135,116,225,0.3), 0 0 24px rgba(135,116,225,0.5); }
  .up-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .up-name { font-size: 20px; font-weight: 900; text-align: center; }
  .up-id { font-size: 11px; color: #888; text-align: center; margin-bottom: 15px; }
  .up-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 15px; }
  .up-stat { background: rgba(255,255,255,0.04); border-radius: 12px; padding: 10px 6px; text-align: center; }
  .up-stat-v { font-size: 15px; font-weight: 900; color: #00d4ff; line-height: 1.2; }
  .up-stat-l { font-size: 9px; color: #888; text-transform: uppercase; margin-top: 3px; }
  .up-showcase-title { font-size: 14px; font-weight: 900; margin-bottom: 10px; }
  .up-showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .up-slot { aspect-ratio: 1; background: rgba(255,255,255,0.03); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; text-align: center; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); position: relative; }
  .up-slot-img { width: 100%; height: 70%; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
  .up-slot-emoji { font-size: 28px; line-height: 1; }
  .up-slot.empty { color: #444; border: 1px dashed #333; font-size: 10px; }
  .up-slot-name { font-size: 9px; font-weight: bold; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; padding: 0 2px; }
  .up-slot.common { border-bottom: 2px solid #888; }
  .up-slot.uncommon { border-bottom: 2px solid #3dff9e; }
  .up-slot.rare { border-bottom: 2px solid #0088cc; }
  .up-slot.epic { border-bottom: 2px solid #a855f7; }
  .up-slot.legendary { border-bottom: 2px solid #ffd700; }


  .live-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,71,87,0.15);
    border: 1px solid rgba(255,71,87,0.5);
    color: #ff4757; font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    animation: liveBtnPulse 2s infinite;
  }
  .live-btn:active { transform: scale(0.94); }
  @keyframes liveBtnPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,71,87,0.5); }
    50%     { box-shadow: 0 0 0 6px rgba(255,71,87,0); }
  }


  .search-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(0,136,204,0.15);
    border: 1px solid rgba(0,136,204,0.4);
    color: #00d4ff; font-size: 15px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
  }
  .search-btn:active { transform: scale(0.94); }
  .search-modal-input { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid #333; background: var(--bg); color: var(--text); font-size: 15px; outline: none; margin-bottom: 12px; }
  .search-result { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.03); margin-bottom: 6px; cursor: pointer; transition: background 0.2s; }
  .search-result:active { background: rgba(0,136,204,0.2); }
  .search-result-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #8774E1, #0088cc); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; flex-shrink: 0; overflow: hidden; }
  .search-result-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .search-result-name { font-size: 14px; font-weight: 800; color: #fff; }
  .search-result-username { font-size: 11px; color: #888; }
  .up-slot-sell-btn { position: absolute; bottom: 4px; right: 4px; background: rgba(239,68,68,0.9); color: #fff; border: none; border-radius: 6px; font-size: 9px; font-weight: 900; padding: 3px 6px; cursor: pointer; z-index: 2; }
  .up-slot-sell-btn:active { transform: scale(0.9); }


  .profile-v2-shop-btn { margin-top: 10px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,215,0,0.4); background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.15)); color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; width: 100%; justify-content: center; }
  .profile-v2-shop-btn:active { transform: scale(0.97); }
  .shop-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.03); margin-bottom: 8px; border-left: 4px solid #555; }
  .shop-item.legendary { border-left-color: #ffd700; }
  .shop-item.epic { border-left-color: #a855f7; }
  .shop-item.rare { border-left-color: #0088cc; }
  .shop-item.uncommon { border-left-color: #3dff9e; }
  .shop-item.common { border-left-color: #888; }
  .shop-item-name { font-weight: 900; font-size: 15px; }
  .shop-item-rarity { font-size: 10px; text-transform: uppercase; opacity: 0.7; }
  .shop-item-price { font-size: 13px; font-weight: 900; color: #FECA58; display: flex; align-items: center; gap: 4px; }
  .shop-item-btn { background: var(--blue); color: #fff; border: none; padding: 8px 14px; border-radius: 8px; font-weight: 900; font-size: 12px; cursor: pointer; }
  .shop-item-btn:disabled { opacity: 0.4; cursor: not-allowed; }


  .showcase-edit-btn { background: rgba(135,116,225,0.15); border: 1px solid rgba(135,116,225,0.4); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; margin-left: auto; }
  .showcase-edit-btn:active { transform: scale(0.94); }
  .sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .sc-item { aspect-ratio: 1; background: rgba(255,255,255,0.03); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; cursor: pointer; border: 2px solid transparent; position: relative; overflow: hidden; transition: border-color 0.15s; }
  .sc-item.selected { border-color: #3dff9e; box-shadow: 0 0 12px rgba(61,255,158,0.4); }
  .sc-item img { width: 70%; height: 60%; object-fit: contain; }
  .sc-item-name { font-size: 8px; font-weight: bold; text-align: center; margin-top: 2px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
  .sc-item-sold { position: absolute; top: 3px; right: 3px; font-size: 8px; background: rgba(255,0,0,0.6); padding: 1px 4px; border-radius: 4px; }
  .sc-item-check { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #3dff9e; color: #000; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; }
  .sc-item.selected .sc-item-check { display: flex; }


  .sc-item-set-nick { position: absolute; bottom: 3px; right: 3px; background: rgba(255,215,0,0.85); color: #000; border: none; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; cursor: pointer; z-index: 2; }
  .sc-item-set-nick:active { transform: scale(0.9); }


  .shop-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,215,0,0.15);
    border: 1px solid rgba(255,215,0,0.4);
    color: #ffd700; font-size: 15px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
  }
  .shop-btn:active { transform: scale(0.94); }


  .profile-v2-nick-nft-btn { margin-top: 10px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,215,0,0.4); background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.15)); color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; width: 100%; justify-content: center; }
  .profile-v2-nick-nft-btn:active { transform: scale(0.97); }


  .search-loading { text-align: center; padding: 30px 20px; color: #888; font-size: 13px; }
  .search-spinner { display: inline-block; width: 24px; height: 24px; border: 2px solid rgba(255,255,255,0.1); border-top-color: #00d4ff; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 8px; }
  @keyframes spin { to { transform: rotate(360deg); } }


  /* ===== STREAMER MODE ===== */
  body.streamer-mode #balance { visibility: hidden; position: relative; }
  body.streamer-mode #balance::after { content: "***"; visibility: visible; position: absolute; left: 0; top: 0; }
  body.streamer-mode #profile-v2-balance { visibility: hidden; position: relative; }
  body.streamer-mode #profile-v2-balance::after { content: "***"; visibility: visible; position: absolute; left: 0; top: 0; }
  body.streamer-mode #profile-v2-id { visibility: hidden; }
  body.streamer-mode #profile-v2-id::after { content: "ID: ***"; visibility: visible; position: absolute; left: 0; }
  body.streamer-mode #profile-v2-id { position: relative; }
  body.streamer-mode .profile-v2-withdraw-btn,
  body.streamer-mode .topup-btn,
  body.streamer-mode .profile-v2-shop-btn { display: none !important; }
  body.streamer-mode #toast-container { display: none !important; }


/* ═══════ CONSOLIDATED ISO CSS ═══════ */

  #win-modal { position: fixed; inset: 0; z-index: 9000; display: none; align-items: center; justify-content: center; padding: 20px; }
  #win-modal.active { display: flex; }
  #win-modal .win-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
  #win-modal .win-content { position: relative; z-index: 1; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; background: var(--panel); border-radius: 28px; padding: 28px 20px; border: 2px solid; animation: winSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
    #win-modal .win-content { overflow: hidden; isolation: isolate; }
  #win-modal .win-content::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image: 
      radial-gradient(circle 2px at 15% 20%, rgba(255,255,255,0.6), transparent),
      radial-gradient(circle 1.5px at 45% 60%, rgba(255,255,255,0.4), transparent),
      radial-gradient(circle 2.5px at 75% 30%, rgba(255,255,255,0.5), transparent),
      radial-gradient(circle 1px at 30% 80%, rgba(255,255,255,0.35), transparent),
      radial-gradient(circle 2px at 60% 15%, rgba(255,255,255,0.5), transparent),
      radial-gradient(circle 1.5px at 85% 70%, rgba(255,255,255,0.4), transparent),
      radial-gradient(circle 1px at 20% 50%, rgba(255,255,255,0.3), transparent),
      radial-gradient(circle 2px at 90% 15%, rgba(255,255,255,0.5), transparent);
    animation: winParticlesFloat 6s ease-in-out infinite;
    opacity: 0.7;
  }
  @keyframes winParticlesFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-15px) scale(1.05); opacity: 0.9; }
  }
@keyframes winSlideUp { from { transform: translateY(60px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
  #win-modal .win-content.common {
    border-color: rgba(136,136,136,0.5);
    background: 
      repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 80px),
      radial-gradient(circle at 50% 40%, rgba(200,200,200,0.25) 0%, transparent 55%),
      radial-gradient(circle at 20% 80%, rgba(136,136,136,0.15) 0%, transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(136,136,136,0.15) 0%, transparent 40%),
      linear-gradient(180deg, #2a2a2a 0%, #161616 100%);
    box-shadow: 0 0 40px rgba(136,136,136,0.2), inset 0 0 80px rgba(0,0,0,0.4);
  }
  #win-modal .win-content.uncommon {
    border-color: rgba(61,255,158,0.6);
    background: 
      repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(61,255,158,0.03) 40px, rgba(61,255,158,0.03) 80px),
      radial-gradient(circle at 50% 40%, rgba(61,255,158,0.3) 0%, transparent 55%),
      radial-gradient(circle at 20% 80%, rgba(34,197,94,0.2) 0%, transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(16,185,129,0.2) 0%, transparent 40%),
      linear-gradient(180deg, #0f2a1a 0%, #0a0a0a 100%);
    box-shadow: 0 0 50px rgba(61,255,158,0.3), inset 0 0 80px rgba(0,50,20,0.4);
  }
  #win-modal .win-content.rare {
    border-color: rgba(0,136,204,0.7);
    background: 
      repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(0,136,204,0.04) 40px, rgba(0,136,204,0.04) 80px),
      radial-gradient(circle at 50% 40%, rgba(77,200,240,0.35) 0%, transparent 55%),
      radial-gradient(circle at 20% 80%, rgba(0,136,204,0.25) 0%, transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(0,85,204,0.25) 0%, transparent 40%),
      linear-gradient(180deg, #0a1e3a 0%, #0a0a0a 100%);
    box-shadow: 0 0 55px rgba(0,136,204,0.4), inset 0 0 80px rgba(0,20,50,0.5);
  }
  #win-modal .win-content.epic {
    border-color: rgba(168,85,247,0.75);
    background: 
      repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(168,85,247,0.04) 40px, rgba(168,85,247,0.04) 80px),
      radial-gradient(circle at 50% 40%, rgba(192,132,252,0.4) 0%, transparent 55%),
      radial-gradient(circle at 20% 80%, rgba(168,85,247,0.3) 0%, transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(124,58,237,0.3) 0%, transparent 40%),
      linear-gradient(180deg, #1a0a2e 0%, #0a0510 100%);
    box-shadow: 0 0 65px rgba(168,85,247,0.5), inset 0 0 100px rgba(40,0,60,0.5);
    animation: epicPulse 3s ease-in-out infinite;
  }
  #win-modal .win-content.legendary {
    border-color: rgba(255,215,0,0.85);
    background: 
      repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,215,0,0.05) 40px, rgba(255,215,0,0.05) 80px),
      radial-gradient(circle at 50% 40%, rgba(255,237,78,0.5) 0%, transparent 55%),
      radial-gradient(circle at 20% 80%, rgba(255,140,0,0.35) 0%, transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(255,100,0,0.35) 0%, transparent 40%),
      radial-gradient(circle at 50% 100%, rgba(255,215,0,0.2) 0%, transparent 50%),
      linear-gradient(180deg, #2a1e00 0%, #1a1000 100%);
    box-shadow: 0 0 80px rgba(255,215,0,0.6), inset 0 0 120px rgba(60,40,0,0.6);
    animation: legendaryPulse 2.5s ease-in-out infinite;
  }
  #win-modal .win-rarity-label { text-align: center; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 3px; opacity: 0.75; margin-bottom: 8px; }
  #win-modal .win-content.common .win-rarity-label { color: #aaa; }
  #win-modal .win-content.uncommon .win-rarity-label { color: #3dff9e; }
  #win-modal .win-content.rare .win-rarity-label { color: #4dc8f0; }
  #win-modal .win-content.epic .win-rarity-label { color: #c084fc; }
  #win-modal .win-content.legendary .win-rarity-label { color: #ffd700; }
  #win-modal .win-big-img { width: 240px; height: 240px; margin: 0 auto 12px auto; display: flex; align-items: center; justify-content: center; animation: winFloat 3s ease-in-out infinite; }
  #win-modal .win-big-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5)); }
  #win-modal .win-content.legendary .win-big-img img { filter: drop-shadow(0 0 30px rgba(255,215,0,0.9)) drop-shadow(0 8px 24px rgba(0,0,0,0.5)); }
  #win-modal .win-content.epic .win-big-img img { filter: drop-shadow(0 0 25px rgba(168,85,247,0.8)) drop-shadow(0 8px 24px rgba(0,0,0,0.5)); }
  @keyframes winFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  #win-modal .win-big-emoji { font-size: 140px; line-height: 1; }
  #win-modal .win-title { text-align: center; font-size: 22px; font-weight: 900; margin-bottom: 6px; }
  #win-modal .win-value { text-align: center; font-size: 18px; font-weight: 900; color: #3dff9e; margin-bottom: 20px; }
  #win-modal .win-content.legendary .win-value { color: #ffd700; text-shadow: 0 0 12px rgba(255,215,0,0.6); }
  #win-modal .win-btns { display: flex; flex-direction: column; gap: 10px; }
  #win-modal .win-btn-sell { padding: 15px; border-radius: 14px; border: none; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 15px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 16px rgba(34,197,94,0.35); }
  #win-modal .win-btn-keep { padding: 13px; border-radius: 14px; border: 1px solid #333; background: var(--panel2); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; }
  #win-modal .win-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
  #win-modal .win-grid-item { aspect-ratio: 1; background: rgba(0,0,0,0.35); border-radius: 12px; border: 2px solid #333; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
  #win-modal .win-grid-item.common { border-color: rgba(136,136,136,0.5); }
  #win-modal .win-grid-item.uncommon { border-color: rgba(61,255,158,0.6); }
  #win-modal .win-grid-item.rare { border-color: rgba(0,136,204,0.7); }
  #win-modal .win-grid-item.epic { border-color: rgba(168,85,247,0.75); }
  #win-modal .win-grid-item.legendary { border-color: rgba(255,215,0,0.85); box-shadow: 0 0 12px rgba(255,215,0,0.5); }
  #win-modal .win-grid-item img { width: 70%; height: 70%; object-fit: contain; }
  #win-modal .win-grid-item .emoji { font-size: 32px; }
  #win-modal .win-grid-item .name { font-size: 9px; font-weight: bold; margin-top: 4px; text-align: center; overflow: hidden; white-space: nowrap; width: 100%; }
  #win-modal .win-grid-item .val { font-size: 9px; color: #3dff9e; font-weight: 900; }
  #win-modal .win-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.4); border: none; color: #888; font-size: 18px; cursor: pointer; }
  .win-confetti { position: fixed; width: 10px; height: 10px; top: -20px; z-index: 9500; pointer-events: none; animation: confettiFall linear forwards; }
  @keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

  @keyframes epicPulse {
    0%, 100% { box-shadow: 0 0 65px rgba(168,85,247,0.5), inset 0 0 100px rgba(40,0,60,0.5); }
    50% { box-shadow: 0 0 90px rgba(168,85,247,0.8), inset 0 0 120px rgba(40,0,60,0.7); }
  }
  @keyframes legendaryPulse {
    0%, 100% { box-shadow: 0 0 80px rgba(255,215,0,0.6), inset 0 0 120px rgba(60,40,0,0.6); }
    50% { box-shadow: 0 0 120px rgba(255,215,0,1), inset 0 0 160px rgba(80,50,0,0.8); }
  }

  /* Разрешаем скролл (pan-y), но запрещаем перетаскивание обложки */
  .cv2-hero {
      touch-action: pan-y !important;
      -webkit-user-select: none !important;
      user-select: none !important;
  }
  .cv2-hero-img, .cv2-hero-emoji {
      pointer-events: none !important;
      touch-action: pan-y !important;
      -webkit-user-drag: none !important;
  }

  /* Фикс для картинок на главном экране и в кейсах, чтобы они не отрывались при скролле */
  .case-cover-img, .h-card-cover img, .cv2-hero-img {
      pointer-events: none !important; /* клики и свайпы проходят сквозь картинку на родительский блок */
      -webkit-user-drag: none !important;
      user-drag: none !important;
      -webkit-touch-callout: none !important;
  }
  .case-cover-wrap, .h-card-cover, .cv2-hero {
      touch-action: pan-x pan-y !important; /* разрешаем скролл по осям X и Y */
  }

/* ===== DUELS ===== */
.duel-header { display:flex; justify-content:space-between; align-items:center; padding:12px 15px 8px; }
.duel-title { font-size:20px; font-weight:900; color:#fff; }
.duel-create-btn { background:linear-gradient(135deg,#dc2626,#ff4757); color:#fff; border:none; padding:8px 14px; border-radius:12px; font-weight:900; font-size:13px; cursor:pointer; }
.duel-card { background:linear-gradient(135deg,#1c2128,#252b33); border:1px solid rgba(255,255,255,0.08); border-radius:16px; padding:14px; margin:0 15px 10px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.duel-card-info { flex:1; min-width:0; }
.duel-card-case { font-size:11px; color:#888; text-transform:uppercase; font-weight:700; }
.duel-card-creator { font-size:15px; font-weight:800; color:#fff; margin:2px 0 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.duel-card-bet { font-size:13px; color:#29A9EB; font-weight:800; }
.duel-join-btn { flex-shrink:0; background:linear-gradient(135deg,#00c850,#4ade80); color:#000; border:none; padding:10px 14px; border-radius:12px; font-weight:900; font-size:12px; cursor:pointer; white-space:nowrap; }
.duel-join-btn:active { transform:scale(0.95); }
.duel-history { padding:0 15px 20px; margin-top:10px; }
.duel-history-title { font-size:13px; color:#888; font-weight:800; margin-bottom:8px; }
.duel-history-item { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; background:rgba(255,255,255,0.03); border-radius:10px; margin-bottom:6px; font-size:12px; gap:8px; }
.duel-history-winner { color:#ffd700; font-weight:900; }
.duel-history-prize { color:#4ade80; font-weight:700; font-size:11px; white-space:nowrap; }
.duel-empty { text-align:center; padding:40px 20px; color:#888; font-size:13px; line-height:1.6; }
.duel-empty b { color:#fff; }

.duel-modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.85); z-index:9999; display:none; align-items:center; justify-content:center; padding:20px; }
.duel-modal-backdrop.active { display:flex; }
.duel-modal { background:linear-gradient(135deg,#1c2128,#252b33); border:1px solid rgba(255,255,255,0.1); border-radius:24px; padding:20px; max-width:400px; width:100%; max-height:90vh; overflow-y:auto; position:relative; }
.duel-modal-title { font-size:20px; font-weight:900; color:#fff; margin-bottom:16px; text-align:center; }
.duel-modal-close { position:absolute; top:12px; right:12px; background:rgba(0,0,0,0.4); border:none; color:#fff; width:32px; height:32px; border-radius:50%; font-size:18px; cursor:pointer; }
.duel-label { font-size:11px; color:#888; font-weight:800; text-transform:uppercase; margin-bottom:6px; }
.duel-case-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-bottom:14px; }
.duel-case-option { background:#0d1117; border:2px solid #333; border-radius:12px; padding:10px 8px; text-align:center; cursor:pointer; font-size:11px; font-weight:700; color:#fff; transition:all 0.2s; }
.duel-case-option.active { border-color:#29A9EB; background:rgba(41,169,235,0.15); }
.duel-case-option .icon { font-size:24px; margin-bottom:4px; }
.duel-bet-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
.duel-bet-option { background:#0d1117; border:2px solid #333; border-radius:12px; padding:10px 4px; text-align:center; cursor:pointer; font-size:13px; font-weight:800; color:#fff; transition:all 0.2s; }
.duel-bet-option.active { border-color:#4ade80; background:rgba(74,222,128,0.15); color:#4ade80; }
.duel-create-submit { width:100%; background:linear-gradient(135deg,#dc2626,#ff4757); color:#fff; border:none; padding:14px; border-radius:14px; font-weight:900; font-size:15px; cursor:pointer; margin-top:8px; }
.duel-create-submit:disabled { opacity:0.5; cursor:not-allowed; }

.duel-countdown { font-size:80px; font-weight:900; text-align:center; color:#ffd700; margin:20px 0; font-family:monospace; }
.duel-result-title { font-size:26px; font-weight:900; text-align:center; margin:16px 0; }
.duel-result-win { color:#ffd700; }
.duel-result-lose { color:#f87171; }
.duel-result-prizes { display:flex; justify-content:space-around; margin:20px 0; gap:10px; }
.duel-result-prize { flex:1; background:rgba(255,255,255,0.05); border-radius:12px; padding:12px 8px; text-align:center; }
.duel-result-prize-name { font-size:10px; color:#888; margin-bottom:4px; text-transform:uppercase; font-weight:800; }
.duel-result-prize-value { font-size:13px; font-weight:900; color:#ffd700; margin-top:4px; }
.duel-result-actions { display:flex; gap:10px; margin-top:16px; }
.duel-result-actions button { flex:1; padding:12px; border-radius:12px; font-weight:900; font-size:13px; cursor:pointer; border:none; }
.duel-btn-primary { background:linear-gradient(135deg,#dc2626,#ff4757); color:#fff; }
.duel-btn-secondary { background:#333; color:#fff; }


/* ===== SVG ICONS ===== */
.svg-icon { display:inline-block; width:20px; height:20px; vertical-align:-3px; flex-shrink:0; }
.svg-icon.sm { width:16px; height:16px; vertical-align:-2px; }
.svg-icon.lg { width:28px; height:28px; vertical-align:-4px; }
.svg-icon.xl { width:48px; height:48px; vertical-align:-6px; }
.svg-icon.mr { margin-right:6px; }
.svg-icon.ml { margin-left:6px; }
.tab-btn .svg-icon { width:18px; height:18px; margin-right:4px; vertical-align:-3px; }
.duel-create-btn .svg-icon { margin-right:4px; }
.duel-join-btn .svg-icon { margin-right:4px; width:16px; height:16px; }
.duel-result-title .svg-icon { width:56px; height:56px; margin-right:8px; vertical-align:middle; }
.duel-result-title.duel-result-win .svg-icon { color:#ffd700; filter:drop-shadow(0 0 12px rgba(255,215,0,0.6)); }
.duel-result-title.duel-result-lose .svg-icon { color:#f87171; opacity:0.85; }
.duel-result-title.is-draw .svg-icon { color:#4ade80; }
.duel-msg-icon { width:18px; height:18px; margin-right:6px; vertical-align:-3px; }


/* ===== CASE COVER ICONS ===== */
.case-cover-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background-size: cover; background-position: center;
  background-color: #1c2128;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.case-cover-icon.sm { width: 36px; height: 36px; border-radius: 10px; }
.case-cover-icon.xs { width: 28px; height: 28px; border-radius: 8px; }
.duel-card .case-cover-icon { width: 44px; height: 44px; }
.duel-case-option .case-cover-icon { margin: 0 auto 6px; }


/* ===== PROFILE POLISH (без ломки структуры) ===== */

/* Header sticky + blur */
#view-profile .case-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13,17,23,0.9);
  /* backdrop-filter removed */
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Hero — градиент + тени, БЕЗ float */
.profile-v2-hero {
  background: linear-gradient(180deg, #192230 0%, #1c2128 60%, #161a20 100%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 20px !important;
  padding: 16px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
  position: relative; overflow: hidden;
}
.profile-v2-hero::before {
  content: ''; position: absolute; top: -48px; right: -48px;
  width: 144px; height: 144px; background: rgba(41,169,235,0.15);
  border-radius: 50%; filter: blur(24px); pointer-events: none;
}

/* Аватар — градиентное кольцо */
.profile-v2-avatar-wrap {
  background: linear-gradient(135deg, #29A9EB 0%, #9333ea 50%, #ffd700 100%) !important;
  padding: 2px !important;
  border-radius: 50% !important;
  box-shadow: 0 0 15px rgba(41,169,235,0.35) !important;
}
.profile-v2-avatar {
  border-radius: 50% !important;
  background: #11161d !important;
}
.edit-showcase-btn {
  background: #29A9EB !important;
  border: 2px solid #1c2128 !important;
  width: 26px !important; height: 26px !important;
  border-radius: 50% !important;
}

/* Баланс — отдельный блок */
.profile-v2-balance-row {
  background: rgba(0,0,0,0.35) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  margin-top: 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
.profile-v2-balance-value {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: -0.02em !important;
  line-height: 1 !important;
}
.profile-v2-balance-label {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #8b949e !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.profile-v2-withdraw-btn {
  background: #29A9EB !important;
  border: none !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  color: #fff !important;
  cursor: pointer !important;
  margin-left: auto !important;
  white-space: nowrap !important;
  box-shadow: 0 0 15px rgba(41,169,235,0.35) !important;
}
.profile-v2-withdraw-btn:active { transform: scale(0.95); }

/* Две кнопки в grid */
.profile-v2-gen-avatar-btn,
.profile-v2-nick-nft-btn {
  flex: 1 !important;
  min-width: 0 !important;
  padding: 10px 8px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  margin-top: 8px !important;
  border: 1px solid !important;
}
.profile-v2-gen-avatar-btn {
  background: linear-gradient(90deg, rgba(88,28,135,0.3), rgba(107,33,168,0.2)) !important;
  border-color: rgba(168,85,247,0.3) !important;
  color: #d8b4fe !important;
}
.profile-v2-nick-nft-btn {
  background: linear-gradient(90deg, rgba(146,64,14,0.3), rgba(120,53,15,0.2)) !important;
  border-color: rgba(245,158,11,0.3) !important;
  color: #fbbf24 !important;
}

/* Общий контейнер под 2 кнопки — оборачиваем через flex на info */
.profile-v2-info { display: flex !important; flex-direction: column !important; }
.profile-v2-username { font-size: 20px !important; font-weight: 800 !important; }
.profile-v2-id {
  font-family: 'SF Mono', ui-monospace, Menlo, monospace !important;
  font-size: 12px !important;
  color: #8b949e !important;
  margin-top: 2px !important;
}

/* Карточки — единый стиль */
.profile-v2-card {
  background: #1c2128 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 16px !important;
  padding: 14px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}
.profile-v2-card-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin-bottom: 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.profile-v2-setting {
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.profile-v2-setting:last-child { border-bottom: none !important; }

/* Promo row — красивое поле */
.profile-v2-promo-row {
  display: flex !important;
  gap: 6px !important;
  background: #0d1117 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  padding: 4px !important;
  align-items: stretch !important;
}
.profile-v2-promo-row:focus-within {
  border-color: #29A9EB !important;
}
.profile-v2-promo-input {
  flex: 1 !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  padding: 8px 10px !important;
  color: #fff !important;
  font-size: 12px !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.profile-v2-promo-btn {
  background: #29A9EB !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}


/* ===== PROFILE POLISH 2 ===== */

/* 2 кнопки в ряд */
.profile-v2-action-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 8px !important;
}
.profile-v2-action-grid .profile-v2-gen-avatar-btn,
.profile-v2-action-grid .profile-v2-nick-nft-btn {
  margin-top: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 10px 6px !important;
  font-size: 11px !important;
  gap: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.profile-v2-action-grid .svg-icon {
  flex-shrink: 0 !important;
}

/* «Выбрать все» — серая вместо красной */
.sell-all-btn {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #cbd5e1 !important;
  padding: 7px 12px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.sell-all-btn.active {
  background: rgba(41,169,235,0.15) !important;
  border-color: rgba(41,169,235,0.4) !important;
  color: #29A9EB !important;
}

/* Level card — единый стиль с карточками */
#level-card-wrap > * {
  background: linear-gradient(135deg, #1c2135 0%, #1c2128 60%, #1a2030 100%) !important;
  border: 1px solid rgba(168,85,247,0.25) !important;
  border-radius: 16px !important;
  padding: 14px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
  margin-bottom: 8px !important;
}

/* Кнопка «Все награды за уровни» — серый secondary */
#level-card-wrap button,
#level-card-wrap .level-rewards-btn {
  width: 100% !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #cbd5e1 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-top: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

/* Кнопка «Как получить XP?» — перекрываем ВСЕ белые варианты */
#view-profile button[style*="#fff"],
#view-profile button[style*="white"],
#view-profile button[style*="rgb(255"],
#level-card-wrap button[style*="#fff"],
#level-card-wrap button[style*="white"],
#view-profile .xp-help-btn,
#view-profile .how-to-xp,
#view-profile [class*="how-xp"],
#view-profile [class*="xp-help"],
#level-card-wrap [class*="how-xp"],
#level-card-wrap [class*="xp-help"] {
  background: rgba(255,255,255,0.06) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 6px !important;
  cursor: pointer !important;
}

/* Streak card — оранжевый акцент */
#profile-streak-card {
  background: linear-gradient(135deg, rgba(41,31,22,0.9) 0%, rgba(28,33,40,1) 50%, rgba(28,33,40,1) 100%) !important;
  border: 1px solid rgba(249,115,22,0.25) !important;
}
#profile-streak-card .profile-v2-card-title {
  color: #fb923c !important;
}

/* Промокод — поле аккуратное */
.profile-v2-promo-row {
  display: flex !important;
  gap: 6px !important;
  background: #0d1117 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  padding: 4px !important;
  align-items: stretch !important;
}
.profile-v2-promo-row:focus-within {
  border-color: #29A9EB !important;
  box-shadow: 0 0 0 3px rgba(41,169,235,0.15) !important;
}
.profile-v2-promo-input {
  flex: 1 !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  padding: 8px 10px !important;
  color: #fff !important;
  font-size: 12px !important;
  outline: none !important;
  box-sizing: border-box !important;
  text-transform: uppercase !important;
}
.profile-v2-promo-input::placeholder {
  color: #6b7280 !important;
  text-transform: none !important;
}
.profile-v2-promo-btn {
  background: #29A9EB !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}


/* ===== LEVEL CARD STITCH ===== */
.level-card-stitch {
  background: linear-gradient(135deg, #1c2135 0%, #1c2128 60%, #1a2030 100%) !important;
  border: 1px solid rgba(168,85,247,0.25) !important;
  border-radius: 16px !important;
  padding: 14px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.level-card-top {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.level-card-icon-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
}
.level-card-lv-badge {
  position: absolute !important;
  bottom: -6px !important;
  right: -6px !important;
  background: linear-gradient(135deg, #29A9EB, #00d4ff) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  padding: 3px 8px !important;
  border-radius: 10px !important;
  border: 2px solid #1c2128 !important;
  box-shadow: 0 2px 8px rgba(41,169,235,0.4) !important;
  white-space: nowrap !important;
}
.level-card-body {
  flex: 1 !important;
  min-width: 0 !important;
}
.level-card-tier {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #a78bfa !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 2px !important;
}
.level-card-title {
  font-size: 17px !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1.1 !important;
}
.level-card-max {
  font-size: 11px !important;
  color: #ffd700 !important;
  font-weight: 800 !important;
  margin-top: 4px !important;
}
.level-card-progress {
  width: 100% !important;
  height: 6px !important;
  background: rgba(0,0,0,0.4) !important;
  border-radius: 3px !important;
  overflow: hidden !important;
  margin-top: 6px !important;
}
.level-card-progress-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #29A9EB 0%, #ffd700 100%) !important;
  border-radius: 3px !important;
}
.level-card-progress-text {
  font-size: 10px !important;
  color: #8b949e !important;
  margin-top: 4px !important;
  font-family: 'SF Mono', ui-monospace, monospace !important;
}
.level-card-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.level-card-actions .level-reward-btn {
  width: 100% !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #cbd5e1 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.level-card-actions .level-reward-btn:active { transform: scale(0.98); }
.level-card-xp-btn {
  width: 100% !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #94a3b8 !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.level-card-xp-btn:active { transform: scale(0.98); }


/* ===== HERO FIXED ===== */
body #view-profile .profile-v2-hero {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  background: linear-gradient(180deg, #192230 0%, #1c2128 60%, #161a20 100%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 20px !important;
  padding: 16px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body #view-profile .profile-v2-hero::before {
  content: '' !important;
  position: absolute !important;
  top: -48px !important;
  right: -48px !important;
  width: 144px !important;
  height: 144px !important;
  background: rgba(41,169,235,0.15) !important;
  border-radius: 50% !important;
  filter: blur(24px) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
body #view-profile .profile-v2-hero > * { position: relative !important; z-index: 1 !important; }

body #view-profile .profile-v2-hero-top {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
}

body #view-profile .profile-v2-avatar-wrap {
  width: 70px !important; height: 70px !important;
  flex-shrink: 0 !important;
  padding: 2px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #29A9EB 0%, #9333ea 50%, #ffd700 100%) !important;
  box-shadow: 0 0 15px rgba(41,169,235,0.35) !important;
  position: relative !important;
}
body #view-profile .profile-v2-avatar {
  width: 100% !important; height: 100% !important;
  border-radius: 50% !important;
  background: #11161d !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  color: #fff !important;
  overflow: hidden !important;
}
body #view-profile .edit-showcase-btn {
  position: absolute !important;
  bottom: -2px !important; right: -2px !important;
  width: 24px !important; height: 24px !important;
  border-radius: 50% !important;
  background: #29A9EB !important;
  border: 2px solid #1c2128 !important;
  color: #fff !important;
  font-size: 11px !important;
  padding: 0 !important;
  cursor: pointer !important;
  z-index: 10 !important;
}

body #view-profile .profile-v2-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
body #view-profile .profile-v2-username {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #fff !important;
  letter-spacing: -0.01em !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.1 !important;
}
body #view-profile .profile-v2-id {
  font-family: 'SF Mono', ui-monospace, Menlo, monospace !important;
  font-size: 12px !important;
  color: #8b949e !important;
}

/* Balance row — full width, отдельный блок */
body #view-profile .profile-v2-balance-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
  background: rgba(0,0,0,0.35) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  box-sizing: border-box !important;
}
body #view-profile .profile-v2-balance-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
body #view-profile .profile-v2-balance-icon {
  width: 36px !important; height: 36px !important;
  border-radius: 10px !important;
  background: rgba(245,158,11,0.15) !important;
  border: 1px solid rgba(255,215,0,0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
}
body #view-profile .profile-v2-balance-label {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #8b949e !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
body #view-profile .profile-v2-balance-value-wrap {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  margin-top: 3px !important;
}
body #view-profile .profile-v2-balance-value {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: -0.02em !important;
  line-height: 1 !important;
}
body #view-profile .profile-v2-balance-currency {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #29A9EB !important;
}
body #view-profile .profile-v2-withdraw-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  background: #29A9EB !important;
  color: #fff !important;
  border: none !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 15px rgba(41,169,235,0.35) !important;
}
body #view-profile .profile-v2-withdraw-btn:active { transform: scale(0.95) !important; }

/* 2 кнопки в grid — full width */
body #view-profile .profile-v2-action-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
}
body #view-profile .profile-v2-action-grid > button {
  padding: 10px 8px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  border: 1px solid !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
body #view-profile .profile-v2-gen-avatar-btn {
  background: linear-gradient(90deg, rgba(88,28,135,0.3), rgba(107,33,168,0.2)) !important;
  border-color: rgba(168,85,247,0.3) !important;
  color: #d8b4fe !important;
}
body #view-profile .profile-v2-nick-nft-btn {
  background: linear-gradient(90deg, rgba(146,64,14,0.3), rgba(120,53,15,0.2)) !important;
  border-color: rgba(245,158,11,0.3) !important;
  color: #fbbf24 !important;
}
body #view-profile .profile-v2-action-grid > button .svg-icon {
  width: 14px !important; height: 14px !important;
  color: inherit !important;
  fill: none !important;
  stroke: currentColor !important;
  flex-shrink: 0 !important;
}




/* ===== INVENTORY SIZE FIX ===== */





/* КАРТОЧКА — 185px, overflow видимый */




/* Картинка 85px */



/* Название */


/* Цена */



/* Кнопки — скрыты, при selected flex */






/* ЧЕКБОКС — ЖЁСТКО КРУГ 18x18 */



/* Badge вывод */


/* Кнопка показать все */
body #view-profile .inv-show-all-btn,
body #view-profile #inv-show-all-btn {
  display: flex !important;
  width: 100% !important;
  padding: 10px 14px !important;
  background: rgba(41,169,235,0.1) !important;
  border: 1px solid rgba(41,169,235,0.3) !important;
  border-radius: 12px !important;
  color: #29A9EB !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  margin-top: 8px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  grid-column: 1 / -1 !important;
}


/* ===== INVENTORY MINIMAL ===== */
#profile-v2-inventory-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 8px 0 0 0 !important;
  box-sizing: border-box !important;
  align-items: start !important;
  overflow: visible !important;
}
#profile-v2-inventory-list > .inv-card-v2:nth-child(n+7) {
  display: none !important;
}
#profile-v2-inventory-list.inv-expanded > .inv-card-v2:nth-child(n+7) {
  display: block !important;
}
.inv-show-all-btn,
#inv-show-all-btn {
  display: flex !important;
  width: 100% !important;
  padding: 10px 14px !important;
  background: rgba(41,169,235,0.1) !important;
  border: 1px solid rgba(41,169,235,0.3) !important;
  border-radius: 12px !important;
  color: #29A9EB !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  margin-top: 8px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}


/* ===== HOME V1 (Stitch style) ===== */
.home-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 8px;
  gap: 10px;
}
.htb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.htb-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #1c2128, #29A9EB);
  border: 2px solid rgba(41,169,235,0.5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #fff; font-size: 16px;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 0 12px rgba(41,169,235,0.3);
}
.htb-user-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.htb-name {
  font-size: 13px; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 120px;
}
.htb-level {
  font-size: 10px; font-weight: 800;
  color: #ffd700;
  background: rgba(255,215,0,0.15);
  border: 1px solid rgba(255,215,0,0.3);
  padding: 1px 6px; border-radius: 5px;
  display: inline-block; width: fit-content;
}
.htb-right { display: flex; align-items: center; gap: 8px; }
.htb-balance {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(41,169,235,0.15);
  border: 1px solid rgba(41,169,235,0.4);
  padding: 8px 12px; border-radius: 20px;
  font-weight: 800;
}
.htb-coin { width: 14px; height: 14px; flex-shrink: 0; }
.htb-balance-value { color: #fff; font-size: 13px; font-weight: 900; }
.htb-currency { color: #29A9EB; font-size: 10px; font-weight: 800; }
.htb-plus {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #29A9EB, #00d4ff);
  border: none; color: #fff;
  font-size: 22px; font-weight: 900;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(41,169,235,0.4);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.htb-plus:active { transform: scale(0.92); }

/* LIVE DROPS */
.home-live-row {
  margin: 8px 14px;
  background: rgba(28,33,40,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 8px 0;
  overflow: hidden;
}
.hlr-header {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px 6px;
}
.hlr-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: hlrPulse 1.5s infinite;
}
@keyframes hlrPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hlr-label {
  font-size: 10px; font-weight: 900; color: #ffd700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hlr-online {
  margin-left: auto; font-size: 10px; color: #8b949e; font-weight: 700;
}
.hlr-marquee-wrap { overflow: hidden; position: relative; }
.hlr-marquee {
  display: flex; gap: 8px; padding: 0 12px;
  animation: hlrScroll 40s linear infinite;
  width: fit-content;
}
@keyframes hlrScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.hlr-item {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 4px 8px 4px 4px;
  flex-shrink: 0;
}
.hlr-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: #29A9EB;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #fff;
  flex-shrink: 0;
}
.hlr-name { font-size: 10px; color: #cbd5e1; font-weight: 700; }
.hlr-value { font-size: 10px; color: #4ade80; font-weight: 900; }
.hlr-prize-img {
  width: 24px; height: 24px; border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,0.05);
}

/* HERO BANNER */
.home-hero-banner {
  margin: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #192230 0%, #291f16 100%);
  border: 1px solid rgba(255,215,0,0.25);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s;
}
.home-hero-banner:active { transform: scale(0.98); }
.home-hero-banner::before {
  content: ''; position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(255,215,0,0.2), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hhb-content { position: relative; z-index: 1; }
.hhb-label {
  font-size: 10px; font-weight: 900; color: #ffd700;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.hhb-title {
  font-size: 26px; font-weight: 900; color: #fff;
  line-height: 1; margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.hhb-subtitle {
  font-size: 12px; color: #cbd5e1; font-weight: 600;
  margin-bottom: 10px;
}
.hhb-code-row {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 10px;
  padding: 5px 10px;
}
.hhb-code-label { font-size: 10px; color: #8b949e; font-weight: 700; }
.hhb-code {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px; font-weight: 900;
  color: #ffd700; letter-spacing: 1px;
}
.hhb-arrow { color: #ffd700; font-weight: 900; margin-left: 4px; }

/* ===== PVP REDESIGN (Stitch) ===== */
#view-menu .top-tabs-bar { padding: 6px 0; }
.tab-btn[data-active="1"][data-tab="pvp"] {
  background: linear-gradient(135deg, #29A9EB, #1a93d4, #06b6d4) !important;
  box-shadow: 0 4px 16px rgba(41,169,235,0.55) !important;
  color: #fff !important;
  border-color: rgba(6,182,212,0.5) !important;
}

.duel-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 14px;
}
.duel-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #1c2128;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 76px;
}
.duel-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.duel-stat-num {
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.08em;
}
.duel-stat-icon {
  width: 14px;
  height: 14px;
}
.duel-stat-icon-fire { color: #f59e0b; }
.duel-stat-icon-gold { color: #ffd700; }
.duel-stat-icon-green { color: #22c55e; }
.duel-stat-value {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-top: 6px;
}
.duel-stat-value-gold { color: #ffd700; }
.duel-stat-value-green { color: #22c55e; }
.duel-stat-label {
  font-size: 10px;
  font-weight: 500;
  color: #8b949e;
  margin-top: 2px;
}

.duel-cta-wrap {
  margin: 8px 14px;
}
.duel-cta-btn {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #dc2626, #ef4444, #dc2626);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(220,38,38,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.12s, box-shadow 0.2s;
}
.duel-cta-btn:active { transform: scale(0.98); box-shadow: 0 3px 12px rgba(220,38,38,0.3); }
.duel-cta-btn .svg-icon { width: 16px; height: 16px; stroke-width: 2.5; }

.duel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 14px 8px 14px;
}
.duel-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.duel-section-title .svg-icon { color: #ffd700; }
.duel-section-title-history { color: #94a3b8; }
.duel-section-title-history .svg-icon { color: #94a3b8; }
.duel-section-count {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

.duels-list {
  margin: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.duel-card-v2 {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #1c2128;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: border-color 0.15s;
}
.duel-card-v2:hover { border-color: var(--duel-accent, #29A9EB); }
.duel-card-v2-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.duel-card-v2-cover {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  border: 1px solid var(--duel-accent, #29A9EB) !important;
  box-shadow: 0 0 14px var(--duel-glow, rgba(41,169,235,0.4)) !important;
  flex-shrink: 0 !important;
}
.duel-card-v2-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.duel-card-v2-case {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--duel-accent, #29A9EB);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duel-card-v2-creator {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duel-card-v2-bet {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #29A9EB;
  margin-top: 4px;
}
.duel-bet-star {
  color: #29A9EB;
  width: 12px;
  height: 12px;
}
.duel-join-btn-v2 {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
  color: #000;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,185,129,0.4);
  flex-shrink: 0;
  transition: transform 0.12s, filter 0.15s;
}
.duel-join-btn-v2:active { transform: scale(0.94); filter: brightness(1.15); }
.duel-join-btn-v2 svg { color: #000; }

.duel-empty-state {
  margin: 0 14px;
  padding: 40px 16px;
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.1);
  background: rgba(28,33,40,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.duel-empty-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
  overflow: hidden;
  position: relative;
}
.duel-empty-icon-wrap::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.06);
  pointer-events: none;
}
.duel-empty-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.duel-empty-text {
  font-size: 13px;
  color: #94a3b8;
  margin: 6px 0 0 0;
  max-width: 220px;
  line-height: 1.4;
}
.duel-empty-cta {
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: #29A9EB;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(41,169,235,0.4);
}
.duel-empty-cta:active { transform: scale(0.96); }

.duels-history {
  margin: 0 14px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.duel-history-row-v2 {
  height: 44px;
  border-radius: 10px;
  background: #1c2128;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
}
.duel-history-row-v2:active { background: #222831; }
.duel-history-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.duel-history-winner-v2 {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.duel-history-loser-v2 {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}
.duel-history-vs {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}
.duel-history-right-v2 {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  color: #22c55e;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}
.duel-history-empty {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 12px;
}

/* ===== DUEL CREATE — BOTTOM SHEET (Stitch) ===== */
#duel-modal.sheet-mode {
  align-items: flex-end;
  padding: 0;
}
#duel-modal.sheet-mode .duel-modal {
  background: #1c2128;
  border-radius: 24px 24px 0 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0 0 24px 0;
  max-width: 100%;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -12px 48px rgba(0,0,0,0.85);
  animation: duelSheetSlideUp 0.25s ease-out;
}
#duel-modal.sheet-mode .duel-modal-close {
  display: none !important;
}
@keyframes duelSheetSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.duel-handle-wrap {
  padding: 12px 0 8px 0;
  display: flex;
  justify-content: center;
}
.duel-handle {
  width: 40px;
  height: 4px;
  background: #484f58;
  border-radius: 2px;
}

.duel-sheet-header {
  padding: 4px 16px 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.duel-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.duel-sheet-emoji { font-size: 18px; }
.duel-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #2d333b;
  color: #adbac7;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.duel-sheet-close:active { background: #373e47; transform: scale(0.95); }

.duel-sheet-label {
  padding: 0 16px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #768390;
  letter-spacing: 0.08em;
}

.duel-case-grid-sheet {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}
.duel-case-card {
  aspect-ratio: 1 / 1;
  background: #161b22;
  border-radius: 14px;
  padding: 12px 8px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}
.duel-case-card:active { transform: scale(0.98); }
.duel-case-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, var(--card-glow, rgba(41,169,235,0.5)), transparent 70%);
  opacity: 0.35;
  transition: opacity 0.2s;
  pointer-events: none;
}
.duel-case-card:hover::before { opacity: 0.6; }
.duel-case-card.active {
  border-color: var(--card-accent, #29A9EB);
  box-shadow: 0 0 20px var(--card-glow, rgba(41,169,235,0.5));
}
.duel-case-card.active::before { opacity: 0.75; }

.duel-case-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card-accent, #29A9EB);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 8px var(--card-accent, #29A9EB);
}
.duel-case-card.active .duel-case-card-check { display: flex; }

.duel-case-card-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: 4px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 32px;
  filter: drop-shadow(0 4px 14px var(--card-glow, rgba(41,169,235,0.5)));
}

.duel-case-card-name {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-top: 4px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-case-card-price {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34,39,46,0.85);
  border-radius: 20px;
  padding: 2px 10px;
  border: 1px solid rgba(245,158,11,0.2);
  font-size: 11px;
  font-weight: 700;
  color: #e3b341;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  margin-top: 2px;
}
.duel-case-card.active .duel-case-card-price {
  border-color: rgba(41,169,235,0.4);
  box-shadow: 0 0 8px rgba(41,169,235,0.2);
}

.duel-info-block {
  margin: 0 16px;
  background: #0d1117;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(41,169,235,0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.duel-info-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.duel-info-label {
  font-size: 11px;
  color: #8b949e;
  display: flex;
  align-items: center;
  gap: 6px;
}
.duel-info-value {
  font-size: 15px;
  font-weight: 700;
  color: #e3b341;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: -0.01em;
}
.duel-info-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
}
.duel-info-row-2 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.duel-info-metric {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #8b949e;
  white-space: nowrap;
}
.duel-info-metric-val {
  color: #c9d1d9;
  font-weight: 600;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.duel-info-badge {
  color: #10b981;
  font-weight: 700;
  font-size: 10px;
  background: rgba(16,185,129,0.1);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(16,185,129,0.2);
}
.duel-info-badge.neg {
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.2);
}

.duel-submit-wrap {
  padding: 16px 16px 0 16px;
}
.duel-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #ef4444, #dc2626, #ef4444);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239,68,68,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.12s, filter 0.15s;
}
.duel-submit-btn:active { transform: scale(0.98); filter: brightness(1.1); }
.duel-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }


/* ===== DUEL BATTLE SCREEN ===== */
#duel-modal.battle-mode .duel-modal {
  max-width: 420px !important;
  width: 100% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: #0d1117 !important;
  overflow-y: auto !important;
}
#duel-modal.battle-mode { padding: 0 !important; }
#duel-modal.battle-mode .duel-modal-close { display: none !important; }

.dbs-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 45%, rgba(16,185,129,0.12) 0%, rgba(41,169,235,0.08) 35%, rgba(13,17,23,0) 70%),
              radial-gradient(circle at 50% 20%, rgba(220,38,38,0.08) 0%, rgba(13,17,23,0) 50%),
              #0d1117;
  color: #e2e8f0;
  font-family: 'Inter', system-ui, sans-serif;
  padding-bottom: 20px;
}

/* Top bar */
.dbs-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(33,38,45,0.8);
  background: rgba(22,27,34,0.7);
  backdrop-filter: blur(8px);
  height: 56px;
  position: sticky; top: 0; z-index: 20;
}
.dbs-back {
  width: 38px; height: 38px; border-radius: 50%;
  background: #21262d; border: 1px solid #30363d;
  color: #cbd5e1; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.dbs-back:active { transform: scale(0.9); }
.dbs-title { text-align: center; flex: 1; }
.dbs-title-main {
  font-size: 14px; font-weight: 900; color: #fff;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.dbs-title-sub {
  font-size: 10px; color: #8b949e; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 2px;
}
.dbs-title-sub span.case { color: #fb923c; }
.dbs-title-sub span.bet { color: #ffd700; font-family: 'SF Mono', ui-monospace, monospace; }
.dbs-balance {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 20px;
  background: #0d1117; border: 1px solid #30363d;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 800; font-size: 12px; color: #ffd700;
}
.dbs-coin {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #fde047);
  color: #000; font-size: 9px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

/* Players */
.dbs-players {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 16px 8px; gap: 10px;
}
.dbs-player {
  flex: 0 0 110px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.dbs-avatar-wrap {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%; padding: 2px;
  margin-bottom: 6px;
}
.dbs-avatar-blue { background: linear-gradient(135deg, #29A9EB, #60a5fa, #1d4ed8); box-shadow: 0 0 20px rgba(41,169,235,0.45); }
.dbs-avatar-red  { background: linear-gradient(135deg, #ef4444, #f87171, #b91c1c); box-shadow: 0 0 20px rgba(239,68,68,0.45); }
.dbs-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: #161b22; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; overflow: hidden;
}
.dbs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dbs-you-badge {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #f59e0b, #fde047);
  color: #000; font-size: 8px; font-weight: 900;
  padding: 2px 8px; border-radius: 10px;
  border: 1px solid rgba(245,158,11,0.5);
  letter-spacing: 0.05em;
}
.dbs-name {
  font-size: 12px; font-weight: 800; color: #fff;
  margin-top: 4px; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dbs-bet {
  font-size: 11px; color: #29A9EB; font-weight: 700;
  margin-top: 2px; font-family: 'SF Mono', ui-monospace, monospace;
}
.dbs-vs {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 26px; font-weight: 900;
  background: linear-gradient(180deg, #ffe066, #f59e0b, #b45309);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 4px 12px rgba(245,158,11,0.6));
  letter-spacing: 2px;
  align-self: center;
  padding-top: 10px;
}

/* Countdown */

/* Status pill */
.dbs-status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 auto;
  padding: 8px 18px;
  background: #1c2128; border: 1px solid #30363d;
  border-radius: 20px;
  font-size: 12px; font-weight: 700; color: #fff;
}
.dbs-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 8px #4ade80;
  animation: dbsDotPulse 1.5s infinite;
}
@keyframes dbsDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.dbs-status-wrap { display: flex; justify-content: center; margin: 8px 0; }

/* Reels */
.dbs-reels {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 14px;
  padding: 10px;
  background: rgba(10,13,18,0.9);
  border: 1px solid #21262d;
  border-radius: 14px;
  overflow: hidden;
}
.dbs-reel-col { display: flex; flex-direction: column; align-items: center; }
.dbs-reel-label {
  font-size: 9px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 6px;
}
.dbs-reel-label-me { color: #29A9EB; }
.dbs-reel-label-op { color: #f87171; }
.dbs-reel-window {
  width: 100%; height: 170px;
  overflow: hidden;
  background: #11161d;
  border: 1px solid rgba(33,38,45,0.6);
  border-radius: 12px;
  position: relative;
}
.dbs-reel-card {
  width: 100%;
  flex-shrink: 0;
}
.dbs-reel-window::before,
.dbs-reel-window::after {
  content: ''; position: absolute; left: 0; right: 0; height: 40px;
  pointer-events: none; z-index: 2;
}
.dbs-reel-window::before { top: 0; background: linear-gradient(180deg, #0a0d12, transparent); }
.dbs-reel-window::after { bottom: 0; background: linear-gradient(0deg, #0a0d12, transparent); }
.dbs-reel-track {
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px;
  transition: transform 0.1s;
}
.dbs-reel-track.spinning {
  /* Анимация через JS — карточки быстро перебираются */
}
.dbs-reel-track {
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px 6px;
  /* will-change removed */
  transform: translateZ(0);
}
.dbs-reel-card {
  width: 100%; height: 62px;
  background: #161b22;
  border: 1px solid rgba(136,136,136,0.4);
  border-radius: 10px;
  padding: 4px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.dbs-reel-card img { width: 36px; height: 36px; object-fit: contain; }
.dbs-reel-card .rname {
  font-size: 9px; color: #cbd5e1; font-weight: 700;
  width: 100%; text-align: center;
  line-height: 1.1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  padding: 0 2px;
}
.dbs-reel-card {
  min-height: 78px !important;
  height: 78px !important;
}
.dbs-reel-card img { width: 32px !important; height: 32px !important; }
.dbs-reel-card .rval { font-size: 9px !important; }
.dbs-reel-card .rval {
  font-size: 8px; color: #ffd700; font-weight: 800;
  font-family: 'SF Mono', ui-monospace, monospace;
}
/* Маркер золотой */
.dbs-reels::after {
  content: ''; position: absolute;
  top: 50%; left: 10px; right: 10px;
  height: 2px;
  background: linear-gradient(90deg, #f59e0b, #ffd700, #f59e0b);
  box-shadow: 0 0 14px rgba(255,215,0,0.8), 0 0 4px #ffd700;
  transform: translateY(-1px);
  z-index: 5; pointer-events: none;
}

/* Footer */
.dbs-footer {
  margin-top: auto;
  padding: 12px 14px;
  text-align: center;
  font-size: 11px; color: #8b949e; font-weight: 600;
}
.dbs-footer b { color: #ffd700; font-family: 'SF Mono', ui-monospace, monospace; }






  40% { transform: scale(1); opacity: 1; filter: blur(0) drop-shadow(0 0 40px rgba(255,215,0,0.6)); }
  100% { transform: scale(1); opacity: 1; }
}


  to { transform: scale(1.15); opacity: 1; }
}


/* ===== COUNTDOWN CLEAN (single source of truth) ===== */
.dbs-countdown-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  margin-top: 8px;
  position: relative;
}
.dbs-countdown-num {
  font-size: 130px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 
    0 0 20px rgba(255,215,0,0.7),
    0 0 40px rgba(255,140,0,0.4);
  font-family: 'SF Mono', ui-monospace, monospace;
  line-height: 1;
  display: block;
  position: relative;
  transition: none;
  text-align: center;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}
.dbs-countdown-num.pop {
  animation: dbsCountPop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes dbsCountPop {
  0% { transform: scale(2.2); }
  60% { transform: scale(0.94); }
  100% { transform: scale(1); }
}


/* ===== FIX: ULTIMATE MODAL (no double bg) ===== */
#duel-modal .duel-modal {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: 440px !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
/* X close button — на верхнем правом углу drs-modal */
#duel-modal .drs-modal {
  position: relative !important;
}
#duel-modal .drs-modal .drs-close-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.5) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #fff !important;
  font-size: 18px !important;
  cursor: pointer !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}
#duel-modal .drs-modal .drs-close-btn:active { transform: scale(0.9) !important; }

/* Скрываем ВНЕШНИЙ (старый) X — он теперь только в drs-modal */
#duel-modal .duel-modal-close {
  display: none !important;
}


/* ===== FIX: MODAL SCROLL ===== */
/* Бэкдроп — скроллится когда контент больше экрана */
#duel-modal {
  overflow-y: auto !important;
  align-items: flex-start !important;
  padding: 20px 14px !important;
  padding-top: max(20px, env(safe-area-inset-top)) !important;
  padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
  -webkit-overflow-scrolling: touch !important;
}
/* Внутренний блок центрируется через margin: auto */
#duel-modal .duel-modal {
  margin: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
}
/* Но в battle-mode — fullscreen, без скролла */
#duel-modal.battle-mode {
  padding: 0 !important;
  align-items: stretch !important;
  overflow-y: hidden !important;
}
#duel-modal.battle-mode .duel-modal {
  margin: 0 !important;
  height: 100vh !important;
  overflow-y: auto !important;
}


/* ===== HERO LAYOUT FIX (не ломается от длины ника) ===== */
.lb-hero-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1c2128;
  border-radius: 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.lb-hero-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #29A9EB, #0088cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(41,169,235,0.4);
}
.lb-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.lb-hero-info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-hero-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}
/* Обрезаем длинный ник с ellipsis */
.lb-hero-name > span:first-child,
.lb-hero-name {
  text-overflow: ellipsis;
}
.lb-hero-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}
.lb-hero-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 9px;
  background: rgba(255,215,0,0.2);
  color: #ffd700;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  border: 1px solid rgba(255,215,0,0.3);
  line-height: 1.4;
}
.lb-hero-sub {
  font-size: 11px;
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-hero-balance {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  padding: 6px 10px;
  border-radius: 12px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 800;
  color: #ffd700;
  font-size: 12px;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* ===== DBS REEL SPIN (бесконечная прокрутка) ===== */
@keyframes dbs-reel-spin {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
