/* ========================================================
   ATEEZ CARD UNIVERSE - OFFICIAL ATINY THEME STYLES
   ======================================================== */

:root {
  --bg-deep: #090a10;
  --bg-surface: #121420;
  --bg-card: #181b2c;
  --bg-card-hover: #22263d;
  --border-color: #2b304c;
  
  /* ATEEZ Signature Colors */
  --gold-primary: #d4af37;
  --gold-glow: #ffd700;
  --ateez-red: #ff3344;
  --ateez-orange: #ff7700;
  --cyber-blue: #00d2ff;
  --lightiny-glow: rgba(0, 210, 255, 0.4);
  
  /* Rarity Colors */
  --rarity-ssr: #ffd700;
  --rarity-ssr-glow: rgba(255, 215, 0, 0.6);
  --rarity-sr: #c084fc;
  --rarity-sr-glow: rgba(192, 132, 252, 0.5);
  --rarity-r: #38bdf8;
  --rarity-r-glow: rgba(56, 189, 248, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-display: 'Orbitron', monospace, sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* Фоновые звездные эффекты и свечение */
.bg-stars {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 80px 140px, #ffd700, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 150px 220px, #00d2ff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 260px 90px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 350px 310px, #ff4466, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 400px 400px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 51, 68, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ========================================================
   HEADER & RESOURCES BAR
   ======================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(18, 20, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold-primary), var(--ateez-orange));
  color: #000;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.brand-title .accent-text {
  color: var(--gold-primary);
  text-shadow: 0 0 10px var(--gold-glow);
}

.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.resources {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.resource-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(24, 27, 44, 0.8);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.res-icon {
  font-size: 14px;
}

.res-val {
  font-family: var(--font-display);
  color: #ffffff;
}

.res-plus-btn {
  background: var(--gold-primary);
  color: #000;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: transform var(--transition-fast);
}

.res-plus-btn:hover {
  transform: scale(1.15);
  background: #fff;
}

.sound-toggle {
  background: rgba(24, 27, 44, 0.8);
  border: 1px solid var(--border-color);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sound-toggle:hover {
  background: var(--bg-card-hover);
}

/* ========================================================
   NAVIGATION
   ======================================================== */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(14, 16, 26, 0.9);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 65px;
  z-index: 90;
  overflow-x: auto;
}

.nav-btn {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(255, 51, 68, 0.15));
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-btn.active .nav-icon {
  transform: scale(1.15);
}

.badge-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-display);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--ateez-red);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 6px;
  box-shadow: 0 0 8px var(--ateez-red);
}

/* ========================================================
   MAIN CONTENT & TABS
   ======================================================== */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
  position: relative;
  z-index: 10;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
  display: block;
}

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

/* ========================================================
   SECTION 1: GACHA
   ======================================================== */
.gacha-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.gacha-banner-card {
  position: relative;
  background: linear-gradient(160deg, #181c33 0%, #101222 100%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 36px 32px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.gacha-banner-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.15), transparent 60%);
  pointer-events: none;
}

.banner-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--ateez-red), var(--ateez-orange));
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 0 12px rgba(255, 51, 68, 0.4);
}

.banner-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff, var(--gold-primary), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.banner-desc {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.pity-counter-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 14px;
  padding: 12px 20px;
  max-width: 480px;
  margin: 0 auto 24px;
}

.pity-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}

.pity-highlight {
  color: var(--gold-glow);
  font-family: var(--font-display);
}

.pity-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.pity-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-glow));
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px var(--gold-glow);
}

.banner-members-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.mem-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.mem-tag:hover {
  border-color: var(--gold-primary);
  color: #fff;
  transform: translateY(-2px);
}

.gacha-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.gacha-btn {
  border: none;
  cursor: pointer;
  border-radius: 16px;
  padding: 16px 36px;
  min-width: 200px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gacha-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.gacha-btn:active {
  transform: translateY(1px) scale(0.98);
}

.pull-1 {
  background: linear-gradient(135deg, #2b3252, #1d2238);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.pull-1:hover {
  border-color: var(--cyber-blue);
  box-shadow: 0 10px 28px rgba(0, 210, 255, 0.3);
}

.pull-10 {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #000;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.pull-10:hover {
  background: linear-gradient(135deg, #ffd700, #d4af37);
  box-shadow: 0 14px 36px rgba(255, 215, 0, 0.6);
}

.btn-top {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sale-tag {
  background: var(--ateez-red);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 900;
}

.btn-cost {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.old-cost {
  text-decoration: line-through;
  opacity: 0.6;
  font-size: 12px;
}

/* Шансы выпадения */
.rates-accordion {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
}

.rates-toggle-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rates-toggle-btn:hover {
  color: #fff;
}

.rates-content {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
}

.rate-val {
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 50px;
}

.rate-desc {
  color: var(--text-muted);
  font-size: 12px;
}

.duplicate-note {
  font-size: 12px;
  color: var(--gold-primary);
  margin-top: 6px;
  line-height: 1.4;
}

/* ========================================================
   SECTION 2: BINDER & COLLECTION
   ======================================================== */
.collection-header {
  margin-bottom: 24px;
}

.collection-title-box h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.collection-subtitle {
  color: var(--text-muted);
  font-size: 13px;
}

.binder-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: 16px;
  margin-top: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.select-styled {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.select-styled:focus {
  border-color: var(--gold-primary);
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.switch-label input {
  display: none;
}

.switch-custom {
  width: 36px;
  height: 20px;
  background: #2b304c;
  border-radius: 20px;
  position: relative;
  transition: background var(--transition-fast);
}

.switch-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.switch-label input:checked + .switch-custom {
  background: var(--gold-primary);
}

.switch-label input:checked + .switch-custom::after {
  transform: translateX(16px);
}

/* Сетка биндера */
.binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ========================================================
   КАРТОЧКИ ATEEZ (K-POP PHOTOCARDS)
   ======================================================== */
.kpop-card {
  position: relative;
  aspect-ratio: 5 / 7.5;
  background: var(--bg-card);
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.kpop-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.4);
}

.kpop-card.locked {
  filter: grayscale(0.85) brightness(0.6);
  opacity: 0.65;
}

.kpop-card.locked:hover {
  filter: grayscale(0.7) brightness(0.75);
}

/* Голографический эффект для открытых карт */
.kpop-card:not(.locked)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    transparent 40%,
    rgba(255, 215, 0, 0.15) 60%,
    transparent 100%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* SSR Эксклюзивная фольга / Голография */
.kpop-card.rarity-ssr {
  border-color: var(--rarity-ssr);
  box-shadow: 0 0 15px var(--rarity-ssr-glow);
}

.kpop-card.rarity-ssr::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(45deg, #ff0055, #ffd700, #00d2ff, #9d4edd);
  z-index: -1;
  opacity: 0.6;
  filter: blur(4px);
  animation: borderShine 4s linear infinite;
}

@keyframes borderShine {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.kpop-card.rarity-sr {
  border-color: var(--rarity-sr);
  box-shadow: 0 0 12px var(--rarity-sr-glow);
}

.kpop-card.rarity-r {
  border-color: var(--rarity-r);
}

/* Внутреннее содержимое карточки */
.card-image-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #0f111a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.kpop-card:hover .card-img-art {
  transform: scale(1.06);
}

/* Стилизованный художественный портрет-заменитель если нет фото */
.member-avatar-art {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #283056 0%, #111424 100%);
  position: relative;
}

.art-symbol {
  font-size: 54px;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.4));
  margin-bottom: 6px;
}

.art-hangul {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.9);
}

.art-role {
  font-size: 11px;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* Бейджи редкости */
.rarity-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.rarity-badge.ssr {
  background: linear-gradient(135deg, #ffd700, #ff8800);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rarity-badge.sr {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
  color: #fff;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

.rarity-badge.r {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
}

.card-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.card-lvl-pill {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-display);
}

.card-favorite-star {
  color: #ffd700;
  font-size: 14px;
  filter: drop-shadow(0 0 4px #ffd700);
}

.card-footer-info {
  background: rgba(18, 20, 32, 0.95);
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  z-index: 2;
}

.card-title-text {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.card-member-text {
  font-size: 11px;
  color: var(--text-muted);
}

.card-copies-count {
  position: absolute;
  bottom: 50px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 8px;
  z-index: 2;
}

/* ========================================================
   SECTION 3: CARD UPGRADE STUDIO
   ======================================================== */
.upgrade-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
}

@media (max-width: 900px) {
  .upgrade-container {
    grid-template-columns: 1fr;
  }
}

.upgrade-card-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.selected-card-holder {
  width: 270px;
  aspect-ratio: 5 / 7.5;
  perspective: 1000px;
  position: relative;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.selected-card-holder:active {
  cursor: grabbing;
}

.selected-card-holder .kpop-card {
  touch-action: none;
}

.empty-select-tip {
  width: 100%;
  height: 100%;
  border: 2px dashed var(--border-color);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.card-3d-hint {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.upgrade-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.up-card-meta {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.up-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.up-title-row h3 {
  font-size: 20px;
  font-weight: 800;
}

.up-member-name {
  color: var(--gold-primary);
  font-size: 14px;
  font-weight: 600;
}

.up-level-section {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.up-level-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.up-level-val strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-glow);
}

.up-exp-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
}

.up-exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2ff, #38bdf8);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.up-exp-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  font-family: var(--font-display);
}

.up-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-pill {
  background: rgba(24, 27, 44, 0.7);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.up-actions-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 18px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.up-cost-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.cost-tags {
  display: flex;
  gap: 10px;
}

.tag-res {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
}

.up-buttons-row {
  display: flex;
  gap: 12px;
}

.action-btn {
  border: none;
  border-radius: 12px;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.up-lvl-btn {
  flex: 2;
  background: linear-gradient(135deg, #00d2ff, #0088cc);
  color: #000;
  padding: 14px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.3);
}

.up-lvl-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.up-lvl-max-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px;
  font-size: 13px;
}

.up-lvl-max-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.limit-break-box {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.lb-btn {
  background: linear-gradient(135deg, #ffd700, #ff8800);
  color: #000;
  padding: 12px;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.3);
}

.lb-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.5);
}

.lb-btn:disabled, .up-lvl-btn:disabled, .up-lvl-max-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Миниатюры выбора карт */
.my-cards-selector h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 6px;
}

.selector-card-thumb {
  aspect-ratio: 5 / 7.5;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all var(--transition-fast);
}

.selector-card-thumb:hover {
  transform: scale(1.08);
  border-color: #fff;
}

.selector-card-thumb.active {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* ========================================================
   SECTION 4: CONCERT CLICKER
   ======================================================== */
.concert-container {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.concert-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.concert-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.lightiny-stage {
  background: radial-gradient(circle at 50% 60%, #1e233d 0%, #0d0f1a 100%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.concert-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  padding: 12px;
}

.c-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.c-stat-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.c-stat-val.highlight {
  color: var(--cyber-blue);
}

.lightiny-interactive-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 30px 0;
}

.lightiny-wand {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.1s ease;
}

.lightiny-wand:active {
  transform: scale(0.92);
}

.wand-globe {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.9), rgba(0, 210, 255, 0.5) 40%, rgba(18, 20, 32, 0.9) 100%);
  border: 3px solid rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 40px rgba(0, 210, 255, 0.6), inset 0 0 20px rgba(255, 215, 0, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseGlow 2s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 30px rgba(0, 210, 255, 0.4), inset 0 0 15px rgba(255, 215, 0, 0.3); }
  100% { box-shadow: 0 0 60px rgba(0, 210, 255, 0.8), inset 0 0 35px rgba(255, 215, 0, 0.7); }
}

.wand-compass {
  font-size: 48px;
  filter: drop-shadow(0 0 8px #ffd700);
}

.wand-handle {
  width: 24px;
  height: 120px;
  background: linear-gradient(180deg, #d4af37 0%, #1a1e33 60%, #000 100%);
  border-radius: 0 0 12px 12px;
  border: 2px solid #554411;
  margin-top: -6px;
}

.click-pulse-hint {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-glow);
  margin-top: 16px;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cheer-slogans {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  margin-top: 14px;
  text-shadow: 0 0 10px rgba(255, 51, 68, 0.6);
}

/* ========================================================
   SECTION 5: QUESTS & CHECK-IN
   ======================================================== */
.quests-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.daily-checkin-card {
  background: linear-gradient(135deg, #221c3b 0%, #151829 100%);
  border: 1px solid var(--gold-primary);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.checkin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.checkin-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
}

.streak-badge {
  background: var(--gold-primary);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.checkin-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.checkin-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold-primary), #ff9900);
  color: #000;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 170, 0, 0.3);
  transition: transform var(--transition-fast);
}

.checkin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 170, 0, 0.5);
}

.checkin-btn:disabled {
  background: #2b304c;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.quests-list-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
}

.quests-list-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.quest-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: 14px;
  gap: 16px;
}

.q-left {
  flex: 1;
}

.q-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.q-progress {
  font-size: 12px;
  color: var(--text-muted);
}

.q-reward {
  font-size: 13px;
  font-weight: bold;
  color: var(--cyber-blue);
  min-width: 90px;
  text-align: right;
}

.q-claim-btn {
  background: var(--gold-primary);
  color: #000;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.q-claim-btn:hover {
  transform: scale(1.05);
}

.q-claim-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  cursor: not-allowed;
}

/* ========================================================
   MODALS (GACHA SUMMON RESULTS & CARD INSPECT)
   ======================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop.active {
  display: flex;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.gacha-summon-scene {
  max-width: 960px;
  width: 100%;
  text-align: center;
  margin: auto;
}

.summon-header h2 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #fff, var(--gold-primary), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.summon-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.summon-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  justify-content: center;
}

.summon-card-anim {
  animation: cardDropIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes cardDropIn {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.6) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.summon-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.pull-again-btn {
  background: linear-gradient(135deg, var(--gold-primary), #b8860b);
  color: #000;
  padding: 14px 28px;
  font-size: 14px;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px 28px;
  font-size: 14px;
}

/* МОДАЛКА ДЕТАЛЬНОГО ПРОСМОТРА */
.card-inspect-scene {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  max-width: 800px;
  width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.modal-close-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-icon:hover {
  background: var(--ateez-red);
  transform: rotate(90deg);
}

.inspect-main-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 700px) {
  .inspect-main-layout {
    grid-template-columns: 1fr;
  }
}

/* 3D FLIP CARD EFFECT */
.flip-card-wrapper {
  perspective: 1200px;
  width: 100%;
  aspect-ratio: 5 / 7.5;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.flip-card-wrapper:active {
  cursor: grabbing;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
}

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

.flip-card-front {
  border: 2px solid var(--gold-primary);
}

.flip-card-back {
  background: radial-gradient(circle at 50% 50%, #20243b 0%, #0d0f17 100%);
  border: 2px solid var(--gold-primary);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px;
  color: #fff;
}

.back-header {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold-primary);
}

.back-quote {
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
  color: #e2e8f0;
  padding: 0 10px;
}

.back-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sign-art {
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 28px;
  color: var(--gold-glow);
  transform: rotate(-6deg);
}

.sign-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
}

.flip-toggle-btn {
  margin-top: 14px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.flip-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold-primary);
}

/* Инфо колонка в инспекте */
.inspect-info-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 6px 0 2px;
}

.detail-member {
  color: var(--gold-primary);
  font-size: 14px;
  font-weight: 600;
}

.detail-story {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--gold-primary);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.detail-stats-box {
  background: rgba(24, 27, 44, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 18px;
}

.detail-stats-box h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detail-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-stat-row:last-child {
  border-bottom: none;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.go-upgrade-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--gold-primary), #e69500);
  color: #000;
  padding: 12px;
  font-size: 13px;
}

.favorite-btn {
  flex: 1;
  background: rgba(255, 51, 68, 0.15);
  border: 1px solid rgba(255, 51, 68, 0.4);
  color: #ff6677;
  padding: 12px;
  font-size: 13px;
}

.favorite-btn.active {
  background: var(--ateez-red);
  color: #fff;
}

/* ========================================================
   TOASTS (ВСПЛЫВАЮЩИЕ УВЕДОМЛЕНИЯ)
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
  pointer-events: none;
}

.toast {
  background: rgba(18, 20, 32, 0.95);
  border: 1px solid var(--gold-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  cursor: pointer;
  animation: toastSlideIn 0.3s ease forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

@keyframes toastPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ========================================================
   COMPREHENSIVE MOBILE & TABLET RESPONSIVE SYSTEM
   ======================================================== */

/* Планшеты и маленькие экраны (<= 992px) */
@media (max-width: 992px) {
  .upgrade-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px;
  }

  .selected-card-holder {
    width: 240px;
  }
}

/* Мобильные устройства и смартфоны (<= 768px) */
@media (max-width: 768px) {
  /* Безопасные отступы под iPhone и вырезы */
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom));
  }

  /* Шапка для смартфонов */
  .header {
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    font-size: 18px;
    border-radius: 8px;
  }

  .brand-title {
    font-size: 15px;
    letter-spacing: 1px;
  }

  .brand-sub {
    display: none;
  }

  .resources {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .resource-badge {
    padding: 5px 8px;
    font-size: 12px;
    gap: 4px;
    border-radius: 12px;
    flex: 1;
    justify-content: center;
  }

  .sound-toggle {
    width: 30px;
    height: 30px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* НАСТОЯЩИЙ МОБИЛЬНЫЙ BOTTOM NAVIGATION BAR (ВНИЗУ ЭКРАНА) */
  .main-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: rgba(14, 16, 26, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    gap: 2px;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
    overflow: visible;
  }

  .nav-btn {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 10px;
    font-weight: 600;
    min-width: 0;
    border-radius: 10px;
    white-space: normal;
    text-align: center;
    border: none;
  }

  .nav-icon {
    font-size: 18px;
  }

  .badge-count {
    position: absolute;
    top: 2px;
    right: 8px;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 6px;
  }

  .badge-dot {
    top: 4px;
    right: 12px;
    width: 6px;
    height: 6px;
  }

  .main-content {
    padding: 14px 12px 24px;
  }

  /* СЕКЦИЯ 1: ГАЧА НА МОБИЛКЕ */
  .gacha-banner-card {
    padding: 22px 14px;
    border-radius: 18px;
  }

  .banner-badge {
    font-size: 10px;
    padding: 4px 10px;
    margin-bottom: 10px;
  }

  .banner-title {
    font-size: 20px;
    letter-spacing: 1px;
    line-height: 1.25;
  }

  .banner-desc {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .pity-counter-box {
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 16px;
  }

  .banner-members-preview {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 8px;
    margin-bottom: 20px;
    gap: 6px;
  }

  .mem-tag {
    flex-shrink: 0;
    font-size: 11px;
    padding: 4px 10px;
  }

  .gacha-actions {
    flex-direction: column;
    gap: 12px;
  }

  .gacha-btn {
    width: 100%;
    min-width: unset;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .btn-top {
    font-size: 14px;
  }

  /* СЕКЦИЯ 2: БИНДЕР И КАРТОЧКИ (ИДЕАЛЬНАЯ 2-КОЛОНОЧНАЯ СЕТКА) */
  .collection-title-box h2 {
    font-size: 20px;
  }

  .binder-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .filter-group {
    justify-content: space-between;
    width: 100%;
  }

  .select-styled {
    flex: 1;
    max-width: 65%;
  }

  .toggle-group {
    justify-content: flex-start;
    padding-top: 4px;
  }

  .binder-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
  }

  .kpop-card {
    border-radius: 14px;
  }

  .card-top-badges {
    top: 6px;
    left: 6px;
    right: 6px;
  }

  .rarity-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .card-lvl-pill {
    font-size: 9px;
    padding: 1px 5px;
  }

  .art-symbol {
    font-size: 40px;
  }

  .art-hangul {
    font-size: 16px;
  }

  .art-role {
    font-size: 9px;
  }

  .card-title-text {
    font-size: 11px;
  }

  .card-member-text {
    font-size: 10px;
  }

  .card-footer-info {
    padding: 6px 8px;
  }

  .card-copies-count {
    bottom: 38px;
    right: 6px;
    font-size: 9px;
    padding: 1px 5px;
  }

  /* СЕКЦИЯ 3: СТУДИЯ ПРОКАЧКИ */
  .upgrade-container {
    padding: 16px 12px;
    border-radius: 18px;
  }

  .selected-card-holder {
    width: 190px;
  }

  .up-title-row h3 {
    font-size: 16px;
  }

  .up-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-pill {
    padding: 8px 10px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-value {
    font-size: 14px;
  }

  .up-buttons-row {
    flex-direction: column;
    gap: 8px;
  }

  .action-btn {
    width: 100%;
    padding: 12px;
    font-size: 13px;
  }

  /* СЕКЦИЯ 4: КОНЦЕРТ */
  .concert-header h2 {
    font-size: 20px;
  }

  .concert-header p {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .lightiny-stage {
    padding: 20px 12px;
    border-radius: 18px;
  }

  .concert-stats {
    padding: 8px;
    gap: 6px;
  }

  .c-stat-val {
    font-size: 16px;
  }

  .wand-globe {
    width: 110px;
    height: 110px;
  }

  .wand-compass {
    font-size: 38px;
  }

  .wand-handle {
    width: 20px;
    height: 90px;
  }

  .cheer-slogans {
    font-size: 15px;
  }

  /* СЕКЦИЯ 5: КВЕСТЫ */
  .daily-checkin-card {
    padding: 16px 14px;
  }

  .quests-list-card {
    padding: 16px 14px;
  }

  .quest-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .q-reward {
    text-align: left;
  }

  .q-claim-btn {
    width: 100%;
  }

  /* МОДАЛЬНЫЕ ОКНА */
  .modal-backdrop {
    padding: 10px;
    background: rgba(6, 8, 14, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* Модалка результатов призыва */
  .summon-header h2 {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .summon-results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
  }

  .summon-actions {
    flex-direction: column;
    gap: 8px;
  }

  .pull-again-btn, .close-modal-btn {
    width: 100%;
    padding: 12px;
  }

  /* Модалка детального просмотра карты */
  .card-inspect-scene {
    padding: 24px 14px 18px;
    border-radius: 20px;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .modal-close-icon {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  .inspect-main-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .flip-card-wrapper {
    width: 200px;
    margin: 0 auto;
  }

  .detail-header h2 {
    font-size: 18px;
  }

  .detail-actions {
    flex-direction: column;
    gap: 8px;
  }

  /* Toasts на смартфонах */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: calc(75px + env(safe-area-inset-bottom));
  }

  .toast {
    font-size: 12px;
    padding: 10px 14px;
  }
}

/* Сверхкомпактные экраны (<= 380px) */
@media (max-width: 380px) {
  .nav-label {
    display: none;
  }

  .nav-icon {
    font-size: 22px;
  }

  .binder-grid {
    gap: 8px;
  }
}

