@import url('root.css');
@import url('changelog.css');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', var(--font);
  min-height: 100vh;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 12% -5%, rgba(0, 110, 210, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 88% 105%, rgba(0, 180, 255, 0.07) 0%, transparent 45%);
  color: var(--text-primary);
  overflow-x: hidden;
}

.grid-overlay {
  position: fixed; inset: 0;
  background:
    linear-gradient(rgba(0, 150, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 150, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  z-index: 0; pointer-events: none;
}
.glow-overlay {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1; pointer-events: none;
}

.app { position: relative; z-index: 2; width: min(96%, 1200px); margin: 0 auto; padding: 20px 20px 40px; }

.top-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.logo-section { display: flex; align-items: center; gap: 14px; }
.logo-section img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; border: 1px solid var(--card-border); }
.logo-section h1 { font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700; line-height: 1.1; }
.logo-section p { font-size: 12px; color: var(--text-muted); letter-spacing: 0.4px; }
.logo-section p strong { color: var(--cyan); font-weight: 600; }

body.is-exporting * { animation-play-state: paused !important; }
body.is-exporting .snap-chat-messages { overflow: visible !important; max-height: none !important; }

.platform-tabs {
  display: none; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 28px; padding: 6px;
  background: rgba(4, 12, 28, 0.7); border: 1px solid var(--card-border);
  border-radius: 14px;
}
.platform-tabs.visible { display: flex; }
.tab-btn {
  font-family: 'Rajdhani', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover { color: var(--cyan); border-color: rgba(0, 212, 255, 0.3); background: rgba(0, 212, 255, 0.06); }
.tab-btn.active {
  color: #041018; background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.tab-btn[data-platform="home"].active {
  color: #041018; background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.tab-btn[data-platform="tweet"].active { background: linear-gradient(135deg, var(--blue), #161616); border-color: var(--blue); box-shadow: 0 0 20px rgba(29,155,240,0.35); color: #fff; }
.tab-btn[data-platform="gram"].active { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); border-color: transparent; color: #fff; box-shadow: 0 0 20px rgba(220,39,67,0.35); }
.tab-btn[data-platform="book"].active { background: var(--fb-blue); border-color: var(--fb-blue); box-shadow: 0 0 20px rgba(24,119,242,0.35); color: #fff; }
.tab-btn[data-platform="tok"].active { background: linear-gradient(135deg, var(--tiktok-cyan), var(--tiktok-red)); border-color: transparent; color: #fff; box-shadow: 0 0 20px rgba(254,44,85,0.35); }
.tab-btn[data-platform="chat"].active { background: var(--snap-yellow); border-color: var(--snap-yellow); color: #000; box-shadow: 0 0 20px rgba(255,252,0,0.35); }
.tab-btn[data-platform="lock"].active { background: linear-gradient(135deg, #6366f1, #d55cf6); border-color: transparent; color: #fff; box-shadow: 0 0 20px rgba(99,102,241,0.4); }
.tab-btn[data-platform="gallery"].active { background: linear-gradient(135deg, #e43aed, #1d6595); border-color: #7c3aed; color: #fff; box-shadow: 0 0 20px rgba(124,58,237,0.4); }

.global-device-row {
  display: none; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  width: 100%; padding: 0 0 14px;
}
.global-device-row.visible { display: flex; }
.global-device-row .device-label {
  font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted);
  margin-right: 4px;
}
.device-pill {
  font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--card-border);
  background: rgba(4, 12, 28, 0.85); color: var(--text-muted); cursor: pointer; transition: 0.2s;
}
.device-pill:hover { color: var(--text-primary); border-color: rgba(0,212,255,0.3); }
.device-pill.active {
  background: rgba(0,212,255,0.12); border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 0 12px rgba(0,212,255,0.15);
}
.ios-notch-row {
  display: none; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  width: 100%; padding: 0 0 14px; margin-top: -6px;
}
.ios-notch-row.visible { display: flex; }

/* ===== DEVICE FRAME (iPhone / Android) — full-screen phone mockups only ===== */
.device-frame {
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}
.device-statusbar {
  z-index: 6; height: 50px; pointer-events: none; flex-shrink: 0;
}
.device-frame:not(.flex-frame) .device-statusbar {
  position: absolute; top: 0; left: 0; right: 0;
}
.device-statusbar.light { color: #000; background: #fff; }
.device-statusbar:not(.light) { color: #fff; }
.status-ios, .status-android {
  display: flex; width: 100%; height: 100%;
  align-items: flex-end; justify-content: space-between;
  position: relative;
  padding: 0 24px 9px;
  color: inherit;
}
.status-ios {
  font-size: 16px; font-weight: 600; letter-spacing: -0.4px;
}
.status-android {
  font-size: 14px; font-weight: 500; letter-spacing: -0.2px;
  font-family: Roboto, "Segoe UI", sans-serif;
}
.status-ios-left, .status-android-left {
  display: flex; align-items: center; gap: 5px; min-width: 54px;
}
.status-dynamic-island {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 33px; background: #000; border-radius: 18px;
  pointer-events: none; z-index: 2;
}
.status-dynamic-island::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle, rgba(70,70,140,0.55) 0%, transparent 72%);
}
.device-statusbar.light .status-dynamic-island { background: #000; }
.status-ios-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 168px; height: 33px; background: #000;
  border-radius: 0 0 20px 20px;
  pointer-events: none; z-index: 2;
}
.status-notch-speaker {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 5px; background: #141414; border-radius: 4px;
}
.status-notch-cam {
  position: absolute; top: 9px; right: 22px;
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e1e3a, #080810 70%);
}
.status-ios.ios-layout-notch {
  align-items: center; padding: 0 26px;
}
.status-ios.ios-layout-island {
  align-items: flex-end; padding: 0 24px 10px;
}
.status-android-camera {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1a1a2e, #050508 70%);
  box-shadow: inset 0 0 1px rgba(255,255,255,0.12);
  pointer-events: none; z-index: 2;
}
.status-none {
  display: none;
}
.status-android { display: none !important; }
.device-frame.no-device .device-statusbar,
.device-frame.no-device .device-bottom-chrome {
  display: none !important;
}
.device-frame.no-device .story-progress-wrap,
.device-frame.no-device .snap-story-progress {
  top: 10px;
}
.device-frame.no-device .story-header-row,
.device-frame.no-device .snap-top {
  top: 22px;
}
.device-frame.android .status-none { display: none !important; }
.device-frame.android .status-ios { display: none !important; }
.device-frame.android .status-android { display: flex !important; }
.device-frame:not(.android) .status-android { display: none !important; }
.device-frame.android .device-home-indicator { display: none; }
.device-frame.android .device-nav-bar { display: block; }
.status-time { min-width: 0; line-height: 1; pointer-events: auto; }
.status-icons { display: flex; align-items: center; gap: 4px; }
.status-icons svg { display: block; flex-shrink: 0; }

.status-wifi-samsung { flex-shrink: 0; }
.status-sig-bars { flex-shrink: 0; }
.status-battery-pct {
  font-size: 12px; font-weight: 400; letter-spacing: -0.1px; line-height: 1;
  font-family: Roboto, "Segoe UI", sans-serif;
}
.status-batt-android { margin-left: 1px; flex-shrink: 0; }
.lock-android-sys-icons {
  display: flex; align-items: center; gap: 4px;
}
.lock-batt-wrap { display: flex; align-items: center; flex-shrink: 0; }
.lock-batt-wrap svg { display: block; }
#snapChat.dark-theme .device-statusbar { background: #0e0e0e; color: #fff; }
.device-bottom-chrome {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  padding: 4px 0 8px; z-index: 5;
}
.device-frame:not(.flex-frame) .device-bottom-chrome {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding-bottom: 6px;
  background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, transparent 100%);
}
.device-frame.flex-frame .device-bottom-chrome { background: #fff; padding-bottom: 4px; }
.device-frame.flex-frame.android .device-bottom-chrome { background: #fff; }
.device-home-indicator {
  width: 134px; height: 5px; background: #fff; border-radius: 3px; opacity: 0.92;
}
.device-frame.flex-frame .device-home-indicator { background: #000; opacity: 0.22; }
.device-nav-bar {
  display: none; width: 120px; height: 4px; background: rgba(255,255,255,0.55);
  border-radius: 2px;
}
.device-frame.flex-frame .device-nav-bar { background: rgba(0,0,0,0.35); }

.gram-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: min(390px, 95%); margin-bottom: 8px;
}
.gram-toolbar-row { width: min(390px, 95%); margin-bottom: 8px; }
.gram-mode-toggle {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(4, 12, 28, 0.85); border: 1px solid var(--card-border); border-radius: 10px;
}
.mode-pill {
  font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 8px 16px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-muted); cursor: pointer; transition: 0.2s;
}
.mode-pill:hover { color: var(--text-primary); }
.mode-pill.active {
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff; box-shadow: 0 2px 12px rgba(220,39,67,0.35);
}
#snapPillStory.active, #snapPillChat.active {
  background: var(--snap-yellow); color: #000;
  box-shadow: 0 2px 12px rgba(255,252,0,0.35);
}
.gram-toolbar .menuWrapper { position: relative; right: auto; top: auto; }
.gram-toolbar .iconBtn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--card-border); background: rgba(4, 12, 28, 0.85); color: var(--text-muted);
}
.gram-toolbar .iconBtn:hover { color: var(--cyan); border-color: var(--cyan); }
.gram-toolbar .dropdownMenu { top: 44px; right: 0; background: rgba(14, 10, 24, 0.98); color: var(--text-primary); border: 1px solid var(--card-border); }
.gram-toolbar .dropdownMenu button:hover { background: rgba(124,58,237,0.18); }

.workspace {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.platform-panel { display: none; width: 100%; flex-direction: column; align-items: center; }
.platform-panel.active { display: flex; }

/* ===== HOME LANDING ===== */
#panel-home { align-items: stretch; max-width: 1100px; margin: 0 auto; }
.home-hero { text-align: center; margin-bottom: 28px; padding: 0 8px; }
.home-title {
  font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700;
  letter-spacing: 0.5px; margin-bottom: 12px;
}
.home-lead {
  font-size: 16px; line-height: 1.55; color: rgba(232, 244, 255, 0.92);
  max-width: 720px; margin: 0 auto 10px;
}
.home-sub {
  font-size: 13px; line-height: 1.6; color: var(--text-muted); max-width: 640px; margin: 0 auto;
}
.home-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px; width: 100%;
}
.home-card {
  display: flex; flex-direction: column;
  background: rgba(4, 12, 28, 0.82); border: 1px solid var(--card-border);
  border-radius: 16px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.home-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 212, 255, 0.06);
  transform: translateY(-2px);
}
.home-card-img {
  position: relative; overflow: hidden; background: #060d18;
  display: flex; align-items: center; justify-content: center;
}
.home-card-img--wide { aspect-ratio: 16 / 10; }
.home-card-img--tall { aspect-ratio: 390 / 520; }
.home-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.home-card-img--wide img { object-fit: contain; padding: 8px; }
.home-preview-lock {
  position: relative; width: 72%; height: 88%; border-radius: 22px; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08), 0 12px 28px rgba(0,0,0,0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 18%;
}
.home-preview-lock-bg {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #1a3a6e 0%, #4a2d7a 38%, #c96b4a 72%, #2a4a8a 100%);
}
.home-preview-lock-date,
.home-preview-lock-time {
  position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.home-preview-lock-date { font-size: 11px; font-weight: 500; margin-bottom: 4px; opacity: 0.95; }
.home-preview-lock-time { font-size: 36px; font-weight: 700; letter-spacing: -2px; line-height: 1; }
.home-card-body {
  padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 8px;
}
.home-card-body h3 {
  font-family: 'Rajdhani', sans-serif; font-size: 20px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
}
.home-card-body p { font-size: 13px; line-height: 1.5; color: var(--text-muted); flex: 1; }
.home-card-btn {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--cyan);
  background: rgba(0, 212, 255, 0.1); color: var(--cyan); cursor: pointer;
  transition: 0.2s; margin-top: 4px; width: 100%;
}
.home-card-btn:hover { background: var(--cyan); color: #041018; box-shadow: 0 0 18px var(--cyan-glow); }
.home-card-btn--gram { border-color: #dc2743; color: #f7779b; background: rgba(220,39,67,0.1); }
.home-card-btn--gram:hover { background: linear-gradient(45deg, #f09433, #dc2743); color: #fff; border-color: transparent; }
.home-card-btn--book { border-color: var(--fb-blue); color: #6eb3ff; background: rgba(24,119,242,0.1); }
.home-card-btn--book:hover { background: var(--fb-blue); color: #fff; }
.home-card-btn--tok { border-color: var(--tiktok-cyan); color: var(--tiktok-cyan); background: rgba(37,244,238,0.08); }
.home-card-btn--tok:hover { background: linear-gradient(135deg, var(--tiktok-cyan), var(--tiktok-red)); color: #fff; border-color: transparent; }
.home-card-btn--chat { border-color: var(--snap-yellow); color: var(--snap-yellow); background: rgba(255,252,0,0.08); }
.home-card-btn--chat:hover { background: var(--snap-yellow); color: #000; }
.home-card-btn--lock { border-color: #8b5cf6; color: #a78bfa; background: rgba(99,102,241,0.1); }
.home-card-btn--lock:hover { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-color: transparent; }
.home-card-btn--gallery { border-color: #7c3aed; color: #c4b5fd; background: rgba(124,58,237,0.1); }
.home-card-btn--gallery:hover { background: linear-gradient(135deg, #7c3aed, #4c1d95); color: #fff; border-color: transparent; }

.panel-hint {
  text-align: center; font-size: 13px; color: var(--text-muted); max-width: 560px; line-height: 1.5; margin-bottom: 8px;
}
.panel-hint kbd {
  background: rgba(0,212,255,0.12); border: 1px solid var(--card-border);
  padding: 2px 6px; border-radius: 4px; font-size: 11px; color: var(--cyan);
}

/* ===== SHARED POST CARD ===== */
.post-card {
  position: relative;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
.post-card.dark-theme { background: var(--darkGrey); color: var(--white); }

.clickableImg { cursor: pointer; transition: 0.2s ease; }
.clickableImg:hover { opacity: 0.88; transform: scale(1.005); }
.mention { color: var(--mentions); font-weight: 500; }
.post-card.dark-theme .mention { color: var(--blue); }
.bold { font-weight: 700; }
.italic { font-style: italic; }

.editable { outline: none; cursor: text; word-break: break-word; }
.editable:focus { outline: none; }

.menuWrapper { position: absolute; right: 8px; top: 8px; z-index: 10; }
.iconBtn {
  background: none; border: none; cursor: pointer; padding: 8px;
  border-radius: 50%; transition: 0.15s; color: var(--grey);
}
.iconBtn:hover { background: rgba(0,0,0,0.06); }
.dropdownMenu {
  position: absolute; top: 40px; right: 0;
  background: var(--white); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  display: none; flex-direction: column; min-width: 220px; padding: 6px 0; z-index: 1000;
}
.post-card.dark-theme .dropdownMenu { background: #1a1a1a; color: var(--white); }
.dropdownMenu button {
  padding: 12px 16px; font-size: 14px; border: none; background: none;
  text-align: left; cursor: pointer; width: 100%; color: inherit;
}
.dropdownMenu button:hover { background: rgba(0,0,0,0.06); }
.dropdownMenu button.active { color: var(--btnActive); font-weight: bold; }

.exportBtnWrap { display: flex; justify-content: center; margin-top: 4px; }
.exportBtn {
  font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; font-size: 14px;
  padding: 12px 28px; border-radius: 12px; border: 1px solid var(--cyan);
  background: rgba(0, 212, 255, 0.12); color: var(--cyan); cursor: pointer;
  transition: all 0.2s;
}
.exportBtn:hover { background: var(--cyan); color: #041018; box-shadow: 0 0 24px var(--cyan-glow); }

/* ===== CRIPTWEET ===== */
#tweet {
  width: 600px; max-width: 95%; border-radius: 16px; padding: 16px;
}
#reposted {
  display: flex; align-items: center; gap: 6px; font-size: 15px;
  color: var(--grey); margin-bottom: 6px; margin-left: 58px;
}
.repostIcon { display: flex; align-items: center; }
#repostName { font-weight: 600; }
.tweet-header { display: flex; align-items: center; }
#profilePic {
  width: 50px; height: 50px; border-radius: 10%; margin-right: 10px;
}
.tweet-name { font-weight: bold; font-size: 18px; }
.tweet-handle { color: var(--grey); margin-left: -2px; }
#verified { display: inline; margin-left: 2px; vertical-align: middle; }
#tweetText { margin-top: 20px; font-size: 15px; line-height: 1.5; min-height: 40px; }
#tweetImage { width: 100%; display: block; margin: 0; border-radius: 0; }
.tweet-image-wrap {
  margin-top: 12px; border-radius: 16px; overflow: hidden;
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 480px;
  background: #0a0a0a;
}
.tweet-image-wrap #tweetImage {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.tweet-meta { margin-top: 10px; color: var(--grey); font-size: 14px; }
.tweet-stats {
  display: flex; justify-content: space-around; align-items: center;
  margin-top: 12px; color: var(--grey);
  border-top: 1px solid var(--grey); border-bottom: 1px solid var(--grey); padding: 4px 0;
}
.tweet-stats span { cursor: text; display: flex; align-items: center; gap: 4px; }
.tweet-stats span.react-stat { cursor: pointer; user-select: none; }
.tweet-stats span.react-stat:hover { opacity: 0.75; }
.tweet-stats span.react-stat.active { color: var(--closeBtn); }
.tweet-stats span.react-stat.active svg { color: var(--closeBtn); }
.tweet-stats svg { vertical-align: middle; }
#likeIcon { cursor: pointer; }
.post-card.dark-theme .tweet-stats { border-color: #333; }

/* ===== CRIPGRAM ===== */
.gram-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#gramPost, #gramStory { border-radius: 4px; overflow: hidden; }

#gramPost {
  width: 470px; max-width: 95%; border: 1px solid #dbdbdb;
}
.post-card.dark-theme#gramPost { border-color: #363636; }
#gramPost .mention, #gramStory .mention { color: var(--ig-blue); }
#fbPost .mention { color: var(--fb-blue); }
#tiktokPost .mention { color: var(--tiktok-cyan); }

.gram-header {
  display: flex; align-items: center; padding: 14px 16px; gap: 12px;
}
.gram-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
}
.gram-userline { flex: 1; min-width: 0; }
.gram-username { font-weight: 600; font-size: 14px; }
.gram-location { font-size: 12px; color: var(--grey); }
.gram-header .menuWrapper { display: none; }

#gramImage { width: 100%; aspect-ratio: 1; display: block; background: #fafafa; object-fit: cover; }
.gram-image-wrap { width: 100%; aspect-ratio: 1; overflow: hidden; position: relative; background: #fafafa; }
.gram-image-wrap #gramImage { width: 100%; height: 100%; aspect-ratio: unset; object-fit: cover; display: block; }
.post-card.dark-theme .gram-image-wrap { background: #1a1a1a; }
.post-card.dark-theme #gramImage { background: #1a1a1a; }

.gram-actions {
  display: flex; align-items: center; padding: 8px 16px 0; gap: 14px;
}
.gram-actions svg { cursor: pointer; transition: 0.15s; }
.gram-actions svg.react-icon:hover { opacity: 0.6; }
.gram-actions svg:hover { opacity: 0.6; }
.gram-actions .spacer { flex: 1; }
.gram-likes { padding: 6px 16px; font-weight: 600; font-size: 14px; }
.gram-caption { padding: 0 16px 8px; font-size: 14px; line-height: 1.45; }
.gram-caption .cap-user { font-weight: 600; margin-right: 4px; }
.gram-time { padding: 0 16px 14px; font-size: 10px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.3px; }

#gramStory {
  width: 390px; max-width: 95%; height: 844px;
  background: #000; border-radius: 28px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 24px 64px rgba(0,0,0,0.5);
}
.story-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}

.story-progress-wrap {
  position: absolute; top: 50px; left: 8px; right: 8px; z-index: 4;
}
.story-progress { display: flex; gap: 4px; }
.story-progress span { flex: 1; height: 2px; background: rgba(255,255,255,0.35); border-radius: 2px; }
.story-progress span.active { background: #fff; }

.story-header-row {
  position: absolute; top: 62px; left: 0; right: 0; z-index: 4;
  padding: 8px 12px; display: flex; align-items: center; gap: 10px;
}
.story-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.3); flex-shrink: 0;
}
.story-user-block { flex: 1; min-width: 0; }
.story-username {
  color: #fff; font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5); line-height: 1.2;
}
.story-sponsored {
  color: rgba(255,255,255,0.85); font-size: 11px; font-weight: 400;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5); margin-top: 1px;
}
.story-sponsored.hidden { display: none; }
.story-top-icons {
  display: flex; align-items: center; gap: 16px;
  color: #fff; font-size: 20px; font-weight: 300; flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.story-bubble {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
  z-index: 4; width: 78%; max-width: 300px;
  background: #fff; border-radius: 22px; padding: 16px 20px;
  color: #000; font-size: 16px; font-weight: 700; line-height: 1.35;
  text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.story-bubble.hidden { display: none; }

.story-bottom-area {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 4;
  padding: 0 16px 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 100%);
}
.story-cta {
  width: 100%; max-width: 340px; background: #fff; color: #000;
  font-size: 15px; font-weight: 600; text-align: center;
  padding: 14px 20px; border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.story-cta.hidden { display: none; }

.story-send-bar {
  width: 100%; max-width: 340px;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: text; min-height: 44px;
}
.story-send-bar.hidden { display: none; }
.story-send-input {
  flex: 1; min-width: 0; color: #fff; font-size: 16px; font-weight: 400;
  letter-spacing: -0.2px; outline: none; line-height: 1.3;
  white-space: nowrap; overflow: hidden;
}
.story-send-input:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}
.story-send-icon {
  flex-shrink: 0; color: #fff; display: flex; align-items: center;
  pointer-events: none;
}
.story-send-icon svg { display: block; }

#gramStory .device-bottom-chrome {
  position: relative; background: none; padding: 0 0 10px; width: 100%;
}
/* ===== CRIPBOOK ===== */
#fbPost {
  width: 500px; max-width: 95%; border-radius: 8px; padding: 12px 16px 0;
}
.fb-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
#fbProfilePic { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.fb-meta { flex: 1; min-width: 0; }
.fb-name { font-weight: 600; font-size: 15px; color: #050505; }
.post-card.dark-theme .fb-name { color: var(--white); }
.fb-subline { font-size: 13px; color: #65676B; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fb-subline i { font-size: 11px; }
#fbText { font-size: 15px; line-height: 1.45; margin-bottom: 12px; min-height: 24px; }
.fb-images {
  width: calc(100% + 32px); margin-left: -16px;
  display: grid; gap: 2px; background: #ced0d4; overflow: hidden;
}
.fb-images-1 { grid-template-columns: 1fr; }
.fb-images-1 .fb-img-cell { aspect-ratio: 16 / 10; max-height: 500px; }
.fb-images-2 { grid-template-columns: 1fr 1fr; }
.fb-images-2 .fb-img-cell { aspect-ratio: 1; }
.fb-images-3 { grid-template-columns: 1fr 1fr; }
.fb-images-3 .fb-img-cell:first-child { grid-row: span 2; aspect-ratio: 1 / 2; }
.fb-images-3 .fb-img-cell:not(:first-child) { aspect-ratio: 1; }
.fb-images-4 { grid-template-columns: 1fr 1fr; }
.fb-images-4 .fb-img-cell { aspect-ratio: 1; }
.fb-img-cell {
  position: relative;
  overflow: hidden;
  background: #e4e6eb;
  cursor: pointer;
  width: 100%;
  min-height: 120px;
}
.fb-img-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.fb-img-cell .fb-img-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #65676b; font-size: 13px; pointer-events: none;
}
.fb-reactions-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; margin-top: 10px; border-top: 1px solid #CED0D4;
  font-size: 13px; color: #65676B;
}
.post-card.dark-theme .fb-reactions-bar { border-color: #3e4042; color: #b0b3b8; }
.fb-react-icons { display: flex; align-items: center; gap: 0; }
.fb-react-emoji {
  width: 18px; height: 18px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px;
  margin-right: -4px; border: 2px solid var(--white);
  cursor: pointer; transition: transform 0.15s, opacity 0.15s;
  user-select: none;
}
.fb-react-emoji:hover { transform: scale(1.12); }
.fb-react-emoji.hidden { display: none !important; }
.post-card.dark-theme .fb-react-emoji { border-color: var(--darkGrey); }
.fb-react-count {
  margin-left: 8px; font-size: 13px; color: inherit;
  white-space: nowrap; display: inline-block; line-height: 1.2;
  outline: none; min-width: 1ch;
}

.fb-action-row {
  display: flex; border-top: 1px solid #CED0D4; padding: 4px 0 8px;
}
.post-card.dark-theme .fb-action-row { border-color: #3e4042; }
.fb-action {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px; font-size: 15px; font-weight: 600;
  color: #65676B; cursor: pointer; user-select: none;
  transition: color 0.15s, background 0.15s; border-radius: 6px;
}
.fb-action:hover { background: rgba(0,0,0,0.04); }
.fb-action.like-action.active { color: var(--fb-blue); }
.fb-action.like-action.active i { color: var(--fb-blue); }
.post-card.dark-theme .fb-action:hover { background: rgba(255,255,255,0.06); }
.post-card.dark-theme .fb-action { color: #b0b3b8; }
.fb-action i { font-size: 18px; }
.fb-action.like-action i { color: var(--fb-blue); }

/* ===== CRIPTOK ===== */
#tiktokPost {
  width: 390px; max-width: 95%; height: 844px;
  border-radius: 28px; overflow: hidden;
  background: #000; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 24px 64px rgba(0,0,0,0.55);
}
#tiktokPost::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 130px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  z-index: 2; pointer-events: none;
}
#tiktokPost::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.45) 35%, rgba(0,0,0,0.12) 65%, transparent 100%);
  z-index: 2; pointer-events: none;
}
.tok-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tok-video-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: rgba(255,255,255,0.5); font-size: 13px; cursor: pointer;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f0f 100%);
}
.tok-video-placeholder i { font-size: 42px; opacity: 0.4; }
.tok-top-bar {
  position: absolute; top: 50px; left: 0; right: 0; padding: 8px 16px;
  display: flex; justify-content: center; gap: 20px; z-index: 3;
  background: none;
}
.tok-tab { color: rgba(255,255,255,0.55); font-size: 16px; font-weight: 600; }
.tok-tab.active { color: #fff; border-bottom: 2px solid #fff; padding-bottom: 2px; }
.tok-sidebar {
  position: absolute; right: 8px; bottom: 120px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.tok-side-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tok-side-avatar {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff;
  object-fit: cover; margin-bottom: 4px;
}
.tok-side-item svg, .tok-side-item i { color: #fff; font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.tok-side-count { color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.tok-bottom {
  position: absolute; bottom: 34px; left: 0; right: 62px;
  padding: 0 14px 6px; z-index: 3; background: none;
}
.device-frame.no-device #tiktokPost .tok-bottom { bottom: 18px; }
#tiktokPost .device-bottom-chrome {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: none; padding-bottom: 6px; z-index: 4;
}
.device-frame.no-device #tiktokPost .device-bottom-chrome { display: none; }
.tok-username { color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 8px; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
#tokCaption {
  color: #fff; font-size: 15px; line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9); margin-bottom: 12px;
  max-height: 4.2em; overflow: hidden;
}
.tok-music {
  display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}
.tok-music i { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tok-disc {
  position: absolute; bottom: 36px; right: 8px; width: 48px; height: 48px;
  border-radius: 50%; background: #222; border: 8px solid #111;
  overflow: hidden; z-index: 3; animation: spin 4s linear infinite;
  cursor: pointer; transition: transform 0.15s, opacity 0.15s;
}
.tok-disc:hover { opacity: 0.9; transform: scale(1.06); }
body.is-exporting .tok-disc { animation: none; }
.tok-disc img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ===== CRIPCHAT (SNAPCHAT) ===== */
.chat-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#snapStory, #snapChat {
  width: 390px; max-width: 95%; height: 844px;
  border-radius: 28px; overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 24px 64px rgba(0,0,0,0.55);
}

/* --- Story viewer --- */
#snapStory { background: #000; }
.snap-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.snap-story-progress {
  position: absolute; top: 50px; left: 8px; right: 8px; z-index: 4;
  display: flex; gap: 4px;
}
.snap-story-progress span {
  flex: 1; height: 2.5px; border-radius: 2px;
  background: rgba(255,255,255,0.35);
}
.snap-story-progress span.done { background: #fff; }
.snap-story-progress span.active {
  background: linear-gradient(90deg, #fff 65%, rgba(255,255,255,0.35) 65%);
}
.snap-top {
  position: absolute; top: 62px; left: 0; right: 0; padding: 8px 12px;
  display: flex; align-items: center; gap: 8px; z-index: 4;
}
.snap-back { color: #fff; font-size: 22px; font-weight: 300; line-height: 1; padding: 4px 6px; }
.snap-story-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; flex-shrink: 0;
}
.snap-top-user {
  flex: 1; color: #fff; font-weight: 600; font-size: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.snap-story-time { font-weight: 400; opacity: 0.85; font-size: 13px; }
.snap-top-actions { display: flex; gap: 16px; color: #fff; font-size: 18px; }
.snap-story-footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px 14px 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
  pointer-events: none;
}
.snap-story-footer > * { pointer-events: auto; }
.snap-caption-bar {
  color: #fff; font-size: 15px; line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
  max-height: 100px; overflow: hidden; word-break: break-word;
}
.snap-bottom-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 8px;
}
#snapStory .device-bottom-chrome {
  position: relative; bottom: auto; left: auto; right: auto;
  background: none; padding: 0 0 6px;
}
.device-frame.no-device .snap-story-footer {
  padding-bottom: 14px;
}
.device-frame.no-device #snapStory .device-bottom-chrome {
  display: none;
}
.snap-reply {
  flex: 1; border: 1.5px solid rgba(255,255,255,0.55); border-radius: 24px;
  padding: 11px 18px; color: rgba(255,255,255,0.85); font-size: 15px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.snap-send-btn {
  width: 38px; height: 38px; border-radius: 50%; background: var(--snap-yellow);
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 15px; flex-shrink: 0;
}

/* --- Chat thread --- */
#snapChat {
  background: #fff; color: #000;
  display: flex; flex-direction: column;
  height: 844px; min-height: 844px;
}
#snapChat .device-statusbar { position: relative; pointer-events: none; }
.snap-chat-header {
  flex-shrink: 0; height: 52px; padding: 0 14px 0 6px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff; z-index: 3;
}
.snap-chat-back {
  color: #000; font-size: 28px; font-weight: 300; line-height: 1;
  padding: 2px 6px 2px 2px; flex-shrink: 0;
}
.snap-chat-avatar-wrap { position: relative; flex-shrink: 0; }
.snap-chat-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block;
}
.snap-online-dot {
  position: absolute; bottom: 0; right: 0; width: 10px; height: 10px;
  background: #00c853; border: 2px solid #fff; border-radius: 50%;
}
.snap-chat-title-block { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.snap-chat-name {
  font-weight: 600; font-size: 16px; letter-spacing: -0.2px; line-height: 1.2;
}
.snap-chat-sub { font-size: 12px; color: #8e8e93; font-weight: 400; line-height: 1.2; }
.snap-chat-actions {
  display: flex; align-items: center; gap: 20px; flex-shrink: 0;
  color: #000; font-size: 20px;
}
.snap-chat-actions svg { display: block; }
.snap-chat-body {
  flex: 1 1 auto; padding: 10px 14px 8px; overflow: hidden;
  background: #f7f7f8; display: flex; flex-direction: column; gap: 0; min-height: 0;
}
.snap-chat-footer {
  flex-shrink: 0; margin-top: auto; width: 100%;
}
.snap-chat-input {
  flex-shrink: 0; height: 56px; padding: 8px 12px 10px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid rgba(0,0,0,0.06); background: #fff;
}
#snapChat .device-bottom-chrome {
  position: relative; bottom: auto; left: auto; right: auto;
  background: #fff; padding: 0 0 6px;
}
.device-frame.no-device #snapChat .device-bottom-chrome {
  display: none;
}
.device-frame.no-device .snap-chat-input {
  padding-bottom: 14px;
}
.snap-chat-messages {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding-top: 4px; min-height: 0;
}
.snap-chat-date {
  align-self: center; font-size: 12px; color: #8e8e93; font-weight: 500;
  margin: 4px 0 8px; letter-spacing: -0.1px; flex-shrink: 0;
}
.snap-msg-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.snap-msg-row.snap-msg-sent { align-items: flex-end; }
.snap-msg-received { margin-bottom: 4px; }
.snap-text-bubble {
  max-width: 78%; padding: 10px 14px; background: #e9e9eb;
  border-radius: 18px; font-size: 15px; line-height: 1.35; color: #000;
  letter-spacing: -0.1px; word-break: break-word;
}
.snap-text-bubble.snap-sent {
  background: #0096ff; color: #fff;
}
.snap-text-bubble:focus { outline: 2px solid rgba(0,150,255,0.35); outline-offset: 1px; }
.snap-msg-status { font-size: 11px; color: #8e8e93; margin-left: 4px; margin-top: 2px; }
.snap-bubble {
  width: 220px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  align-self: flex-start;
}
.snap-bubble-media {
  position: relative; width: 220px; height: 280px;
  background: #1a1a1a; overflow: hidden;
}
.snap-unopened {
  width: 100%; height: 100%; display: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
}
.snap-unopened.visible { display: flex; }
.snap-unopened.photo { background: #ff0039; }
.snap-unopened.video { background: #af007f; }
.snap-unopened-label {
  color: rgba(255,255,255,0.95); font-size: 14px; font-weight: 600;
  letter-spacing: -0.2px;
}
.snap-preview-wrap {
  position: absolute; inset: 0; display: none;
}
.snap-preview-wrap.visible { display: block; background: linear-gradient(145deg, #4a5568 0%, #1a202c 100%); }
.snap-preview-wrap.visible img[src]:not([src=""]) { background: none; }
.snap-preview-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.snap-preview-hint {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25); color: #fff;
  font-size: 13px; font-weight: 500; opacity: 0;
  transition: opacity 0.15s; pointer-events: none;
}
.snap-preview-wrap:hover .snap-preview-hint { opacity: 1; pointer-events: auto; cursor: pointer; }
.snap-bubble-bar {
  height: 34px; padding: 0 10px; background: #000;
  display: flex; align-items: center; gap: 7px;
}
.snap-replay-icon {
  width: 20px; height: 20px; flex-shrink: 0;
}
.snap-bubble-label {
  color: #fff; font-size: 12px; font-weight: 500; letter-spacing: -0.1px;
}
.snap-cam-btn {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--snap-yellow, #FFFC00);
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 15px;
}
.snap-input-field {
  flex: 1; height: 38px; background: #f2f2f7;
  border-radius: 19px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; min-width: 0;
}
.snap-input-text {
  flex: 1; min-width: 0; font-size: 15px; line-height: 38px; color: #000;
  outline: none; white-space: nowrap; overflow: hidden;
}
.snap-input-text:empty::before {
  content: attr(data-placeholder);
  color: #8e8e93; pointer-events: none;
}
.snap-input-icons { display: flex; align-items: center; gap: 12px; color: #8e8e93; font-size: 17px; flex-shrink: 0; }
#snapChat .mention { color: #000; font-weight: 600; }

/* Snapchat dark theme */
#snapStory.dark-theme .snap-reply { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.65); }
#snapChat.dark-theme {
  background: #0e0e0e; color: #fff;
}
#snapChat.dark-theme .device-statusbar {
  background: #0e0e0e; color: #fff;
}
#snapChat.dark-theme .snap-chat-header {
  background: #0e0e0e; border-bottom-color: rgba(255,255,255,0.08);
}
#snapChat.dark-theme .snap-chat-back,
#snapChat.dark-theme .snap-chat-name,
#snapChat.dark-theme .snap-chat-actions { color: #fff; }
#snapChat.dark-theme .snap-chat-sub { color: #8e8e93; }
#snapChat.dark-theme .snap-online-dot { border-color: #0e0e0e; }
#snapChat.dark-theme .snap-chat-body { background: #000; }
#snapChat.dark-theme .snap-text-bubble { background: #3a3a3c; color: #fff; }
#snapChat.dark-theme .snap-text-bubble.snap-sent { background: #0096ff; color: #fff; }
#snapChat.dark-theme .snap-msg-status { color: #8e8e93; }
#snapChat.dark-theme .snap-chat-input {
  background: #0e0e0e; border-top-color: rgba(255,255,255,0.08);
}
#snapChat.dark-theme .snap-chat-footer .device-bottom-chrome { background: #0e0e0e; }
#snapChat.dark-theme .snap-input-field { background: #2c2c2e; }
#snapChat.dark-theme .snap-input-text { color: #fff; }
#snapChat.dark-theme .snap-input-text:empty::before { color: #8e8e93; }
#snapChat.dark-theme .snap-input-icons { color: #8e8e93; }
#snapChat.dark-theme .device-bottom-chrome { background: #0e0e0e; }
#snapChat.dark-theme .device-home-indicator { background: #fff; opacity: 0.35; }
#snapChat.dark-theme .mention { color: #fff; }

/* ===== NPC GALLERY (NumberPlateCreator) ===== */
.npc-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#npcGalleryCard {
  width: 340px; max-width: 95%;
  background: linear-gradient(165deg, #1a1428 0%, var(--npc-card) 55%, #0c0814 100%);
  border: 1px solid var(--npc-card-border);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 0 32px rgba(124,58,237,0.12);
  font-family: var(--font); color: #fff; position: relative;
}
.npc-img-wrap {
  position: relative; width: 100%; aspect-ratio: 4/3;
  background: #0a0610; overflow: hidden;
}
#npcGalleryImg {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.npc-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 10px; font-weight: 800; letter-spacing: 0.6px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--cyan); color: #041018;
  box-shadow: 0 2px 8px rgba(0,212,255,0.35);
}
.npc-expand {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85); font-size: 13px;
}
.npc-body { padding: 16px 16px 14px; }
.npc-title {
  font-size: 17px; font-weight: 700; line-height: 1.25;
  margin-bottom: 4px; color: #fff;
}
.npc-credit {
  font-size: 12px; color: #9b8ab8; margin-bottom: 14px; line-height: 1.4;
}
.npc-socials {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.npc-socials.hidden { display: none; }
.npc-social {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(20, 14, 32, 0.8);
  display: flex; align-items: center; justify-content: center;
  color: #b8a4d4; font-size: 15px;
}
.npc-like-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--npc-like);
  background: rgba(20, 14, 32, 0.6);
  width: fit-content; min-width: 72px;
}
.npc-like-bar svg { color: var(--npc-like); flex-shrink: 0; cursor: pointer; }
.npc-like-count { font-size: 14px; font-weight: 600; color: #f0e6ff; min-width: 12px; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: none; justify-content: center; align-items: flex-start;
  z-index: 9999; overflow-y: auto; padding: 40px 16px;
}
.modal-overlay.flex { display: flex; }
.modal-box {
  background: linear-gradient(165deg, rgba(6, 22, 48, 0.97) 0%, rgba(5, 10, 20, 0.99) 100%);
  border: 1px solid var(--card-border);
  color: #fff; width: 680px; max-width: 95%; max-height: 88vh;
  overflow-y: auto; padding: 0; border-radius: 16px;
  position: relative; animation: pop 0.2s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 212, 255, 0.08);
}
.help-header {
  padding: 28px 28px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(0, 80, 160, 0.25), transparent);
}
.help-header h2 { font-family: 'Rajdhani', sans-serif; font-size: 26px; margin-bottom: 6px; }
.help-header p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.help-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.help-tab {
  font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
  padding: 8px 14px; border-radius: 8px 8px 0 0; border: none;
  background: transparent; color: var(--text-muted); cursor: pointer; transition: 0.2s;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.help-tab:hover { color: var(--text-primary); }
.help-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); background: rgba(0,212,255,0.06); }
.help-body { padding: 20px 24px 28px; }
.help-panel { display: none; }
.help-panel.active { display: block; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 560px) { .help-grid { grid-template-columns: 1fr; } }
.shortcut-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  font-size: 13px; color: rgba(255,255,255,0.85);
}
.shortcut-row kbd {
  background: rgba(0,212,255,0.15); border: 1px solid rgba(0,212,255,0.3);
  padding: 3px 8px; border-radius: 5px; font-size: 11px; color: var(--cyan);
  font-family: inherit; white-space: nowrap;
}
.instruction-item { padding: 14px 16px; margin: 8px 0; border-radius: 10px; }
.instruction-item h3 { margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.instruction-item p { font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.82); margin: 0; }
.green { border-left: 3px solid var(--green); background: rgba(52,173,0,0.1); }
.blue { border-left: 3px solid var(--cyan); background: rgba(0,212,255,0.07); }
.yellow { border-left: 3px solid var(--yellow); background: rgba(255,216,0,0.08); }
.purple { border-left: 3px solid #bc1888; background: rgba(188,24,136,0.08); }
.closeModal {
  position: absolute; top: 18px; right: 22px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06); font-size: 16px;
  cursor: pointer; color: rgba(255,255,255,0.7); z-index: 2;
}
.closeModal:hover { color: #fff; background: rgba(245,0,0,0.25); border-color: var(--closeBtn); }

#exportModal { backdrop-filter: blur(8px); align-items: center; }
.exportBox {
  background: linear-gradient(240deg, rgba(0,100,180,0.95), rgba(5,10,20,0.98));
  border: 1px solid var(--card-border);
  padding: 24px; border-radius: 14px; width: 520px; max-width: 92%;
  max-height: 90vh; overflow-y: auto; text-align: center; animation: pop 0.2s ease;
}
.exportBox h3 { font-family: 'Rajdhani', sans-serif; font-size: 22px; margin-bottom: 12px; color: #fff; }
.exportBox img { width: 100%; border-radius: 10px; margin: 12px 0; }
.exportActions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.exportActions button {
  flex: 1; padding: 12px; border-radius: 10px; border: none; cursor: pointer;
  font-weight: 600; font-size: 14px; transition: 0.2s; min-width: 120px;
}
.exportActions button.export-gif-btn {
  background: linear-gradient(135deg, var(--tiktok-cyan), var(--tiktok-red));
  border-color: transparent; color: #fff;
}
.exportActions button.export-gif-btn:hover { filter: brightness(1.08); }
.exportActions button.export-gif-btn:disabled { opacity: 0.55; cursor: wait; }
#confirmExport { background: var(--cyan); color: #041018; }
#confirmExport:hover { box-shadow: 0 0 20px var(--cyan-glow); }
#cancelExport { background: rgba(255,255,255,0.12); color: #fff; }
#cancelExport:hover { background: rgba(255,255,255,0.2); }

.footer {
  margin-top: 32px; text-align: center; font-size: 13px; color: var(--text-muted);
}
.footer a { color: var(--cyan); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

body::-webkit-scrollbar, .modal-box::-webkit-scrollbar, .exportBox::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-thumb, .modal-box::-webkit-scrollbar-thumb, .exportBox::-webkit-scrollbar-thumb {
  background: linear-gradient(240deg, var(--cyan), rgba(0,0,0,0.5)); border-radius: 10px;
}

@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== CRIPLOCK — iPhone 14 & Samsung A54 lock screens ===== */
.lock-wrap {
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
#lockScreen {
  width: 390px; max-width: 95%; height: 844px;
  border-radius: 36px; overflow: hidden; position: relative;
  background: #0a0818; color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06), 0 24px 48px rgba(0,0,0,0.45);
  display: flex; flex-direction: column;
}
.lock-wallpaper-wrap {
  position: absolute; inset: 0; z-index: 1; cursor: pointer;
  background: linear-gradient(145deg, #1a3a6e 0%, #4a2d7a 38%, #c96b4a 72%, #2a4a8a 100%);
}
.lock-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.lock-frame > .device-statusbar,
.lock-frame > .lock-android-top,
.lock-frame > .lock-content,
.lock-frame > .lock-bottom,
.lock-frame > .lock-android-camera,
.lock-frame > .lock-swipe-hint {
  pointer-events: none;
}
.lock-frame .editable,
.lock-frame .device-clock {
  pointer-events: auto;
}
.lock-frame .device-statusbar,
.lock-frame .lock-android-top,
.lock-frame .lock-content,
.lock-frame .lock-bottom,
.lock-frame .lock-android-camera {
  position: relative; z-index: 2;
}
.lock-frame .lock-swipe-hint {
  position: absolute; z-index: 4;
}
.lock-frame.android .lock-ios-only,
.lock-frame.android .lock-ios-bar { display: none !important; }
.lock-frame:not(.android) .lock-android-only { display: none !important; }
.lock-frame.android .lock-android-top { display: flex; }
.lock-frame.android .lock-android-camera { display: block; }
.lock-frame.android .lock-date.lock-android-only { display: block; }
.lock-frame.android .lock-notif-row { display: flex; }
.lock-frame.android .lock-shortcut.lock-android-only { display: flex; }
.lock-frame.android .lock-swipe-hint { display: block; }
.lock-frame:not(.android) .lock-shortcut.lock-ios-only { display: flex; }
.lock-android-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px 0; font-size: 12px; font-weight: 400;
  font-family: Roboto, "Segoe UI", sans-serif; letter-spacing: -0.1px;
  pointer-events: none;
}
.lock-carrier, .lock-battery-pct { pointer-events: auto; }
.lock-android-top-icons {
  display: flex; align-items: center; gap: 5px;
}
.lock-android-top-icons svg { display: block; flex-shrink: 0; }
.lock-android-camera {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 11px; height: 11px; border-radius: 50%; z-index: 4;
  background: radial-gradient(circle at 35% 35%, #1a1a2e, #050508 70%);
  box-shadow: inset 0 0 1px rgba(255,255,255,0.12);
  pointer-events: none;
}
.lock-content {
  display: flex; flex-direction: column; align-items: center;
  flex: 1 1 auto; min-height: 0;
  padding-top: 72px; text-align: center;
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
.lock-frame.android .lock-content { padding-top: 88px; }
.lock-date {
  font-size: 20px; font-weight: 500; letter-spacing: -0.3px;
  margin-bottom: 6px; opacity: 0.95;
}
.lock-frame.android .lock-date { font-size: 18px; font-weight: 400; margin-bottom: 4px; }
.lock-clock {
  font-size: 96px; font-weight: 700; line-height: 1;
  letter-spacing: -4px; font-variant-numeric: tabular-nums;
}
.lock-frame:not(.android) .lock-clock {
  font-size: 102px; font-weight: 700; letter-spacing: -5px;
}
.lock-frame.android .lock-clock {
  font-size: 96px; font-weight: 200; letter-spacing: -4px;
  font-family: Roboto, "Segoe UI", sans-serif;
}
.lock-notif-row {
  display: none; align-items: center; gap: 14px;
  margin-top: 28px; opacity: 0.92;
}
.lock-notif-icon {
  font-size: 15px; opacity: 0.9;
}
.lock-notif-more {
  font-size: 12px; font-weight: 500; padding: 4px 10px;
  border-radius: 12px; background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}
.lock-bottom {
  position: absolute; left: 0; right: 0; bottom: 32px;
  flex-shrink: 0; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; z-index: 2;
}
.lock-frame.android .lock-bottom { bottom: 46px; }
.lock-shortcut {
  width: 50px; height: 50px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(120,120,128,0.36); backdrop-filter: blur(20px);
  color: #fff; font-size: 20px;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.lock-shortcut.lock-shortcut-right { display: flex; }
.lock-frame:not(.android) .lock-shortcut.lock-shortcut-right { display: flex; }
.lock-frame.android .lock-shortcut.lock-shortcut-right { display: flex; }
.lock-frame.android .lock-shortcut {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(0,0,0,0.28); backdrop-filter: blur(12px);
  font-size: 18px;
}
.lock-shortcut svg { display: block; }
.lock-swipe-hint {
  display: none; position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%); z-index: 4;
  font-size: 13px; font-weight: 400; opacity: 0.85;
  font-family: Roboto, "Segoe UI", sans-serif;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  pointer-events: auto;
}
.lock-frame .device-bottom-chrome {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, transparent 100%);
  pointer-events: none;
}
.lock-frame.no-device .lock-bottom { bottom: 20px; }
.lock-frame.no-device .lock-swipe-hint { bottom: 8px; }
.lock-frame.no-device .device-bottom-chrome { display: none !important; }

/* html2canvas export fixes — pointer-events & backdrop-filter break capture */
body.is-exporting .lock-frame > .device-statusbar,
body.is-exporting .lock-frame > .lock-android-top,
body.is-exporting .lock-frame > .lock-content,
body.is-exporting .lock-frame > .lock-bottom,
body.is-exporting .lock-frame > .lock-android-camera,
body.is-exporting .lock-frame > .lock-swipe-hint {
  pointer-events: auto !important;
}
body.is-exporting .lock-wallpaper-wrap {
  z-index: 0 !important;
}
body.is-exporting .lock-shortcut {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(72,72,80,0.78) !important;
}
body.is-exporting .lock-frame.android .lock-shortcut {
  background: rgba(0,0,0,0.52) !important;
}
body.is-exporting .lock-notif-more {
  backdrop-filter: none !important;
  background: rgba(255,255,255,0.3) !important;
}
body.is-exporting .lock-frame:not(.android) .lock-shortcut.lock-ios-only,
body.is-exporting .lock-frame.android .lock-shortcut.lock-android-only {
  display: flex !important;
}
body.is-exporting .lock-frame.android .lock-swipe-hint {
  display: block !important;
}
body.is-exporting .lock-frame .device-bottom-chrome {
  display: flex !important;
}
body.is-exporting .lock-frame.no-device .device-bottom-chrome {
  display: none !important;
}

@media (max-width: 600px) {
  .logo-section h1 { font-size: 22px; }
  .tab-btn { padding: 8px 12px; font-size: 13px; }
}