/* ==========================================================================
   Genersx AI Studio - Dedicated Stylesheet
   Theme: Modern Cyber / Neon Violet & Hot Pink Luxury
   ========================================================================== */

:root {
  --std-bg: #0b0a14;
  --std-surface: #131124;
  --std-surface-2: #1b1733;
  --std-surface-3: #242044;
  --std-border: rgba(168, 85, 247, 0.2);
  --std-border-active: #c084fc;
  --std-purple: #9333ea;
  --std-pink: #ec4899;
  --std-rose: #f43f5e;
  --std-acid: #b8e85a;
  --std-cyan: #06b6d4;
  --std-text: #f8fafc;
  --std-text-muted: #94a3b8;
  --std-text-dim: #64748b;
  --std-glow: 0 0 25px rgba(168, 85, 247, 0.25);
  --std-radius: 16px;
  --std-radius-sm: 10px;
}

/* Viewport & Zero Horizontal Overflow Containment */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Page Container */
.studio-body {
  background-color: var(--std-bg);
  color: var(--std-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.studio-page {
  flex: 1;
  padding: 20px 16px 40px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Topbar Header for Studio */
.studio-topbar {
  background: rgba(15, 13, 27, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--std-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
}

.studio-topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.studio-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 20px;
  color: #fff;
}

.studio-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--std-purple), var(--std-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.4);
}

.studio-logo-text {
  background: linear-gradient(90deg, #fff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.studio-logo-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.studio-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  font-weight: 600;
}

.studio-nav-links a {
  color: var(--std-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.studio-nav-links a:hover,
.studio-nav-links a.active {
  color: #fff;
}

.studio-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.studio-balance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(147, 51, 234, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-balance-pill:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: #c084fc;
  color: #fff;
  transform: translateY(-1px);
}

.studio-topup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.3);
  text-decoration: none;
}

.studio-topup-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
}

.studio-tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
  text-decoration: none;
  transition: all 0.2s;
}

.studio-tg-btn:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3);
}

.studio-bonus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.studio-bonus-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #fbbf24;
  color: #fff;
  transform: translateY(-1px);
}

.studio-aux-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--std-surface-2);
  border: 1px solid var(--std-border);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.studio-aux-btn:hover {
  background: var(--std-surface-3);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.studio-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--std-surface-2);
  border: 1px solid var(--std-border);
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-user-chip:hover {
  border-color: var(--std-border-active);
  background: var(--std-surface-3);
}

.studio-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--std-purple), var(--std-pink));
  color: #fff;
  border: none;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.35);
}

.studio-auth-btn:hover {
  opacity: 0.95;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   3-COLUMN STUDIO LAYOUT
   ========================================================================== */
.studio-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 275px;
  gap: 20px;
  width: 100%;
  align-items: stretch;
}

/* --- Left Sidebar: Modes & Help --- */
.studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--std-surface);
  border: 1px solid var(--std-border);
  border-radius: var(--std-radius);
  padding: 16px 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.studio-sidebar-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--std-text-dim);
  padding: 0 6px 4px;
}

.studio-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-nav-item {
  width: 100%;
  text-align: left;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  color: #cbd5e1;
}

.studio-nav-item:hover {
  background: var(--std-surface-3);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: translateX(2px);
}

.studio-nav-item.is-active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(236, 72, 153, 0.2));
  border-color: var(--std-border-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.4), 0 4px 14px rgba(147, 51, 234, 0.2);
}

.studio-nav-item span {
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-nav-item small {
  display: block;
  font-size: 11px;
  color: var(--std-text-dim);
  margin-top: 3px;
  font-weight: 500;
}

.studio-nav-item.is-active small {
  color: #e2e8f0;
}

/* Sidebar Tips Box */
.studio-tips {
  background: rgba(147, 51, 234, 0.08);
  border: 1px dashed rgba(168, 85, 247, 0.35);
  border-radius: var(--std-radius-sm);
  padding: 12px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-top: 4px;
}

.studio-tips strong {
  display: block;
  color: #c084fc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  margin-bottom: 4px;
}

.studio-sidebar-perks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.studio-perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--std-text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: 8px;
}

.studio-perk-item b {
  color: #f1f5f9;
}

/* Sidebar Foot Buttons */
.studio-sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-side-btn {
  width: 100%;
  text-align: center;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.studio-side-btn:hover {
  background: var(--std-surface-3);
  border-color: var(--std-border-active);
  color: #fff;
}

.studio-side-btn.highlight {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(236, 72, 153, 0.4));
  border-color: rgba(236, 72, 153, 0.5);
  color: #fff;
}

/* --- Center Workspace: Studio Main --- */
.studio-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.up-panel {
  background: var(--std-surface);
  border: 1px solid var(--std-border);
  border-radius: var(--std-radius);
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.up-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.svc-slug-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c084fc;
  background: rgba(147, 51, 234, 0.15);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.dot-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-status-row span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.dot-status-row span.live {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Mobile & Tablet Mode Tabs */
.svc-tabs-mobile {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.svc-tabs-mobile::-webkit-scrollbar {
  display: none;
}

.svc-tab-btn {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--std-text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.svc-tab-btn.is-active {
  background: linear-gradient(135deg, var(--std-purple), var(--std-pink));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.4);
}

/* Description Lead */
.svc-lead-box {
  margin-top: -4px;
}

.svc-lead {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

/* Dynamic Mode Controls (.svc-extra) */
.svc-extra {
  display: none;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
}

.svc-extra.is-active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

.svc-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.svc-textarea {
  width: 100%;
  background: var(--std-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.svc-textarea:focus {
  border-color: var(--std-border-active);
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.2);
}

/* Option Buttons & Pills */
.options-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.option-pill-btn {
  background: var(--std-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.option-pill-btn:hover {
  background: rgba(147, 51, 234, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
}

.option-pill-btn.is-active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(236, 72, 153, 0.35));
  border-color: var(--std-border-active);
  color: #fff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

/* Duration Selectors */
.duration-selector {
  display: flex;
  gap: 8px;
}

.duration-btn {
  flex: 1;
  background: var(--std-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.duration-btn:hover {
  border-color: var(--std-border-active);
  color: #fff;
}

.duration-btn.is-active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(236, 72, 153, 0.35));
  border-color: var(--std-border-active);
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

/* Hot Scene Categories */
.hot-scene-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.hot-scene-cat-btn {
  background: var(--std-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hot-scene-cat-btn:hover {
  color: #fff;
  border-color: var(--std-border-active);
}

.hot-scene-cat-btn.is-active {
  background: linear-gradient(135deg, var(--std-purple), var(--std-pink));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.35);
}

/* Scene / Outfit Cards Grid */
.hot-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}

.hot-cards-grid::-webkit-scrollbar {
  width: 5px;
}

.hot-cards-grid::-webkit-scrollbar-thumb {
  background: var(--std-surface-3);
  border-radius: 99px;
}

.hot-card {
  background: var(--std-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hot-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hot-card.is-active {
  border-color: var(--std-pink);
  box-shadow: 0 0 0 1px var(--std-pink), 0 0 16px rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.1);
}

.hot-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
  display: block;
}

.hot-card span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-top: 6px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-card.is-active span {
  color: #fff;
}

/* Face Swap Upload & Subtabs */
.svc-fs-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.svc-fs-tab {
  flex: 1;
  background: var(--std-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.svc-fs-tab.is-active {
  background: linear-gradient(135deg, var(--std-purple), var(--std-pink));
  color: #fff;
  border-color: transparent;
}

.svc-face-drop {
  width: 100%;
  border: 2px dashed rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.05);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.svc-face-drop:hover {
  border-color: var(--std-pink);
  background: rgba(236, 72, 153, 0.1);
}

.svc-face-drop img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--std-pink);
}

/* --- Drop Zone --- */
.drop-zone {
  border: 2px dashed rgba(168, 85, 247, 0.35);
  border-radius: 14px;
  background: rgba(147, 51, 234, 0.03);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--std-border-active);
  background: rgba(147, 51, 234, 0.08);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.15);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 22px;
}

.drop-zone h3 {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 4px;
}

.drop-zone p {
  font-size: 12px;
  color: var(--std-text-dim);
  margin: 0;
}

.drop-preview-img,
.drop-preview-video {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Drop Status Bar */
.drop-status {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 12px;
}

.drop-status.is-visible {
  display: flex;
}

.drop-status-text {
  color: #10b981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drop-change-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.drop-change-btn:hover {
  background: var(--std-surface-3);
  color: #fff;
  border-color: #fff;
}

/* Sample Models Quick Bar */
.sample-models-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.sample-models-bar::-webkit-scrollbar {
  display: none;
}

.sample-thumb-item {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: #000;
}

.sample-thumb-item:hover {
  border-color: var(--std-border-active);
  transform: scale(1.06);
}

.sample-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CTA Run Button */
.studio-run-block {
  padding-top: 4px;
}

.sc-run-btn {
  width: 100%;
  padding: 15px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 50%, #e11d48 100%);
  background-size: 200% 100%;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(219, 39, 119, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.sc-run-btn:hover:not(.is-disabled):not(.is-loading) {
  background-position: 100% 50%;
  box-shadow: 0 6px 28px rgba(219, 39, 119, 0.6);
  transform: translateY(-1px);
}

.sc-run-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.sc-run-btn.is-loading {
  cursor: wait;
  background: linear-gradient(135deg, #475569, #334155);
  box-shadow: none;
}

/* Progress Bar */
.sc-progress-box {
  display: none;
  padding: 12px 14px;
  background: var(--std-surface-2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
}

.sc-progress-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sc-progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #9333ea, #ec4899, #10b981);
  border-radius: 99px;
  transition: width 0.35s ease;
}

.sc-progress-text {
  font-size: 12px;
  font-family: monospace;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Output Card */
.svc-gen-out {
  margin-top: 4px;
}

.gen-result-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.12), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s;
}

.gen-result-card:hover {
  border-color: var(--std-border-active);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.gen-result-card__thumb {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
  display: block;
  margin-bottom: 8px;
}

.gen-result-card__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gen-result-card__label {
  font-size: 12px;
  font-weight: 800;
  color: #c084fc;
  text-transform: uppercase;
}

.gen-result-card__action {
  font-size: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   RIGHT SIDEBAR: BALANCE & ACTIONS (MATCHING SCREENSHOT)
   ========================================================================== */
.studio-actions-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 1. Large Balance Hero Card */
.studio-balance-hero-card {
  background: linear-gradient(145deg, rgba(26, 18, 42, 0.95), rgba(15, 11, 25, 0.95));
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--std-radius);
  padding: 18px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.studio-balance-hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25), transparent 70%);
  pointer-events: none;
}

.studio-balance-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.studio-balance-hero-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-balance-hero-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(184, 232, 90, 0.15);
  border: 1px solid rgba(184, 232, 90, 0.4);
  color: #b8e85a;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
}

.studio-balance-hero-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.studio-balance-hero-val {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 20%, #e9d5ff 60%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.studio-balance-hero-unit {
  font-size: 13.5px;
  font-weight: 800;
  color: #94a3b8;
}

.studio-balance-hero-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-side-topup-btn {
  width: 100%;
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
  transition: all 0.2s;
  text-decoration: none;
}

.studio-side-topup-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(236, 72, 153, 0.55);
}

/* 2. Actions Stack (Screenshot exact matches) */
.studio-side-stack-card {
  background: var(--std-surface);
  border: 1px solid var(--std-border);
  border-radius: var(--std-radius);
  padding: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.studio-side-stack-head {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--std-text-dim);
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.studio-side-stack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-stack-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: var(--std-surface-2);
  color: #cbd5e1;
  box-sizing: border-box;
}

.studio-stack-item-btn:hover {
  transform: translateX(2px);
  color: #fff;
}

.studio-stack-item-btn .stack-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.studio-stack-item-btn .stack-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-stack-item-btn .stack-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

/* Individual styles matching screenshot */
.studio-stack-item-btn--bonus {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.studio-stack-item-btn--bonus:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
}
.studio-stack-item-btn--bonus .stack-tag {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

.studio-stack-item-btn--bot {
  background: rgba(14, 165, 233, 0.10);
  border-color: rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}
.studio-stack-item-btn--bot:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38bdf8;
}
.studio-stack-item-btn--bot .stack-tag {
  background: rgba(14, 165, 233, 0.25);
  color: #bae6fd;
}

.studio-stack-item-btn--history {
  background: rgba(168, 85, 247, 0.10);
  border-color: rgba(168, 85, 247, 0.3);
  color: #e2e8f0;
}
.studio-stack-item-btn--history:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: #c084fc;
}
.studio-stack-item-btn--history .stack-tag {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
}

.studio-stack-item-btn--support {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
.studio-stack-item-btn--support:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.studio-stack-item-btn--support .stack-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.studio-stack-item-btn--faq {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
.studio-stack-item-btn--faq:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.studio-stack-item-btn--faq .stack-tag {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

/* 3. Account Card */
.studio-side-account-box {
  background: var(--std-surface);
  border: 1px solid var(--std-border);
  border-radius: var(--std-radius);
  padding: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.studio-side-account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.studio-side-account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.studio-side-account-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-side-account-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-side-account-sub {
  font-size: 11px;
  color: #64748b;
}

.studio-side-account-actions {
  display: flex;
  gap: 8px;
}

.studio-side-mini-btn {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.studio-side-mini-btn:hover {
  background: var(--std-surface-3);
  color: #fff;
}

.studio-side-mini-btn.highlight {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.studio-side-mini-btn.highlight:hover {
  background: rgba(236, 72, 153, 0.25);
  border-color: #ec4899;
}

.studio-side-mini-btn.danger {
  width: 100%;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.studio-side-mini-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

/* ==========================================================================
   BOTTOM SECTION: GENERATION HISTORY (FULL-WIDTH RESPONSIVE)
   ========================================================================== */
.studio-bottom-history {
  width: 100%;
  margin-top: 30px;
  background: var(--std-surface);
  border: 1px solid var(--std-border);
  border-radius: var(--std-radius);
  padding: 22px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  scroll-margin-top: 80px;
  box-sizing: border-box;
}

.studio-bottom-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-bottom-history-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-bottom-history-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
}

.studio-history-badge {
  font-size: 11px;
  background: rgba(147, 51, 234, 0.2);
  color: #c084fc;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 700;
  border: 1px solid rgba(147, 51, 234, 0.35);
}

.studio-history-clear-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-history-clear-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.studio-history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-history-filter {
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--std-text-dim);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.studio-history-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--std-surface-3);
}

.studio-history-filter.is-active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(236, 72, 153, 0.2));
  border-color: var(--std-border-active);
  color: #fff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.studio-bottom-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.history-card {
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: var(--std-surface-3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.history-card-media {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.history-card-media img,
.history-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.history-card:hover .history-card-media img {
  transform: scale(1.03);
}

.history-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.history-card-zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}

.history-card:hover .history-card-zoom-hint {
  opacity: 1;
}

.history-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.history-card-btn {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.history-card-btn:hover {
  background: var(--std-purple);
  color: #fff;
  border-color: var(--std-purple);
}

.studio-history-empty {
  text-align: center;
  color: var(--std-text-dim);
  font-size: 13px;
  padding: 40px 10px;
  line-height: 1.5;
}

/* ==========================================================================
   RESULT VIEWER MODAL
   ========================================================================== */
.result-viewer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.result-viewer-overlay.is-active {
  display: flex;
}

.result-viewer-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #110e22;
  border: 1.5px solid var(--std-border-active);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--std-glow);
}

.result-viewer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.result-viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.result-viewer-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-viewer-media-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080710;
  border-radius: 12px;
  min-height: 280px;
  max-height: min(60vh, 520px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-viewer-media-wrap img,
.result-viewer-media-wrap video {
  max-width: 100%;
  max-height: min(60vh, 520px);
  object-fit: contain;
  display: block;
}

.result-viewer-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--std-surface-2);
  color: #cbd5e1;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.result-viewer-nav:hover:not(:disabled) {
  border-color: var(--std-border-active);
  background: var(--std-surface-3);
  color: #fff;
}

.result-viewer-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.result-viewer-badge {
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c084fc;
  margin-bottom: 14px;
}

.result-viewer-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.result-tool-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  text-decoration: none;
}

.result-tool-btn.primary {
  background: linear-gradient(135deg, var(--std-purple), var(--std-pink));
  color: #fff;
  border: none;
}

.result-tool-btn.primary:hover {
  opacity: 0.95;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
}

.result-tool-btn.secondary {
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.result-tool-btn.secondary:hover {
  background: var(--std-surface-3);
  color: #fff;
  border-color: #fff;
}

.result-viewer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.result-chain-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.result-chain-btn:hover {
  background: rgba(147, 51, 234, 0.3);
  border-color: var(--std-border-active);
  color: #fff;
}

/* ==========================================================================
   DRAWERS (Balance, Topup, Profile)
   ========================================================================== */
.studio-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  transition: opacity 0.3s;
}

.studio-drawer.is-open {
  display: flex;
}

.studio-drawer-card {
  width: min(440px, 100%);
  height: 100%;
  max-height: 100vh;
  background: #110e24;
  border-left: 1px solid var(--std-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  padding: 24px;
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideLeft 0.25s ease-out;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.studio-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-drawer-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  font-size: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.studio-drawer-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Balance Hero */
.balance-hero-box {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(236, 72, 153, 0.2));
  border: 1.5px solid var(--std-border-active);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.balance-hero-num {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.balance-hero-sub {
  font-size: 13px;
  color: #d8b4fe;
}

/* Packages in Drawer */
.topup-package-card {
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.topup-package-card:hover {
  border-color: var(--std-border-active);
  background: var(--std-surface-3);
  transform: translateY(-1px);
}

.topup-package-card.popular {
  border-color: rgba(236, 72, 153, 0.6);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(236, 72, 153, 0.15));
}

.pkg-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.pkg-sub {
  font-size: 11.5px;
  color: var(--std-text-muted);
}

.pkg-price {
  font-size: 15px;
  font-weight: 900;
  color: #10b981;
}

/* Telegram Link Panel */
.tg-link-box {
  background: rgba(36, 161, 222, 0.08);
  border: 1px solid rgba(36, 161, 222, 0.3);
  border-radius: 12px;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #cbd5e1;
}

.tg-link-box b {
  color: #38bdf8;
}

.tg-link-code {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  color: #38bdf8;
  text-align: center;
  letter-spacing: 0.1em;
  margin: 10px 0;
  border: 1px dashed rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1180px) {
  .studio-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .studio-actions-sidebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .studio-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .studio-sidebar {
    display: none !important; /* moved to mobile tabs on top & drawer */
  }
  .studio-actions-sidebar {
    display: none !important; /* hidden from bottom flow on mobile; fully available in left side-drawer */
  }
  .studio-topbar-inner {
    padding: 0 10px;
  }
  .studio-nav-links {
    display: none !important;
  }
  .studio-drawer:not(.studio-drawer--left) .studio-drawer-card {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    animation: slideUp 0.25s ease-out;
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* ==========================================================================
   NEUROFAP AUTH & CREDENTIALS MODALS SYSTEM
   ========================================================================== */
.ui-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.ui-overlay.is-open,
.ui-overlay.is-active {
  display: flex !important;
}

.auth-modal-card,
.ui-card {
  background: #0e0c1a;
  border: 2px solid #b8e85a;
  border-radius: 16px;
  padding: 24px 22px 22px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(184, 232, 90, 0.2);
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.ui-card--wide {
  max-width: min(580px, 100%);
}

.auth-modal-close,
.ui-card-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  z-index: 5;
}

.auth-modal-close:hover,
.ui-card-close:hover {
  color: #b8e85a;
  background: rgba(184, 232, 90, 0.1);
}

.ui-modal-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.ui-modal-title--accent {
  color: #b8e85a;
}

.ui-block {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ui-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.ui-block-title {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 10px;
  font-weight: 700;
}

.ui-block-body {
  color: #cbd5e1;
  line-height: 1.55;
}

.ui-block--warn {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fca5a5;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 14px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s;
}

.auth-tab.is-active {
  background: rgba(184, 232, 90, 0.12);
  border-color: #b8e85a;
  color: #b8e85a;
}

.auth-method-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-method-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
}

.auth-method-tab.is-active {
  border-color: #b8e85a;
  color: #b8e85a;
  background: rgba(184, 232, 90, 0.08);
}

.auth-field {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #151226;
  color: #fff;
  font-size: 0.92rem;
  transition: border-color 0.2s;
}

.auth-field:focus {
  border-color: #b8e85a;
  outline: none;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  background: #b8e85a;
  color: #0b0a14;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(184, 232, 90, 0.35);
}

.auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.auth-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0 0 12px;
}

.auth-warn-box {
  font-size: 0.76rem;
  color: #fbbf24;
  line-height: 1.45;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.08);
}

.auth-email-note {
  font-size: 0.76rem;
  color: #b8e85a;
  line-height: 1.45;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(184, 232, 90, 0.25);
  border-radius: 6px;
  background: rgba(184, 232, 90, 0.06);
}

.cred-box {
  font-family: monospace;
  font-size: 0.96rem;
  color: #b8e85a;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  border: 1px dashed rgba(184, 232, 90, 0.45);
  word-break: break-all;
  user-select: all;
  margin: 8px 0;
}

.auth-msg {
  min-height: 1.2em;
  font-size: 0.8rem;
  margin-top: 10px;
  text-align: center;
}

/* ==========================================================================
   PULSATING CHAIN ACTION BUTTONS (AFTER GENERATION)
   ========================================================================== */
@keyframes pulseGlowChain {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 0 0 8px rgba(236, 72, 153, 0), 0 8px 24px rgba(236, 72, 153, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(236, 72, 153, 0), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
}

@keyframes pulseGlowCyan {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0), 0 8px 24px rgba(56, 189, 248, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
}

@keyframes pulseGlowRed {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0), 0 8px 24px rgba(239, 68, 68, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
}

@keyframes pulseGlowPurple {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0), 0 8px 24px rgba(168, 85, 247, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0), 0 4px 14px rgba(0, 0, 0, 0.4);
  }
}

.pulse-chain-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-sizing: border-box;
  border: none;
  color: #fff;
  position: relative;
  letter-spacing: 0.01em;
}

.pulse-chain-btn--outfit {
  background: linear-gradient(135deg, #ec4899, #d946ef);
  animation: pulseGlowChain 2s infinite ease-in-out;
}
.pulse-chain-btn--outfit:hover {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.03);
}

.pulse-chain-btn--animate {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  animation: pulseGlowCyan 2s infinite ease-in-out 0.3s;
}
.pulse-chain-btn--animate:hover {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.03);
}

.pulse-chain-btn--hotscene {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  animation: pulseGlowRed 2s infinite ease-in-out 0.6s;
}
.pulse-chain-btn--hotscene:hover {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.03);
}

.pulse-chain-btn--undress {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  animation: pulseGlowPurple 2s infinite ease-in-out;
}
.pulse-chain-btn--undress:hover {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.03);
}

.recent-undress-thumb {
  position: relative;
  border: 1.5px solid rgba(236, 72, 153, 0.4);
}
.recent-undress-thumb:hover {
  border-color: #ec4899 !important;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
}

/* ── DUAL-BOX WORKSPACE FOR UNDRESS ── */
.undress-dual-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .undress-dual-workspace {
    grid-template-columns: 1fr;
  }
}

.studio-box-card {
  background: var(--std-surface-2);
  border: 1.5px solid var(--std-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  transition: all 0.25s ease;
  box-sizing: border-box;
}
.studio-box-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
}
.studio-box-card.is-active-card {
  border-color: #c084fc;
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.3);
}

.studio-box-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.studio-box-card__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-box-card__num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-box-card__num--accent {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}
.studio-box-card__title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f1f5f9;
}
.studio-box-card__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.1);
}
.studio-box-card__badge--generating {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  animation: pulseGlowCyan 1.5s infinite;
}
.studio-box-card__badge--ready {
  background: rgba(184, 232, 90, 0.15) !important;
  color: #b8e85a !important;
  border-color: rgba(184, 232, 90, 0.4) !important;
}

/* Result Box Placeholder */
.studio-box-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  border: 1.5px dashed rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  color: #94a3b8;
}
.studio-box-placeholder .ph-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.9;
}
.studio-box-placeholder h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: 6px;
}
.studio-box-placeholder p {
  font-size: 12px;
  color: #64748b;
  max-width: 250px;
  line-height: 1.45;
}

/* Generating Animation in Box 2 */
.studio-box-generating {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  border-radius: 12px;
  background: radial-gradient(circle at center, rgba(168,85,247,0.14) 0%, rgba(10,10,14,0.96) 75%);
  border: 1.5px solid rgba(168,85,247,0.4);
  position: relative;
  overflow: hidden;
}

/* Laser Scanning Line Animation */
.laser-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ec4899, #c084fc, #38bdf8, transparent);
  box-shadow: 0 0 15px #ec4899, 0 0 30px #c084fc;
  animation: laserScanAnim 2.2s infinite ease-in-out alternate;
  z-index: 5;
}
@keyframes laserScanAnim {
  0% { top: 4%; opacity: 0.8; }
  50% { opacity: 1; }
  100% { top: 96%; opacity: 0.8; }
}

/* Neural Core Spinner */
.neural-pulse-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.neural-pulse-core {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: neuralPulseAnim 1.8s infinite ease-in-out;
  z-index: 2;
}
@keyframes neuralPulseAnim {
  0%, 100% { transform: scale(0.92); box-shadow: 0 0 20px rgba(168, 85, 247, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 35px rgba(236, 72, 153, 0.9); }
}
.neural-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(192, 132, 252, 0.5);
  animation: neuralRotateAnim 6s infinite linear;
}
@keyframes neuralRotateAnim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.neural-gen-text {
  font-size: 13.5px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 4px;
  min-height: 22px;
}
.neural-gen-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 14px;
}
.neural-progress-track {
  width: 82%;
  max-width: 280px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}
.neural-progress-fill {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, #a855f7, #ec4899, #b8e85a);
  border-radius: 99px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(184, 232, 90, 0.5);
}
.neural-gpu-badge {
  font-size: 10px;
  font-family: monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Result Box Ready Content */
.studio-box-ready {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.studio-box-ready__img-wrap {
  position: relative;
  width: 100%;
  min-height: 240px;
  max-height: 340px;
  background: #0a0a0c;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(168,85,247,0.3);
}
.studio-box-ready__img-wrap img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  display: block;
}
.studio-box-ready__toolbar {
  display: flex;
  gap: 8px;
}
.studio-box-ready__btn {
  flex: 1;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--std-surface-3);
  border: 1px solid var(--std-border);
  color: #f1f5f9;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.studio-box-ready__btn:hover {
  background: rgba(168,85,247,0.25);
  border-color: #c084fc;
}

/* ── FACE SWAP DUAL GRID (LEFT 1 RESULT, RIGHT 2 INPUTS) ── */
.faceswap-dual-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .faceswap-dual-workspace {
    grid-template-columns: 1fr;
  }
}
.faceswap-inputs-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faceswap-input-card {
  background: var(--std-surface-2);
  border: 1.5px dashed var(--std-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  box-sizing: border-box;
}
.faceswap-input-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.04);
}
.faceswap-input-card.has-file {
  border-style: solid;
  border-color: #b8e85a;
  box-shadow: 0 0 14px rgba(184, 232, 90, 0.2);
}
.faceswap-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faceswap-input-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.faceswap-input-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}
.faceswap-input-preview {
  width: 100%;
  height: 95px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.06);
}
.faceswap-input-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── PREVIEW CARDS (NEUROFAP EXACT) FOR OUTFITS & SCENES ── */
.hot-scene-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0c;
}
.hot-scene-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.hot-card:hover .hot-scene-preview__img {
  transform: scale(1.04);
}
.hot-scene-preview__veil {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.hot-card:hover .hot-scene-preview__veil {
  opacity: 0.15;
}
.hot-scene-preview--clear .hot-scene-preview__veil {
  display: none !important;
}

/* ==========================================================================
   MOBILE LEFT DRAWER & MENU BUTTON
   ========================================================================== */
.studio-mobile-menu-btn {
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.studio-mobile-menu-btn:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: #c084fc;
  color: #fff;
}
.studio-mobile-menu-btn__icon {
  font-size: 16px;
  color: #c084fc;
}
@media (max-width: 900px) {
  /* Mobile Topbar: Clean, Compact, Zero Horizontal Overflow */
  .studio-topbar {
    height: 56px !important;
  }
  .studio-topbar-inner {
    padding: 0 10px !important;
    gap: 6px !important;
  }
  .studio-topbar-left {
    gap: 8px !important;
  }
  .studio-mobile-menu-btn {
    display: inline-flex !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9px !important;
    font-size: 19px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }
  .studio-logo {
    gap: 6px !important;
    font-size: 16px !important;
  }
  .studio-logo-mark {
    width: 28px !important;
    height: 28px !important;
    font-size: 15px !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
  }
  .studio-logo-text {
    font-size: 16px !important;
  }
  /* In mobile view, keep ONLY Entrance (Вход), Balance, Logo, and Topup (+) */
  .studio-logo-badge,
  .studio-nav-links,
  .studio-reg-btn-desktop,
  .studio-topbar-actions .studio-logout-btn {
    display: none !important;
  }
  .studio-topbar-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .studio-balance-pill {
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    gap: 4px !important;
    border-radius: 8px !important;
  }
  /* Topup button: only "+" symbol, text hidden */
  .studio-topup-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .topup-plus-symbol {
    display: inline-block !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  .topup-text-label {
    display: none !important;
  }
  .studio-login-pill {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }
  .studio-user-chip {
    height: 32px !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* Drawer from Left (for mobile menu) */
.studio-drawer--left {
  align-items: flex-start !important;
  justify-content: flex-start !important;
}
.studio-drawer--left .studio-drawer-card {
  border-left: none !important;
  border-right: 1px solid var(--std-border) !important;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7) !important;
  animation: slideRight 0.25s ease-out !important;
  width: min(340px, 86vw) !important;
  border-radius: 0 20px 20px 0 !important;
}
@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.studio-drawer-quick-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
}
.studio-drawer-modes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-mode-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--std-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}
.drawer-mode-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #c084fc;
  color: #fff;
}
.drawer-mode-btn.is-active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.25));
  border-color: var(--std-border-active);
  color: #fff;
}
.drawer-mode-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.drawer-mode-info {
  display: flex;
  flex-direction: column;
}
.drawer-mode-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.drawer-mode-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}
.studio-drawer-aux-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   MOBILE MODE SWITCHER IN EXACTLY 2 ROWS (NO HORIZONTAL SCROLL)
   Row 1 (3 items): Раздевание | Оживление | Сцены 18+
   Row 2 (2 items): Face Swap | Наряды 18+
   ========================================================================== */
@media (max-width: 900px) {
  .svc-tabs-mobile {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px !important;
    overflow: visible !important;
    padding: 2px 0 10px !important;
    margin-bottom: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .svc-tabs-mobile .svc-tab-btn:nth-child(1),
  .svc-tabs-mobile .svc-tab-btn:nth-child(2),
  .svc-tabs-mobile .svc-tab-btn:nth-child(3) {
    grid-column: span 2 !important;
  }
  .svc-tabs-mobile .svc-tab-btn:nth-child(4),
  .svc-tabs-mobile .svc-tab-btn:nth-child(5) {
    grid-column: span 3 !important;
  }
  .svc-tab-btn {
    width: 100% !important;
    padding: 9px 2px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 4px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    box-sizing: border-box !important;
    cursor: pointer;
    transition: all 0.2s;
  }
  .svc-tab-btn.is-active {
    background: linear-gradient(135deg, #a855f7, #ec4899) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.45) !important;
  }
}

/* ==========================================================================
   DEDICATED HISTORY MODAL WINDOW
   ========================================================================== */
.history-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.history-modal-overlay.is-open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}
.history-modal-dialog {
  position: relative;
  width: min(940px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #110e22;
  border: 1.5px solid var(--std-border-active);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), var(--std-glow);
  overflow: hidden;
  box-sizing: border-box;
}
.history-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.history-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}
.history-modal-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
}
.history-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.history-modal-clear-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.history-modal-clear-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}
.history-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.history-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.history-modal-filters {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}
.history-modal-filters::-webkit-scrollbar {
  display: none;
}
.history-modal-filter {
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.history-modal-filter.is-active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}
.history-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  max-height: 60vh;
}
.history-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.history-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.history-modal-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.history-modal-foot-hint {
  font-size: 11.5px;
  color: #94a3b8;
}

/* History Card Overlay Hint & Delete Button */
.history-card-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.history-card:hover .history-card-zoom-overlay {
  opacity: 1;
}
.history-card-zoom-hint {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border: 1px solid rgba(168, 85, 247, 0.6);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.history-card-del-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
.history-card-del-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   RESULT VIEWER MODAL WITH SIDE MENU & FULLSCREEN
   ========================================================================== */
.result-viewer-card {
  position: relative;
  width: min(880px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #110e22;
  border: 1.5px solid var(--std-border-active);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), var(--std-glow);
  box-sizing: border-box;
}
.result-viewer-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .result-viewer-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.result-viewer-media-col {
  display: flex;
  flex-direction: column;
}
.result-viewer-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.result-viewer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}
.result-viewer-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.result-viewer-media-wrap {
  position: relative;
  flex: 1;
  min-height: 280px;
  max-height: min(52vh, 460px);
  background: #080710;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.result-viewer-media-wrap:hover {
  border-color: #c084fc;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}
.result-viewer-hint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.fs-hint-text {
  font-size: 11.5px;
  color: #94a3b8;
  cursor: pointer;
}
.fs-hint-text b {
  color: #c084fc;
}
.result-viewer-fs-btn {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.result-viewer-fs-btn:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #fff;
}

/* Side Menu Column */
.result-viewer-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
}
.result-viewer-sidebar-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rv-side-title {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}
.rv-side-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.rv-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  border: 1px solid transparent;
  box-sizing: border-box;
}
.rv-action-btn--dl {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.rv-action-btn--dl:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}
.rv-action-btn--open {
  background: var(--std-surface-3);
  border-color: var(--std-border);
  color: #f1f5f9;
}
.rv-action-btn--open:hover {
  border-color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
}
.rv-action-btn--del {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
  margin-top: auto;
}
.rv-action-btn--del:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}
.rv-btn-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.rv-btn-info {
  display: flex;
  flex-direction: column;
}
.rv-btn-main {
  font-weight: 800;
  font-size: 12.5px;
}
.rv-btn-sub {
  font-size: 10.5px;
  opacity: 0.8;
}
.rv-chain-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0;
}
.rv-chain-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}
.rv-chain-hint {
  font-size: 11px;
  color: #94a3b8;
  margin: 3px 0 8px;
}
.rv-chain-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   TRUE FULLSCREEN MODE (100VW X 100VH ON MOBILE AND DESKTOP)
   ========================================================================== */
.result-viewer-overlay.is-fullscreen {
  padding: 0 !important;
  background: #000 !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-card {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  background: #000 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-sidebar-col,
.result-viewer-overlay.is-fullscreen .result-viewer-top-bar,
.result-viewer-overlay.is-fullscreen .result-viewer-hint-bar {
  display: none !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-layout {
  grid-template-columns: 1fr !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-media-col {
  width: 100% !important;
  height: 100% !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-stage {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  gap: 0 !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-media-wrap {
  width: 100% !important;
  height: 100% !important;
  max-height: 100vh !important;
  min-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000 !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-media-wrap img,
.result-viewer-overlay.is-fullscreen .result-viewer-media-wrap video {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  object-fit: contain !important;
}
.result-viewer-overlay.is-fullscreen .result-viewer-close {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 1200 !important;
  width: 44px !important;
  height: 44px !important;
  font-size: 24px !important;
  background: rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}



/* ── MULTILINGUAL LANGUAGE SWITCHER (EN, RU, UK) ── */
.lang-switcher {
  position: relative;
  display: inline-block;
  user-select: none;
}
.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.lang-switcher-btn:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.6);
}
.lang-switcher-btn.is-light {
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}
.lang-switcher-btn.is-light:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.lang-switcher-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  padding: 6px;
  display: none;
  z-index: 9999;
}
.lang-switcher-dropdown.is-light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}
.lang-switcher-dropdown.is-active {
  display: block;
  animation: langFadeIn 0.15s ease-out;
}
@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang-item-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.lang-item-btn.is-light {
  color: #334155;
}
.lang-item-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #fff;
}
.lang-item-btn.is-light:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.lang-item-btn.is-selected {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  font-weight: 700;
}
.lang-item-btn.is-light.is-selected {
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 700;
}
.lang-mobile-group {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}
.lang-mobile-group.is-light {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.lang-mobile-tab {
  flex: 1;
  padding: 6px 4px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.lang-mobile-tab.is-light {
  color: #64748b;
}
.lang-mobile-tab.is-selected {
  background: #a855f7;
  color: #fff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}
.lang-mobile-tab.is-light.is-selected {
  background: #7c3aed;
  color: #fff;
}
