:root{
  --bg:#0a0a0c;
  --fg:#f2f2f3;
  --muted:#a6a7ad;
  --card:#16161a;
  --chip:#202027;
  --glass:#1a1a1f;
  --border:#2a2a35;
  /* фирменный фиолетово‑синий градиент */
  --accent1:#2b6cff; /* сине‑индиго */
  --accent2:#7a3cff; /* фиолетовый */
  --accent-gradient: linear-gradient(135deg, var(--accent2) 0%, var(--accent1) 100%);
  --accent-glow: 0 0 20px rgba(43, 108, 255, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial; color:var(--fg); background:var(--bg);
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(43, 108, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(122, 60, 255, 0.1) 0%, transparent 50%);
}

#app{display:flex; flex-direction:column; height:100vh; position:relative; overflow:hidden}

.app-header{
  position:sticky; top:0; z-index:5; 
  background: var(--accent-gradient);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--accent-glow);
}

.header-content{
  display:flex; align-items:center; justify-content:space-between; padding:12px 16px;
}

.logo-container{
  display:flex; align-items:center; gap:12px;
}

.logo{
  width:32px; height:32px; filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.title{
  font-weight:700; font-size:18px; color:#fff; text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

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

.icon-btn{
  background:rgba(255,255,255,.15); 
  border:none; color:#fff; border-radius:12px; 
  padding:8px 12px; margin-left:8px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.icon-btn:hover{
  background:rgba(255,255,255,.25); 
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.icon-btn:active{
  transform: translateY(0) scale(0.95);
}

.screen-container{flex:1; overflow:auto; position:relative}
.screen{
  display:none; padding:16px; 
  animation: fadeIn 0.4s var(--bounce);
}
.screen.active{display:block}
.screen-title{margin:8px 0 12px; font-size:20px; font-weight:700}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.greeting{
  font-size:18px; margin:8px 0 12px; 
  background: linear-gradient(135deg, var(--fg), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wallet-card{
  background: var(--card); 
  border-radius:20px; padding:20px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.wallet-card::before{
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--accent-gradient);
  opacity: 0.05;
  z-index: -1;
}

.wallet-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3), var(--accent-glow);
}

.wallet-address{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 
  color:var(--muted); overflow:hidden; text-overflow:ellipsis; 
  white-space:nowrap; margin-bottom:12px;
  font-size: 14px;
}

.wallet-balance{
  display:flex; align-items:end; justify-content:space-between; margin-bottom:16px;
}

.wallet-balance .label{
  color:var(--muted); font-size: 14px; font-weight: 500;
}

.wallet-balance .amount{
  font-size:36px; font-weight:800; padding:12px 16px; 
  border-radius:16px; color:#111; 
  background: var(--accent-gradient);
  box-shadow: 0 4px 15px rgba(43, 108, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wallet-actions{
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px;
}

.action-btn{
  background: var(--glass); color:#fff; 
  border: 1px solid var(--border); padding:12px 16px; 
  border-radius:14px; font-weight: 600;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.action-btn:hover{
  background: var(--card);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.action-btn.primary{
  background: var(--accent-gradient); color:#111; 
  font-weight:700; box-shadow: var(--accent-glow);
}

.action-btn.primary:hover{
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(43, 108, 255, 0.4);
}

.action-btn:active{
  transform: translateY(0) scale(0.98);
}

.section{margin-top:24px}
.section-title{
  font-weight:700; margin-bottom:12px; font-size: 18px;
  background: linear-gradient(135deg, var(--fg), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rate-card{
  background: var(--card); padding:16px; border-radius:16px; 
  display:flex; align-items:center; justify-content:space-between;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.rate-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.rate{
  font-size:20px; font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mini-btn{
  background: var(--glass); color:#fff; 
  border: 1px solid var(--border); padding:8px 12px; 
  border-radius:10px; font-size: 12px; font-weight: 500;
  transition: var(--transition);
}

.mini-btn:hover{
  background: var(--card);
  transform: translateY(-1px);
}

.filters{display:flex; gap:10px; margin-bottom:16px; flex-wrap: wrap;}
.chip{
  background: var(--chip); border:none; color:#fff; 
  border-radius:14px; padding:10px 14px; font-size: 14px;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.chip:hover{
  background: var(--card);
  transform: translateY(-1px);
}

.empty{
  color:var(--muted); text-align:center; margin:60px 0;
  font-size: 16px; font-weight: 500;
}

.settings-group{
  background: var(--card); border-radius:16px; padding:12px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.setting-row{
  display:flex; align-items:center; justify-content:space-between; 
  padding:12px 8px; transition: var(--transition);
}

.setting-row:hover{
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}

.setting-title{font-weight:600; font-size: 16px;}
.setting-sub{color:var(--muted); font-size:13px; margin-top: 2px;}

/* Settings list like reference */
.profile-card{
  background: var(--card); border-radius:16px; padding:16px; 
  display:flex; align-items:center; gap:14px; margin-bottom:16px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.profile-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.avatar{
  width:48px; height:48px; border-radius:50%; 
  background: var(--accent-gradient); 
  display:flex; align-items:center; justify-content:center; 
  font-size:24px; color: white;
  box-shadow: var(--accent-glow);
}

.profile-username{
  font-weight:700; font-size: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.list{
  background: var(--card); border-radius:16px; overflow:hidden;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.list + .list{margin-top:12px}

.list-item{
  width:100%; background:transparent; border:none; color:var(--fg); 
  display:flex; align-items:center; gap:14px; padding:16px 14px; 
  border-bottom:1px solid var(--border); transition: var(--transition);
}

.list-item:last-child{border-bottom:none}

.list-item:hover{
  background: rgba(255,255,255,0.02);
}

.list-item .icon{
  width:28px; text-align:center; font-size: 18px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.list-item .text{flex:1; text-align:left}

.list-item .title{font-weight:600; font-size: 16px;}

.list-item .sub{
  color:var(--muted); font-size:13px; margin-top: 2px;
}

.list-item .chevron{
  opacity:.6; font-size: 18px; font-weight: 300;
}

.section-label{
  color:var(--muted); font-size:13px; margin:16px 6px 8px; 
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}

.toolbar{
  display:flex; align-items:center; gap:12px; margin-bottom:16px;
}

.back-btn{
  background: var(--glass); color:#fff; border: 1px solid var(--border); 
  border-radius:12px; padding:8px 12px; font-size: 16px;
  transition: var(--transition);
}

.back-btn:hover{
  background: var(--card);
  transform: translateY(-1px);
}

.toolbar-title{font-weight:700; font-size: 20px;}

.switch{
  position:relative; display:inline-block; width:52px; height:30px;
}

.switch input{opacity:0; width:0; height:0}

.slider{
  position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; 
  background: var(--glass); transition: var(--transition); 
  border-radius:30px; border: 1px solid var(--border);
}

.slider:before{
  position:absolute; content:""; height:24px; width:24px; 
  left:3px; bottom:2px; background:white; 
  transition: var(--transition); border-radius:50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch input:checked + .slider{
  background: var(--accent-gradient);
  box-shadow: var(--accent-glow);
}

.switch input:checked + .slider:before{
  transform:translateX(22px);
}

.tabbar{
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px; 
  padding:12px; background: var(--glass); position:sticky; bottom:0;
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}

.tab{
  background: var(--card); color:var(--muted); border:none; 
  padding:12px 8px; border-radius:16px; 
  display:flex; flex-direction:column; align-items:center; gap:6px;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.tab:hover{
  background: var(--glass);
  transform: translateY(-1px);
}

.tab.active{
  background: var(--accent-gradient); color:#111; font-weight:700;
  box-shadow: var(--accent-glow);
  transform: translateY(-2px);
}

.tab span{font-size:12px; font-weight: 500;}

/* QR Scanner */
.qr-wrap{
  position:relative; background:#000; border-radius:20px; 
  overflow:hidden; aspect-ratio:1/1;
  border: 2px solid var(--border);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  max-width: 400px;
  margin: 0 auto;
}

#qrVideo, #qrCanvas{
  position:absolute; inset:0; width:100%; height:100%; 
  object-fit:cover; border-radius: 18px;
}

#qrCanvas{mix-blend-mode:screen;}

.scanner-line{
  position:absolute; left:0; right:0; top:10%; height:3px; 
  background: var(--accent-gradient); 
  animation:scan 2s linear infinite;
  box-shadow: 0 0 10px rgba(43, 108, 255, 0.5);
}

@keyframes scan{
  0%{top:10%; opacity: 1;}
  50%{top:90%; opacity: 1;}
  100%{top:10%; opacity: 0.3;}
}

.qr-actions{
  display:flex; gap:12px; margin-top:16px; justify-content: center;
}

.qr-result{
  color:var(--muted); margin-top:12px; 
  padding: 12px; background: var(--card); 
  border-radius: 12px; border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; word-break: break-all;
  text-align: center;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .screen { padding: 12px; }
  .wallet-card { padding: 16px; }
  .wallet-balance .amount { font-size: 28px; }
  .action-btn { padding: 10px 12px; font-size: 14px; }
  .tab { padding: 8px 6px; }
  .tab span { font-size: 11px; }
  .qr-wrap { max-width: 100%; }
  .qr-actions { flex-direction: column; }
  .qr-actions .action-btn { width: 100%; }
}

/* Touch improvements */
.action-btn, .tab, .list-item, .chip {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.action-btn:active, .tab:active {
  transform: scale(0.98);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--accent1);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (min-width:768px){
  .screen{max-width:560px; margin:0 auto}
}


