:root {

--bg: #0b0f14;

--bg-elev: #121722;

--card: #141a24;

--border: #1e2633;

--text: #fff;

--muted: #9aa7bd;

--accent: #00b3ff;

--radius: 16px;

--gap: 14px;

--nav-btn-h: 56px;

--nav-icon: 32px;



transition: background 0.3s ease, color 0.3s ease;

}



html, body {

height: 100%;

background: var(--bg);

color: var(--text);

font: 16px/1.42 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

-webkit-font-smoothing: antialiased;

text-rendering: optimizeLegibility;

transition: background-color 0.35s ease, color 0.35s ease;

}

* { box-sizing: border-box; }

img { display: block; }

a { color: var(--accent); text-decoration: none; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 14px; }



/* === HEADER === */

.topbar {

position: sticky; top: 0; z-index: 50; background: transparent; border: none;

padding: calc(env(safe-area-inset-top)+8px) 0 8px;

display: flex; justify-content: center; align-items: center;

}

.brand {

font-family: 'Orbitron', sans-serif;

font-size: 20px; font-weight: 700; letter-spacing: 2px;

color: var(--accent); position: relative;

overflow: hidden; white-space: nowrap;

}

.brand span {

display: inline-block;

color: transparent;

-webkit-text-stroke: 1px var(--accent);

position: relative;

}

.brand span::before {

content: attr(data-text);

position: absolute; left: 0; top: 0; color: var(--accent);

-webkit-text-stroke: 0;

width: 0; white-space: nowrap; overflow: hidden;

border-right: 2px solid var(--accent);

animation: draw 2.5s linear forwards;

}

@keyframes draw { from { width: 0 } to { width: 100% } }



/* === SEARCH === */

.search-area { padding: 12px 0 6px; }

.search-wrap { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

#search {

width: 100%; appearance: none; outline: none;

padding: 12px 14px; border-radius: 14px;

background: var(--card); border: 1px solid var(--border); color: var(--text);

}

#search::placeholder { color: #9fb2cc; }



#theme-toggle {

border: 1px solid var(--border);

background: var(--card);

color: var(--text);

padding: 0 14px;

border-radius: 14px;

cursor: pointer;

transition: background 0.25s, color 0.25s, transform 0.25s;

}

#theme-toggle:hover { transform: scale(1.08); background: var(--accent); color: #001018; }



/* === CATALOG (ИЗМЕНЕНО) === */

.catalog {

  margin-top: 12px;

  display: flex; 

  flex-direction: column; 

  gap: 24px; 

  padding-bottom: calc(var(--nav-btn-h) + env(safe-area-inset-bottom) + 32px);

}



.card {

position: relative; cursor: pointer;

background: var(--card); border-radius: var(--radius);

padding: 12px;

display: grid; gap: 8px;

box-shadow: 0 6px 18px rgba(0,0,0,.35);

transition: transform .25s ease, box-shadow .25s ease;

overflow: hidden;

}

.card:before {

content: "";

position: absolute; inset: 0; border-radius: inherit; padding: 1px;

background: linear-gradient(120deg, var(--accent), transparent 60%, var(--accent));

background-size: 200% 200%;

animation: borderflow 4s linear infinite;

-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);

-webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;

}

@keyframes borderflow {

0% { background-position: 0% 50% }

50% { background-position: 100% 50% }

100% { background-position: 0% 50% }

}

.card:hover {

transform: translateY(-3px);

box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 12px rgba(0,179,255,.3);

}

.row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }

.icon {

width: 56px; height: 56px;

border-radius: 12px; border: 1px solid var(--border);

object-fit: cover;

transition: transform .25s ease;

}

.card:hover .icon { transform: scale(1.06); }

.icon.lg { width: 76px; height: 76px; border-radius: 18px; }

h3 { 

  margin: 0 0 2px; 

  font-size: 15px; 

  font-weight: 700; 

  color: #fff;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}

.meta { 

  font-size: 12px; 

  color: var(--muted); 

  line-height: 1.3; 

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



/* === BOTTOM NAV === */

.tabbar {

position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;

background: color-mix(in oklab, var(--bg) 88%, #000 12%);

border-top: 1px solid var(--border);

backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);

padding: 12px calc(env(safe-area-inset-right)+12px) calc(env(safe-area-inset-bottom)+12px) calc(env(safe-area-inset-left)+12px);

box-sizing: border-box;

transition: background 0.3s ease;

}

.newdock {

display: grid; grid-template-columns: repeat(4,1fr); align-items: center;

background: color-mix(in oklab, var(--bg-elev) 94%, #000 6%);

border: 1px solid var(--border); border-radius: 26px;

padding: 8px 4px; margin: 0 auto; max-width: 420px;

box-shadow: 0 10px 24px rgba(0,0,0,.4);

}

.newdock .nav-btn {

appearance: none; border: 0; background: transparent;

height: var(--nav-btn-h);

display: flex; align-items: center; justify-content: center;

position: relative; border-radius: 18px;

}

.newdock .nav-btn img {

width: 26px; height: 26px; opacity: .9;

filter: drop-shadow(0 0 4px rgba(0,0,0,.3));

transition: transform .18s, opacity .18s;

}

.newdock .nav-btn.active img {

transform: scale(1.15); opacity: 1;

filter: drop-shadow(0 0 10px var(--accent));

}

.newdock .dot { display: none; }



/* === MODALS (МОДИФИЦИРОВАНО) === */

.modal { position: fixed; inset: 0; z-index: 50; display: none; }

.modal.open { display: block; animation: fadeIn .25s ease; }

@keyframes fadeIn { from { background: rgba(0,0,0,0); } to { background: rgba(0,0,0,.55); } }

.modal .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }

.sheet {

position: absolute; inset: auto 0 0 0; margin: 0 auto;

max-width: 760px; 

height: 80vh; /* <-- НОВЫЙ РАЗМЕР 80% */

background: var(--bg);

border-top: 1px solid var(--border);

border-radius: 22px 22px 0 0;

box-shadow: 0 -12px 28px rgba(0,0,0,.65);

display: flex; flex-direction: column;

transform: translateY(100%);

transition: transform .35s cubic-bezier(.25,.8,.25,1);

overflow: hidden;

}

.modal.open .sheet { transform: translateY(0); }

.close {

position: absolute; right: 16px; top: 16px; z-index: 10; border: none;

background: rgba(0,0,0,0.5); color: #fff; font-size: 18px;

padding: 6px 10px; border-radius: 50%;

box-shadow: 0 0 10px rgba(0,0,0,0.4);

transition: background .25s;

}

.close:hover { background: rgba(0,0,0,0.7); }



/* === MODAL HEADER (НОВЫЙ ДИЗАЙН) === */

.sheet-header { 

  padding: 24px 16px 16px; 

  border-bottom: 1px solid var(--border); /* Возвращаем границу для отделения */

}

.app-head { 

  display: flex; /* <-- ИЗМЕНЕНО */

  gap: 14px; 

  align-items: flex-start; /* Иконка вверху */

}

.head-content {

  flex: 1; /* Занимает все оставшееся место */

  display: flex;

  flex-direction: column;

  gap: 12px; /* Расстояние между тайтлом и кнопками */

}

.sheet-header h2 {

  margin: 0;

  font-size: 20px;

  font-weight: 700;

  line-height: 1.3;

}

.btns-row {

  display: flex;

  gap: 10px;

}

.btns-row .btn.small {

  width: auto; /* <-- Снимаем width: 100% */

  flex: 1; /* Кнопки делят место поровну */

  padding: 10px 12px;

  font-size: 14px;

  font-weight: 700;

}

.btns-row .btn.small svg {

  margin-right: 6px;

}

.btns-row .vip-lock-message {

  width: 100%;

  padding: 10px 12px;

  text-align: center;

  font-size: 14px;

  font-weight: 700;

  color: #ffcc00; /* VIP цвет */

  background: rgba(255, 204, 0, 0.1);

  border: 1px solid rgba(255, 204, 0, 0.2);

  border-radius: 10px;

}





/* === MODAL BODY (НОВЫЙ ДИЗАЙН) === */

.sheet-body { 

  padding: 12px 16px 16px; 

  display: flex; /* <-- ИЗМЕНЕНО */

  flex-direction: column; /* Элементы идут друг под другом */

  gap: 14px; /* Расстояние между блоками */

  overflow: auto; 

  flex: 1; /* Занимает все оставшееся место в .sheet */

}

#app-time-ago {

  font-size: 13px;

  color: var(--muted);

  text-align: center;

  opacity: 0.8;

  padding-bottom: 4px;

  border-bottom: 1px solid var(--border);

}

#app-info-line {

  display: flex;

  justify-content: space-around;

  align-items: center;

  background: var(--card);

  padding: 10px;

  border-radius: 12px;

  border: 1px solid var(--border);

}

.info-item {

  display: flex;

  flex-direction: column;

  align-items: center;

  font-size: 14px;

  font-weight: 600;

  color: var(--text);

  text-align: center;

  flex: 1;

}

.info-item span {

  font-size: 11px;

  color: var(--muted);

  font-weight: 400;

  text-transform: uppercase;

  margin-top: 2px;

}

.section p { margin: 0 0 10px 0; color: #cfe1ffbf; font-size: 15px; }

.bullets { margin: 8px 0 0; padding-left: 22px; }

.bullets li { margin: 6px 0; }



/* === MODAL FOOTER (СКРЫТ) === */

.sheet-footer {

  display: none; /* <-- Кнопки переехали */

  padding: 12px 16px calc(env(safe-area-inset-bottom)+16px);

  border-top: 1px solid var(--border);

  background: var(--bg);

}



/* === BUTTONS === */

.btns { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {

display: inline-flex; align-items: center; justify-content: center; gap: 8px;

padding: 12px 14px; border-radius: 14px;

background: var(--accent);

color: #001018; font-weight: 800; border: 0; width: 100%;

box-shadow: 0 0 12px rgba(0,179,255,.45);

transition: transform .25s ease, box-shadow .25s ease;

}

.btn:hover {

transform: translateY(-2px) scale(1.03);

box-shadow: 0 0 18px rgba(0,179,255,.65);

}

.btn.outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

.btn.full { width: 100%; margin-top: 10px; }

.btn.small { font-size: 14px; padding: 10px 12px; border-radius: 10px; }



/* === DIALOGS === */

.dialog { position: fixed; inset: 0; z-index: 60; display: none; }

.dialog.open { display: block; }

.dialog .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }

.dialog-card {

position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto;

max-width: 720px; background: var(--bg);

border: 1px solid var(--border);

border-radius: 16px 16px 0 0;

box-shadow: 0 -12px 30px rgb(0 0 0 / .5);

animation: slideUp .3s ease;

}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.dialog-head {

display: flex; align-items: center; justify-content: space-between;

padding: 12px 14px; border-bottom: 1px solid var(--border);

}

.dialog-body {

padding: 12px 14px 18px;

color: #cfe1ffbf;

font-size: 15px; line-height: 1.45;

}

.dialog-body form input[type=file],

.dialog-body form input[type=password] {

width: 100%; background: var(--card);

border: 1px solid var(--border);

border-radius: 12px;

padding: 8px 10px;

color: var(--text);

margin-top: 4px;

}



/* === PROFILE === */

.profile-card.big {

max-width: 440px;

min-height: 70vh;

padding-bottom: 20px;

border-radius: 24px 24px 0 0;

background: var(--bg-elev);

box-shadow: 0 -12px 30px rgba(0,0,0,.5);

animation: profileFade .4s ease;

}

@keyframes profileFade {

from { transform: translateY(40px); opacity: 0; }

to { transform: translateY(0); opacity: 1; }

}



.profile-center {

display: flex; flex-direction: column; align-items: center;

text-align: center; margin-top: 12px;

}

.profile-avatar-xl {

width: 100px; height: 100px;

border-radius: 50%; border: 3px solid var(--accent);

object-fit: cover; margin-bottom: 10px;

box-shadow: 0 0 20px rgba(0,179,255,.35);

transition: transform .3s ease, box-shadow .3s ease;

}

.profile-avatar-xl:hover {

transform: scale(1.04);

box-shadow: 0 0 30px rgba(0,179,255,.6);

}

.profile-center h3 { margin: 4px 0 2px; font-size: 18px; font-weight: 700; color: var(--text); }

.profile-center p { margin: 0 0 6px; font-size: 14px; color: var(--muted); }

.profile-section { margin-top: 8px; padding: 4px 6px; }

.status-badge {

display: inline-block;

padding: 3px 10px;

border-radius: 10px;

font-size: 13px;

background: var(--accent);

color: #001018;

font-weight: 600;

}



/* === ADAPTIVE (ИЗМЕНЕНО) === */

@media (min-width: 520px) {

  .catalog { grid-template-columns: 1fr; } 

}



/* === PROFILE (URSA Neon Glass v2) === */

.profile-card.big {

  max-width: 420px;

  min-height: 64vh;

  padding: 24px 18px 30px;

  border-radius: 26px 26px 0 0;

  background: rgba(18, 23, 34, 0.82);

  border: 1px solid rgba(0, 179, 255, 0.15);

  backdrop-filter: blur(16px) saturate(160%);

  -webkit-backdrop-filter: blur(16px) saturate(160%);

  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.55);

  animation: profileFade 0.4s ease;

}



.profile-center {

  display: flex;

  flex-direction: column;

  align-items: center;

  text-align: center;

  margin-top: 8px;

}



.profile-avatar-xl {

  width: 96px;

  height: 96px;

  border-radius: 50%;

  border: 3px solid rgba(0, 179, 255, 0.6);

  object-fit: cover;

  margin-bottom: 12px;

  box-shadow: 0 0 25px rgba(0, 179, 255, 0.3);

  transition: transform 0.35s ease, box-shadow 0.35s ease;

}

.profile-avatar-xl:hover {

  transform: scale(1.05);

  box-shadow: 0 0 40px rgba(0, 179, 255, 0.55);

}



.profile-center h3 {

  margin: 6px 0 2px;

  font-size: 18px;

  font-weight: 700;

  color: #fff;

}

.profile-center p {

  margin: 0;

  font-size: 14px;

  color: var(--muted);

}

.status-badge {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 4px;

  padding: 4px 10px;

  margin-top: 6px;

  border-radius: 10px;

  font-size: 13px;

  font-weight: 700;

  background: linear-gradient(90deg, var(--accent) 0%, #00c8ff 100%);

  color: #001018;

  box-shadow: 0 0 14px rgba(0, 179, 255, 0.45);

}

.status-badge::before {

  content: "⭐";

  font-size: 12px;

  margin-right: 3px;

}



.btn.small {

  font-size: 14px;

  padding: 10px 14px;

  border-radius: 10px;

  width: 100%;

  margin-top: 10px;

}

.btn.outline.small {

  background: rgba(0, 179, 255, 0.08);

  border: 1px solid rgba(0, 179, 255, 0.5);

  color: var(--accent);

  transition: all 0.3s ease;

}

.btn.outline.small:hover {

  background: var(--accent);

  color: #001018;

}



.profile-section {

  background: rgba(20, 26, 36, 0.7);

  border: 1px solid rgba(0, 179, 255, 0.12);

  border-radius: 14px;

  padding: 12px 14px;

  margin-top: 16px;

  box-shadow: inset 0 0 10px rgba(0, 179, 255, 0.08);

}

.profile-section h4 {

  margin: 0 0 8px;

  color: var(--accent);

  font-size: 15px;

  font-weight: 600;

}

.profile-section p {

  margin: 4px 0;

  font-size: 14px;

  color: var(--muted);

}

.profile-section button {

  margin-top: 10px;

  border-radius: 10px;

}



.profile-footer {

  text-align: center;

  font-size: 13px;

  opacity: 0.65;

  margin-top: 14px;

}



.dialog-head strong {

  font-size: 16px;

  font-weight: 700;

  color: var(--accent);

  text-shadow: 0 0 8px rgba(0, 179, 255, 0.35);

}

.dialog-head .close {

  background: rgba(0, 0, 0, 0.35);

  color: var(--text);

  font-size: 18px;

  border: none;

  border-radius: 50%;

  padding: 6px 9px;

  transition: background 0.25s ease;

}

.dialog-head .close:hover {

  background: rgba(0, 179, 255, 0.25);

}

/* === VIP-LOCKED CARD (НОВЫЙ ДИЗАЙН v3 - БЕЗ БЛЮРА) === */

.vip-locked {

  position: relative;

  pointer-events: auto;

}



/* Золотая неоновая рамка для VIP */

.vip-locked:before {

  background: linear-gradient(120deg, #ffcc00, transparent 60%, #ffdd4d);

  background-size: 200% 200%;

  animation: borderflow 4s linear infinite;

}



/* Затемняем контент (иконку, текст) */

.vip-locked > .row {

  /* filter: blur(1px); (УБРАЛИ БЛЮР) */

  opacity: 0.5; /* Сделал чуть темнее, чтобы замок выделялся */

  transition: opacity 0.25s ease;

}



/* При наведении чуть светлее */

.vip-locked:hover > .row {

  /* filter: blur(0.5px); (УБРАЛИ БЛЮР) */

  opacity: 0.7;

}



/* Стилизуем сам замок (который в углу) */

.vip-locked .vip-lock {

  position: absolute;

  /* Центрируем замок */

  top: 50%;

  left: 50%;

  transform: translate(-50%, -50%);

  /* Делаем крупнее */

  font-size: 32px;

  color: #ffcc00; /* Золотой */

  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 204, 0, 0.5);

  z-index: 10; /* Поверх всего */

  transition: transform 0.25s ease;

}



.vip-locked:hover .vip-lock {

   transform: translate(-50%, -50%) scale(1.1); /* Эффект при наведении */

}

/* === НОВЫЕ СТИЛИ ДЛЯ КОЛЛЕКЦИЙ === */

.collection-row {

  display: flex;

  flex-direction: column;

  gap: 8px;

}

.collection-row h2 {

  font-size: 22px;

  font-weight: 700;

  color: var(--text);

  margin: 0;

  padding: 0 4px; 

}

.card-carousel {

  display: grid;

  grid-auto-flow: column; 

  grid-template-rows: repeat(3, auto); 

  grid-auto-columns: 300px; /* <-- Я поставил 300px, как обсуждали */

  gap: var(--gap);

  overflow-x: auto;

  /* scroll-snap-type: x mandatory; (Убрали) */

  -webkit-overflow-scrolling: touch; 

  padding: 4px 0; 

}

.card-carousel::-webkit-scrollbar { display: none; }

.card-carousel { scrollbar-width: none; }

.card-carousel .card {

  width: 100%; 

  margin: 0;

  /* scroll-snap-align: start; (Убрали) */

}

.card .badge {

  position: absolute;

  top: -1px; 

  right: -1px; 

  background: var(--accent);

  color: #001018;

  font-size: 11px;

  font-weight: 700;

  padding: 4px 10px;

  border-radius: 0 var(--radius) 0 10px; 

  text-transform: uppercase;

  z-index: 2;

  box-shadow: 0 4px 10px rgba(0,0,0,0.3);

}

.card .badge.new {

   background: #4caf50; 

   color: #fff;

}

.card .badge.update {

   background: #ff9800; 

   color: #fff;

}

@media (min-width: 520px) {

  .card-carousel {

     grid-auto-columns: 400px; 

  }

}
