@charset "UTF-8";
/* ============================================================
   PubliShot Pro — main.css  [Dark Edition]
   Variables, reset, layout, pantallas
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --brand:        #7C5FF5;
  --brand-dark:   #5B3FD4;
  --brand-light:  rgba(124,95,245,0.12);
  --brand-mid:    #A78BFA;
  --brand-glow:   rgba(124,95,245,0.4);
  --accent:       #F0A500;
  --success:      #00D68F;
  --danger:       #FF4D4F;
  --warning:      #F59E0B;

  --bg:           #08080C;
  --bg2:          #0D0D14;
  --surface:      #111119;
  --surface2:     #18181F;
  --surface3:     #252530;
  --border:       rgba(255,255,255,0.1);
  --border-dark:  rgba(255,255,255,0.2);

  --text:         #EEEAF8;
  --text-1:       #EEEAF8;
  --text-2:       #A09CBB;
  --text-3:       #8D89A6;

  --sidebar-w:    280px;
  --header-h:     60px;
  --nav-h:        68px;
  --r-sm:         8px;
  --r-md:         14px;
  --r-lg:         20px;
  --r-xl:         28px;
  --shadow-sm:    0 1px 6px rgba(0,0,0,0.5);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.7);
  --transition:   .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 14px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Layout principal ───────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}
#app::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,95,245,0.14) 0%, transparent 70%);
  top: 8%; right: -80px;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
#app::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,0.08) 0%, transparent 70%);
  bottom: 12%; left: -60px;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* ── Sidebar overlay ────────────────────────────────────────── */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
#sidebar-overlay.visible { display: block; }

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 40px rgba(0,0,0,0.6);
  transform: translateX(-100%);
  transition: transform var(--transition);
  overflow: hidden;
}
#sidebar.open { transform: translateX(0); }

@media (min-width: 1024px) {
  #sidebar {
    position: relative;
    transform: translateX(0);
    flex-shrink: 0;
  }
  #sidebar-overlay { display: none !important; }
  #btn-menu { display: none; }
  #bottom-nav { display: none !important; }
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px var(--brand-glow);
}
.sidebar-logo svg { width: 20px; height: 20px; color: white; }
.sidebar-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.sidebar-subtitle { font-size: 11px; color: var(--text-3); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--brand-light);
  border: 1px solid rgba(124,95,245,0.2);
  margin: 12px;
  border-radius: var(--r-md);
}
.sidebar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: white;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--brand-glow);
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar-user-biz  { font-size: 11px; color: var(--text-3); }

.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform .15s ease;
  margin-bottom: 2px;
}
.sidebar-nav-item:hover  { background: var(--brand-light); color: var(--brand-mid); }
.sidebar-nav-item:active { transform: scale(0.97); }
.sidebar-nav-item.active { background: var(--brand-light); color: var(--brand-mid); }
.sidebar-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav-sep { height: 1px; background: var(--border); margin: 8px 0; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition);
}
.sidebar-logout:hover { background: rgba(255,77,79,0.1); }
.sidebar-logout svg { width: 18px; height: 18px; }

/* ── Main ─────────────────────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
}

/* ── Header ──────────────────────────────────────────────────── */
#header {
  height: var(--header-h);
  background: rgba(17,17,25,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 10;
}
#btn-menu {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
#btn-menu:hover { background: var(--brand-light); color: var(--brand-mid); }
#btn-menu svg { width: 20px; height: 20px; }
#header-title { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; letter-spacing: -0.2px; }
#header-actions { display: flex; gap: 8px; }

/* ── Pantallas ───────────────────────────────────────────────── */
#screens {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.screen {
  display: none;
  flex-direction: column;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px;
  animation: screenIn .2s ease;
  background: var(--bg);
}
.screen.active { display: flex; }
.screen.no-pad { padding: 0; }
/* Evita que flex encoja los hijos — permite overflow y scroll correcto */
.screen > * { flex-shrink: 0; }

/* Botón "Mover foto" activo en Step 2 */
#btn-drag-toggle {
  border: 1px solid var(--border-dark);
}
#btn-drag-toggle.drag-on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 14px var(--brand-glow);
}

/* ── Nav inferior ────────────────────────────────────────────── */
#bottom-nav {
  height: 64px;
  background: rgba(17,17,25,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 16px;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  transition: color var(--transition), transform .15s ease;
  position: relative;
  letter-spacing: 0.3px;
}
.bn-item.active { color: var(--brand-mid); }
.bn-item:active { transform: scale(0.95); }
.bn-item svg { width: 22px; height: 22px; }
.bn-item::after {
  content: '';
  position: absolute;
  bottom: 0px; left: 25%; right: 25%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid));
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}
.bn-item.active::after { opacity: 1; }

/* FAB central */
.bn-fab {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--brand), #EC4899);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px var(--brand-glow), 0 4px 16px rgba(0,0,0,0.4);
  color: white;
  transform: translateY(-8px);
  transition: transform .15s ease, box-shadow .2s ease;
}
.bn-fab:active {
  transform: translateY(-4px) scale(0.95);
  box-shadow: 0 4px 12px var(--brand-glow);
}
.bn-fab svg { width: 22px; height: 22px; }

/* ── Pantalla LOGIN ──────────────────────────────────────────── */
#s-login {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
  background-size: 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 32px 24px;
  overflow: hidden;
}
#s-login.hidden { display: none; }

/* Blobs animados de fondo */
#s-login::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,95,245,0.28) 0%, transparent 70%);
  top: -140px; left: -120px;
  animation: blob1 11s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
#s-login::after {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,47,190,0.22) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation: blob2 13s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes blob1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(70px,-50px) scale(1.12); }
  66%       { transform: translate(-30px,60px) scale(0.92); }
}
@keyframes blob2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  40%       { transform: translate(-60px,35px) scale(1.1); }
  70%       { transform: translate(40px,-50px) scale(0.95); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 0 36px var(--brand-glow), 0 8px 28px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
  animation: logoFloat 4s ease-in-out infinite;
}
.login-logo svg { width: 38px; height: 38px; color: white; }

.login-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5px;
}
.login-sub {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}
.login-card {
  width: 100%; max-width: 360px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.07);
  position: relative;
  z-index: 1;
}
.login-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-sm);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.login-tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: var(--text-3);
  transition: all var(--transition);
}
.login-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  box-shadow: 0 2px 10px var(--brand-glow);
}

/* ── Pantalla HOME ───────────────────────────────────────────── */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.home-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.home-hero-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--brand-glow);
}
.home-greeting { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 2px; letter-spacing: -0.4px; }
.home-sub { font-size: 12px; color: var(--text-3); }

.home-create-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--brand) 0%, #5B3FD4 100%);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
  cursor: pointer;
  border: none;
  font-family: inherit;
  margin-bottom: 16px;
  box-shadow: 0 6px 28px rgba(124,95,245,0.4), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform .15s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.home-create-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}
.home-create-btn:active { transform: scale(0.98); box-shadow: 0 3px 14px rgba(124,95,245,0.35); }

.tip-emoji-big { font-size: 28px; flex-shrink: 0; line-height: 1; }

.home-cta-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--r-lg);
  padding: 20px;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 0 32px rgba(124,95,245,0.3), var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.home-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.home-cta-card:hover  { transform: translateY(-2px); box-shadow: 0 0 44px rgba(124,95,245,0.45), var(--shadow-lg); }
.home-cta-card:active { transform: scale(0.98); }
.home-cta-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}
.home-cta-icon svg { width: 26px; height: 26px; }
.home-cta-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.home-cta-sub { font-size: 12px; opacity: .75; margin-top: 2px; }

.home-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

.home-tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tip-icon { color: var(--brand-mid); flex-shrink: 0; margin-top: 1px; }
.tip-icon svg { width: 16px; height: 16px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  color: var(--text-3);
  text-align: center;
  gap: 8px;
}
.empty-state svg { width: 40px; height: 40px; opacity: .25; }
.empty-state p { font-size: 13px; }

/* ── Pasos (steps) ───────────────────────────────────────────── */
.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.step-label { font-size: 11px; color: var(--text-3); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.step-dots { display: flex; gap: 6px; }
.step-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  transition: all var(--transition);
}
.step-dot.active {
  width: 24px;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid));
  box-shadow: 0 0 10px var(--brand-glow);
}
.step-dot.done { background: var(--success); box-shadow: 0 0 6px rgba(0,214,143,0.4); }

.step-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.3px; }
.step-sub { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }

/* ── Integraciones ───────────────────────────────────────────── */
.integrations-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 16px 0 10px;
}
.integrations-section-title:first-child { margin-top: 0; }

/* ── Perfil ──────────────────────────────────────────────────── */
.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.profile-section-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ── Animaciones ─────────────────────────────────────────────── */
@keyframes fadeIn   { from { opacity: 0; }                              to { opacity: 1; } }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp  { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastIn  { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--border-dark);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 999;
  animation: toastIn .25s ease;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

/* ── Loading overlay ─────────────────────────────────────────── */
#loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,8,12,0.87);
  z-index: 300;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(10px);
}
#loading-overlay.visible { display: flex; }
.spinner {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 14px var(--brand-glow);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; font-weight: 600; color: var(--text-2); }
.loading-sub  { font-size: 12px; color: var(--text-3); }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Dynamic viewport fix ────────────────────────────────────── */
body, #app, #main { height: 100dvh !important; }
.screen { padding-bottom: 120px !important; }
