/* ========================================================
   Locket Web - Modern iOS Style Stylesheet
   ======================================================== */

:root {
  --bg-primary: #0b0c0e;
  --bg-secondary: #14161a;
  --bg-tertiary: #1c1e24;
  --bg-card: rgba(26, 28, 35, 0.85);
  --bg-card-hover: rgba(36, 39, 48, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 204, 0, 0.4);

  --text-primary: #ffffff;
  --text-secondary: #9ba1ad;
  --text-muted: #646a78;

  --accent-yellow: #ffcc00;
  --accent-yellow-hover: #e6b800;
  --accent-yellow-light: rgba(255, 204, 0, 0.15);
  --accent-red: #ff3b30;
  --accent-green: #34c759;
  --accent-blue: #007aff;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(255, 204, 0, 0.25);
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s ease;
}

/* Custom Themes */
[data-theme="purple"] {
  --bg-primary: #0d0a14;
  --bg-secondary: #161224;
  --bg-tertiary: #201a33;
  --bg-card: rgba(28, 22, 45, 0.85);
  --accent-yellow: #a855f7;
  --accent-yellow-hover: #9333ea;
  --accent-yellow-light: rgba(168, 85, 247, 0.2);
}
[data-theme="blue"] {
  --bg-primary: #070e17;
  --bg-secondary: #0c1827;
  --bg-tertiary: #13243a;
  --bg-card: rgba(15, 30, 48, 0.85);
  --accent-yellow: #38bdf8;
  --accent-yellow-hover: #0ea5e9;
  --accent-yellow-light: rgba(56, 189, 248, 0.2);
}
[data-theme="pink"] {
  --bg-primary: #140a10;
  --bg-secondary: #22121c;
  --bg-tertiary: #301927;
  --bg-card: rgba(40, 20, 33, 0.85);
  --accent-yellow: #f43f5e;
  --accent-yellow-hover: #e11d48;
  --accent-yellow-light: rgba(244, 63, 94, 0.2);
}
[data-theme="amoled"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #141414;
  --bg-card: #000000;
  --border-subtle: rgba(255, 255, 255, 0.15);
  --accent-yellow: #ffcc00;
  --accent-yellow-hover: #e6b800;
  --accent-yellow-light: rgba(255, 204, 0, 0.2);
}
[data-theme="gold-luxury"] {
  --bg-primary: #070709;
  --bg-secondary: #131218;
  --bg-tertiary: #1d1a24;
  --bg-card: rgba(23, 20, 30, 0.92);
  --border-subtle: rgba(255, 215, 0, 0.35);
  --border-focus: #ffd700;
  --accent-yellow: #ffd700;
  --accent-yellow-hover: #ffb700;
  --accent-yellow-light: rgba(255, 215, 0, 0.25);
  --shadow-glow: 0 0 24px rgba(255, 215, 0, 0.35);
}
[data-theme="cyber-vip"] {
  --bg-primary: #050814;
  --bg-secondary: #0a1026;
  --bg-tertiary: #121b3b;
  --bg-card: rgba(12, 18, 42, 0.92);
  --border-subtle: rgba(0, 242, 254, 0.35);
  --border-focus: #00f2fe;
  --accent-yellow: #00f2fe;
  --accent-yellow-hover: #00d2ff;
  --accent-yellow-light: rgba(0, 242, 254, 0.2);
  --shadow-glow: 0 0 26px rgba(0, 242, 254, 0.4);
}
[data-theme="emerald-vip"] {
  --bg-primary: #04100b;
  --bg-secondary: #091d14;
  --bg-tertiary: #102e20;
  --bg-card: rgba(11, 32, 22, 0.92);
  --border-subtle: rgba(16, 185, 129, 0.38);
  --border-focus: #10b981;
  --accent-yellow: #10b981;
  --accent-yellow-hover: #059669;
  --accent-yellow-light: rgba(16, 185, 129, 0.22);
  --shadow-glow: 0 0 26px rgba(16, 185, 129, 0.38);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Utilities */
.hidden { display: none !important; }
.text-yellow { color: var(--accent-yellow); }
.text-danger { color: var(--accent-red); }
.text-success { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background-color: var(--accent-yellow);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.25);
}
.btn-primary:hover {
  background-color: var(--accent-yellow-hover);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.35);
}
.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-danger {
  background-color: rgba(255, 59, 48, 0.15);
  color: var(--accent-red);
  border-color: rgba(255, 59, 48, 0.3);
}
.btn-danger:hover {
  background-color: var(--accent-red);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}
.btn-block {
  width: 100%;
}
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: rgba(26, 28, 35, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-yellow);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  font-size: 14px;
}
.toast.toast-error {
  border-left-color: var(--accent-red);
}
.toast.toast-success {
  border-left-color: var(--accent-green);
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  padding-left: 260px;
  box-sizing: border-box;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  padding: 24px 16px;
  flex-shrink: 0;
  z-index: 100;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.locket-mini-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #ffcc00 0%, #ff9500 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.35);
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand-tag {
  font-size: 11px;
  color: var(--accent-yellow);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}
.nav-item i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}
.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.15) 0%, rgba(255, 149, 0, 0.1) 100%);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 204, 0, 0.25);
}

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}
.sidebar-footer .btn-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.current-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: visible;
  padding: 4px 2px;
  cursor: pointer;
}
.user-avatar-sm {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--accent-yellow);
}
.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding-right: 4px;
}
.user-name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
  overflow: visible;
}
.user-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}
.user-name .admin-blue-tick {
  flex-shrink: 0;
  margin-left: 0;
  font-size: 14px;
}
.sidebar-vip-crown {
  flex-shrink: 0;
  color: #ffd700 !important;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.55));
}
.user-handle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.mobile-header, .mobile-nav-bar {
  display: none;
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}
.tab-pane.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Header */
.feed-header, .friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}
.feed-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.filter-select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

/* Feed Grid */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}
.feed-loading, .chat-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 14px;
}

/* Moment Card */
.moment-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}
.moment-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}
.moment-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.moment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-tertiary);
  border: 2px solid rgba(255, 204, 0, 0.4);
}
.author-info {
  display: flex;
  flex-direction: column;
}
.author-name {
  font-size: 15px;
  font-weight: 700;
}
.moment-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Moment Media */
.moment-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.moment-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Locket Overlay Pill */
.locket-overlay {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 10;
  text-align: center;
}
.overlay-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.overlay-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  word-break: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Moment Footer & Actions */
.moment-footer {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quick-reactions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}
.reaction-emoji-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-full);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reaction-emoji-btn:hover {
  transform: scale(1.35);
}
.moment-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}
.views-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  transition: background var(--transition-fast);
}
.views-pill:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* POST STUDIO */
.post-studio {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.preview-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 24px;
  width: 100%;
  max-width: 350px;
}
.phone-frame {
  width: 340px;
  min-height: 490px;
  height: auto;
  background: #0b0c10;
  border-radius: 44px;
  border: 7px solid #282a32;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 16px;
}
.phone-notch {
  width: 92px;
  height: 20px;
  background: #1c1e24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin: 0 auto;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}
.phone-screen {
  flex: 1;
  position: relative;
  width: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  overflow: visible;
}
.phone-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 0;
  font-size: 11px;
  font-weight: 700;
  color: #e5e7eb;
}
.phone-time {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.phone-recipient-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 165px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.phone-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #e5e7eb;
}
.locket-square-stage {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  background-color: #14161b;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 4px 0;
}
.phone-fake-reply {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 7px 12px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.phone-fake-emojis {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 10px;
  border-radius: var(--radius-full);
}
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
  padding: 24px;
  font-size: 13px;
}
.preview-placeholder i {
  font-size: 40px;
  color: var(--accent-yellow);
}
.preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-media.fit-contain {
  object-fit: contain;
  background-color: #000;
}
.preview-hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Controls Column */
.controls-column {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.controls-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: clip;
}
.controls-card h3 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 26px 18px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all var(--transition-normal);
  min-width: 0;
  width: 100%;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-yellow);
  background-color: rgba(255, 204, 0, 0.04);
}
.upload-icon-circle {
  width: 56px;
  height: 56px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent-yellow);
  margin-bottom: 12px;
}
.upload-zone h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.upload-zone p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.selected-file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-align: left;
  min-width: 0;
}
.selected-file-info .file-icon {
  font-size: 24px;
  color: var(--accent-yellow);
  flex-shrink: 0;
}
.selected-file-info .file-details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.selected-file-info .file-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.selected-file-info .file-size {
  font-size: 12px;
  color: var(--text-muted);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.form-group label .text-muted,
.form-group label #caption-count,
.form-group label .label-action,
.form-group label .badge {
  margin-left: auto;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-select,
.form-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
input[type="text"], input[type="email"], input[type="password"], .form-select {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, .form-select:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.15);
}

/* Custom Style Switch */
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}
.switch-label input {
  display: none;
}
.slider {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  background-color: var(--bg-tertiary);
  border-radius: 24px;
  transition: .3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}
.switch-label input:checked + .slider {
  background-color: var(--accent-yellow);
}
.switch-label input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #000;
}

.custom-colors-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-width: 0;
}
.color-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.color-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.color-item label {
  font-size: 12px;
  color: var(--text-muted);
}
.color-item input[type="color"] {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  padding: 2px;
}

/* Recipients */
.recipients-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.friends-checklist-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.friends-checklist-tools input {
  flex: 1 1 160px;
  padding: 8px 12px;
  font-size: 13px;
}
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.friends-checklist {
  max-height: 160px;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.friend-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.friend-check-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Progress Box */
.progress-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--accent-yellow);
}
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff9500);
  transition: width 0.3s ease;
}

/* CHAT TAB */
.chat-container {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: calc(100vh - 120px);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.chat-sidebar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  min-width: 0;
}
.chat-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.conversations-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}
.conv-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
.conv-item.active {
  background-color: rgba(255, 204, 0, 0.1);
  border-left: 3px solid var(--accent-yellow);
}
.conv-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-tertiary);
}
.conv-details {
  flex: 1;
  overflow: hidden;
}
.conv-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.conv-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.conv-time {
  font-size: 11px;
  color: var(--text-muted);
}
.conv-snippet {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Chat Main */
.chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  background-color: rgba(20, 22, 26, 0.6);
}
.chat-peer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-tertiary);
}
.chat-messages-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-no-selected {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 65%;
}
.msg-bubble-wrap.me {
  align-self: flex-end;
  align-items: flex-end;
}
.msg-bubble-wrap.other {
  align-self: flex-start;
  align-items: flex-start;
}
.msg-bubble {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.msg-bubble-wrap.me .msg-bubble {
  background-color: var(--accent-yellow);
  color: #000;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.msg-bubble-wrap.other .msg-bubble {
  background-color: var(--bg-tertiary);
  color: #fff;
  border-bottom-left-radius: 4px;
}
.msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}
.chat-input-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
  background-color: rgba(20, 22, 26, 0.8);
}
.chat-input-bar input {
  flex: 1;
}

/* FRIENDS TAB */
.add-friend-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.add-friend-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.icon-bubble {
  width: 48px;
  height: 48px;
  background: var(--accent-yellow-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent-yellow);
}
.add-friend-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 280px;
  justify-content: flex-end;
}
.add-friend-form input {
  flex: 1 1 200px;
  min-width: 0;
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
}
.search-wrap i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}
.search-wrap input {
  padding-left: 38px;
  width: 280px;
  max-width: 100%;
}
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.friend-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-fast);
}
.friend-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.friend-card-avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--accent-yellow);
}
.friend-card-info {
  flex: 1;
  overflow: hidden;
}
.friend-card-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.friend-card-handle {
  font-size: 13px;
  color: var(--text-muted);
}
.friend-card-actions {
  display: flex;
  gap: 6px;
}

/* PROFILE TAB */
.profile-container {
  max-width: 680px;
  margin: 0 auto;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.profile-banner {
  height: 140px;
  background: linear-gradient(135deg, #1f2229 0%, #2f3440 100%);
  position: relative;
}
.profile-avatar-wrapper {
  position: absolute;
  bottom: -40px;
  left: 32px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--bg-secondary);
  background-color: var(--bg-tertiary);
}
.avatar-change-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  background: var(--accent-yellow);
  color: #000;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-secondary);
  font-size: 14px;
  transition: transform 0.2s;
}
.avatar-change-badge:hover {
  transform: scale(1.1);
}
.profile-body {
  padding: 56px 32px 32px 32px;
}
.profile-handle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.profile-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.badge-gold {
  background-color: var(--accent-yellow-light);
  color: var(--accent-yellow);
}
.badge-gray {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}
.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.col {
  flex: 1 1 200px;
  min-width: 0;
}
.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 10px;
}
.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* AUTH SCREEN */
.auth-screen {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}
.locket-logo-circle {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #ffcc00 0%, #ff9500 100%);
  border-radius: 20px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #000;
  box-shadow: 0 8px 24px rgba(255, 149, 0, 0.4);
}
.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input {
  width: 100%;
}
.password-wrapper .btn-icon {
  position: absolute;
  right: 10px;
}
.error-banner {
  background-color: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: var(--accent-red);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
}
.auth-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  margin-top: 8px;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.modal-box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: scaleUp 0.2s ease;
}
@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 20px;
  max-height: 380px;
  overflow-y: auto;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 204, 0, 0.2);
  border-top-color: var(--accent-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Camera Modal Styles */
.camera-modal-box {
  max-width: 440px;
  background: #000;
}
.camera-controls-bar {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 20px;
  z-index: 10;
}
.camera-action-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
}
.snapshot-shutter-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent-yellow);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.snapshot-shutter-btn:active {
  transform: scale(0.9);
  background: var(--accent-yellow);
}

/* Lightbox */
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.lightbox-video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  outline: none;
}

/* ================= STORIES BAR & STORY VIEWER ================= */
.stories-section {
  margin-bottom: 24px;
}
.stories-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.stories-bar::-webkit-scrollbar {
  height: 4px;
}
.story-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  width: 76px;
  transition: transform var(--transition-fast);
}
.story-circle-item:hover {
  transform: translateY(-2px);
}
.story-avatar-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(45deg, #ffcc00, #ff9500, #ff3b30);
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-avatar-ring.seen {
  background: var(--bg-tertiary);
}
.story-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-primary);
}
.story-user-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
  text-align: center;
}

/* Story Viewer Modal */
.story-viewer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-viewer-box {
  width: 100%;
  max-width: 440px;
  height: 92vh;
  max-height: 850px;
  background: #000;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Progress Segments */
.story-progress-segments {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 5px;
  z-index: 30;
}
.story-segment {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}
.story-segment-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width linear;
}
.story-segment-fill.completed {
  width: 100%;
}

/* Story Author Header */
.story-author-header {
  position: absolute;
  top: 24px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
}
.story-author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.story-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-yellow);
}
.story-author-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: block;
}
.story-time-ago {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}
.story-top-actions {
  display: flex;
  gap: 4px;
}

/* Story Stage & Media */
.story-media-stage {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.story-media-item {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.story-touch-left, .story-touch-right {
  position: absolute;
  top: 60px;
  bottom: 120px;
  width: 50%;
  z-index: 20;
  cursor: pointer;
}
.story-touch-left { left: 0; }
.story-touch-right { right: 0; }

/* Floating Reactions */
.story-floating-reactions {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 25;
}
.floating-emoji {
  position: absolute;
  bottom: 80px;
  font-size: 36px;
  animation: floatUp 1.8s ease-out forwards;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.6); opacity: 1; }
  50% { transform: translateY(-160px) scale(1.2) rotate(10deg); opacity: 0.9; }
  100% { transform: translateY(-340px) scale(1.4) rotate(-15deg); opacity: 0; }
}

/* Story Footer */
.story-footer {
  padding: 14px 18px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
}
.story-quick-reactions {
  display: flex;
  justify-content: space-between;
}
.story-reaction-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.story-reaction-btn:hover {
  transform: scale(1.35);
}
.story-reply-row {
  display: flex;
  gap: 10px;
}
.story-reply-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: 13px;
}
.story-reply-row input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Comment row on moment cards */
.moment-comment-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.moment-comment-input {
  flex: 1;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}
.moment-comment-input:focus {
  border-color: var(--accent-yellow);
}

/* ================= PHOTO FILTERS & STICKERS ================= */
.filters-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.filter-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
}

/* Image Filter Effects */
.filter-vintage {
  filter: sepia(0.35) contrast(1.15) brightness(0.95) saturate(1.2);
}
.filter-cyberpunk {
  filter: contrast(1.3) saturate(1.6) hue-rotate(-15deg);
}
.filter-bw {
  filter: grayscale(1) contrast(1.35) brightness(0.95);
}
.filter-sunset {
  filter: sepia(0.25) saturate(1.5) hue-rotate(-20deg) brightness(1.05);
}
.filter-cold {
  filter: saturate(1.1) hue-rotate(180deg) brightness(0.95) contrast(1.1);
}

/* Quick Stickers Row */
.quick-stickers-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sticker-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sticker-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* Music Sticker Badge */
.music-sticker-badge {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 15;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  max-width: 85%;
}
.vinyl-disc {
  font-size: 20px;
  display: inline-block;
  animation: spinDisc 3s linear infinite;
}
@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.music-info-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}
.music-song {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.music-artist {
  font-size: 11px;
  color: var(--accent-yellow);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.sound-waves {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.sound-waves span {
  width: 3px;
  background: var(--accent-yellow);
  border-radius: 2px;
  animation: soundWave 0.8s ease-in-out infinite alternate;
}
.sound-waves span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.sound-waves span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.sound-waves span:nth-child(3) { height: 9px; animation-delay: 0.2s; }
.sound-waves span:nth-child(4) { height: 12px; animation-delay: 0.4s; }
@keyframes soundWave {
  0% { height: 4px; }
  100% { height: 14px; }
}

/* Stats Overview */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-yellow);
}
.stat-title {
  font-size: 12px;
  color: var(--text-muted);
}

/* Top Friends Leaderboard */
.top-friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.top-friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
}
.top-friend-rank {
  font-size: 16px;
  font-weight: 800;
  width: 28px;
  color: var(--text-muted);
}
.top-friend-rank.rank-1 { color: #ffd700; }
.top-friend-rank.rank-2 { color: #c0c0c0; }
.top-friend-rank.rank-3 { color: #cd7f32; }
.top-friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.top-friend-meta {
  flex: 1;
}
.top-friend-name {
  font-size: 14px;
  font-weight: 700;
}
.top-friend-score {
  font-size: 12px;
  color: var(--accent-yellow);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .post-studio {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
  }
  .phone-frame {
    width: 300px;
    min-height: 450px;
    height: auto;
  }
  .main-content {
    padding: 24px 20px;
  }
  .controls-card {
    padding: 24px 20px;
  }
}

@media (max-width: 960px) {
  .post-studio {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .preview-column {
    position: static;
    max-width: 100%;
    margin-bottom: 8px;
  }
  .chat-container {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .app-layout {
    padding-left: 0;
  }
  .sidebar {
    display: none;
  }
  .main-content {
    width: 100%;
    padding: 16px;
    padding-bottom: 80px;
  }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    margin: -16px -16px 20px -16px;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
  }
  .mobile-nav-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(20, 22, 26, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
  }
  .mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }
  .mobile-nav-item i {
    font-size: 18px;
  }
  .mobile-nav-item.active {
    color: var(--accent-yellow);
  }
  .feed-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MEGA FEATURE UPGRADES: SEARCH, POLAROID, SLIDESHOW, WIDGET SIMULATOR
   ========================================================================== */

/* 1. Feed Toolbar & Smart Filter */
.feed-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.feed-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.search-input-wrap i.fa-magnifying-glass {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 38px 10px 38px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input-wrap input:focus {
  border-color: var(--accent-yellow);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

.feed-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Streak Pill */
.streak-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.18), rgba(255, 204, 0, 0.28));
  border: 1px solid rgba(255, 149, 0, 0.45);
  border-radius: 20px;
  font-weight: 700;
  color: #ff9500;
  font-size: 13px;
  user-select: none;
  cursor: default;
  box-shadow: 0 0 12px rgba(255, 149, 0, 0.2);
}

.streak-fire {
  font-size: 15px;
  animation: flameFlicker 1.5s infinite alternate ease-in-out;
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.15) rotate(4deg); }
}

/* Quick Filter Chips */
.filter-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-chips-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--accent-yellow);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-yellow);
}

/* Moment Card Action Buttons */
.btn-fav-star {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s, transform 0.2s;
  padding: 4px;
}

.btn-fav-star:hover {
  color: #ffd700;
  transform: scale(1.15);
}

.btn-fav-star.active {
  color: #ffd700;
}

/* 2. Polaroid Keepsake Exporter Modal */
.polaroid-modal-box {
  max-width: 540px;
}

.polaroid-preview-container {
  background: #111316;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

#polaroid-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}

.polaroid-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.polaroid-control-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.polaroid-themes-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.frame-style-btn {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.frame-style-btn:hover {
  border-color: var(--accent-yellow);
}

.frame-style-btn.active {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  background: rgba(255, 204, 0, 0.12);
}

.polaroid-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* 3. Cinematic Slideshow Modal */
.slideshow-backdrop {
  position: fixed;
  inset: 0;
  background: #060709;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  user-select: none;
}

.slideshow-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  width: 100%;
  position: relative;
  z-index: 20;
}

.slideshow-progress-fill {
  height: 100%;
  background: var(--accent-yellow);
  width: 0%;
  transition: width 0.1s linear;
}

.slideshow-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

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

.slideshow-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-yellow);
}

.slideshow-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: block;
}

.slideshow-time-ago {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.slideshow-top-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slideshow-top-controls .btn-icon {
  color: #fff;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.12);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.slideshow-top-controls .btn-icon:hover {
  background: rgba(255, 255, 255, 0.25);
}

.slideshow-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slideshow-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 30;
  transition: all var(--transition-fast);
}

.slideshow-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.slideshow-nav-btn.prev { left: 24px; }
.slideshow-nav-btn.next { right: 24px; }

.slideshow-media-box {
  width: 90vw;
  max-width: 540px;
  aspect-ratio: 1/1;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ken-burns {
  animation: kenBurnsZoom 9s ease-in-out infinite alternate;
}

@keyframes kenBurnsZoom {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.07) translate(-1%, -1%); }
  100% { transform: scale(1.04) translate(1%, 1%); }
}

.slideshow-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.slideshow-counter {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

/* 4. iOS Widget Simulator Modal */
.widget-sim-modal-box {
  max-width: 480px;
}

.widget-size-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.widget-size-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.widget-size-btn:hover {
  border-color: var(--accent-yellow);
}

.widget-size-btn.active {
  background: var(--accent-yellow);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-yellow);
}

.iphone-homescreen-frame {
  background: linear-gradient(135deg, #182848, #4b6cb7);
  border-radius: 38px;
  padding: 16px 18px 24px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  border: 4px solid #2a2e38;
  margin: 10px auto 16px auto;
  width: 100%;
  max-width: 340px;
}

.ios-status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  padding: 0 8px;
}

.ios-status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
}

.ios-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 20px;
}

.ios-locket-widget {
  background: #000;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ios-locket-widget.widget-size-small {
  grid-column: span 2;
  aspect-ratio: 1/1;
}

.ios-locket-widget.widget-size-medium {
  grid-column: span 4;
  aspect-ratio: 2.1/1;
}

.ios-locket-widget.widget-size-large {
  grid-column: span 4;
  aspect-ratio: 1/1;
}

.widget-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.widget-meta-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.widget-author-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  padding: 2px 8px 2px 3px;
  border-radius: 12px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.widget-avatar-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.widget-time {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  padding: 2px 6px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 9.5px;
  font-weight: 600;
}

.widget-caption-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 10px;
  color: #fff;
  font-size: 10.5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ios-app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.app-icon-squircle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.messages-icon { background: linear-gradient(135deg, #34c759, #30d158); }
.photos-icon { background: linear-gradient(135deg, #ff9500, #ff2d55); }
.camera-icon { background: linear-gradient(135deg, #8e8e93, #636366); }
.music-icon { background: linear-gradient(135deg, #fa2d48, #fb5f78); }

.app-label {
  font-size: 10px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.ios-dock {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  border-radius: 26px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.dock-app {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.phone-dock { background: linear-gradient(135deg, #34c759, #30d158); }
.safari-dock { background: linear-gradient(135deg, #007aff, #5856d6); }
.mail-dock { background: linear-gradient(135deg, #007aff, #34aadc); }
.music-dock { background: linear-gradient(135deg, #fa2d48, #fb5f78); }

/* ==========================================================================
   MEGA UPDATE 2: MEMORIES CALENDAR, DOODLE STUDIO, MUSIC SEARCH, QR PASS
   ========================================================================== */

/* 1. Memories Calendar Tab */
.memories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.calendar-nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-month-display {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  min-width: 140px;
  text-align: center;
}

.monthly-recap-banner {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.12), rgba(255, 149, 0, 0.06));
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.recap-stat {
  display: flex;
  flex-direction: column;
}

.recap-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-yellow);
}

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

.calendar-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.calendar-day-cell {
  aspect-ratio: 1/1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.calendar-day-cell:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-2px);
}

.calendar-day-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.calendar-day-cell.today {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.25);
}

.day-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 2;
}

.calendar-day-cell.has-moments {
  background-size: cover !important;
  background-position: center !important;
}

.calendar-day-cell.has-moments::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.2s;
}

.calendar-day-cell.has-moments:hover::before {
  background: rgba(0, 0, 0, 0.15);
}

.day-moments-count {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--accent-yellow);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.day-moments-section {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.day-moments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.day-moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* 2. Doodle Studio (Drawing on Photo) */
.doodle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  cursor: crosshair;
  touch-action: none;
}

.doodle-toolbar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.doodle-colors-picker {
  display: flex;
  gap: 8px;
  align-items: center;
}

.doodle-color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
}

.doodle-color-btn.active {
  transform: scale(1.3);
  border-color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.doodle-brush-sizes {
  display: flex;
  gap: 6px;
}

.brush-size-btn {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.brush-size-btn.active {
  background: var(--accent-yellow);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-yellow);
}

.doodle-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

/* 3. iTunes Smart Music Search & 30s Audio Preview */
.music-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #181a1f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  margin-top: 4px;
}

.music-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.music-search-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.music-search-art {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.music-search-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.music-search-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.music-search-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 4. Locket Friend QR Code Pass Modal */
.qr-modal-box {
  max-width: 420px;
}

.qr-card-pass {
  background: linear-gradient(145deg, #1b1c20, #0d0e11);
  border: 2px solid #ffd700;
  border-radius: 26px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.qr-card-pass::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.qr-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.qr-pass-badge {
  background: linear-gradient(135deg, #ffd700, #ff9500);
  color: #000;
  font-weight: 800;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.qr-avatar-wrap {
  margin-bottom: 16px;
}

.qr-avatar-wrap img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #ffd700;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.3);
}

.qr-avatar-wrap h4 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.qr-code-display {
  background: #ffffff;
  padding: 14px;
  border-radius: 18px;
  display: inline-block;
  margin: 0 auto 14px auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#qr-canvas {
  display: block;
}

.qr-scan-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.qr-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ==========================================================================
   MEGA UPDATE 3: LOCKET GOLD VIP MEMBERSHIP SUITE
   ========================================================================== */

/* ================= Admin Verified Blue Tick ================= */
.admin-blue-tick {
  color: #0084ff !important;
  font-size: 14.5px;
  vertical-align: middle;
  margin-left: 4px;
  filter: drop-shadow(0 0 6px rgba(0, 132, 255, 0.7));
  display: inline-flex;
  align-items: center;
}

.badge-admin-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #0066ff, #00c6ff);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1.5px 6.5px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.55);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-admin-verified i {
  font-size: 10px;
}

.badge-admin {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.22), rgba(0, 198, 255, 0.16)) !important;
  color: #00c6ff !important;
  border: 1px solid rgba(0, 198, 255, 0.5) !important;
  box-shadow: 0 0 12px rgba(0, 198, 255, 0.35) !important;
  font-weight: 800 !important;
}

.admin-avatar-ring {
  box-shadow: 0 0 0 2.5px #0084ff, 0 0 16px rgba(0, 132, 255, 0.7) !important;
}

/* ================= Smart Photo Auto-Formatter ================= */
.landscape-formatter-card {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.08), rgba(0, 114, 255, 0.06));
  border: 1px solid rgba(255, 204, 0, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.formatter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  width: 100%;
}

.badge-auto-fit {
  background: linear-gradient(135deg, #0070f3, #00dfd8);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.formatter-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.formatter-modes-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.format-mode-btn {
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.format-mode-btn:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-1px);
}

.format-mode-btn.active {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.vip-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ffd700, #ff9500);
  color: #000;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}

.vip-crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.4);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
}

.vip-avatar-glow {
  border: 2.5px solid #ffd700 !important;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5), inset 0 0 8px rgba(255, 215, 0, 0.3) !important;
  animation: vipGlowPulse 2.5s infinite alternate ease-in-out;
}

@keyframes vipGlowPulse {
  0% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }
  100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.85); }
}

.btn-gold {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000 !important;
  font-weight: 800;
  border: none;
  box-shadow: 0 4px 18px rgba(255, 215, 0, 0.35);
  transition: all var(--transition-fast);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.55);
}

/* 3D Locket Gold VIP Member Card */
.vip-gold-card-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  perspective: 1000px;
}

.vip-gold-card {
  position: relative;
  background: linear-gradient(135deg, #1f1b0a 0%, #2f270d 45%, #161408 100%);
  border: 2px solid rgba(255, 215, 0, 0.7);
  border-radius: 22px;
  padding: 24px 26px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 215, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vip-gold-card:hover {
  transform: translateY(-4px) rotateX(4deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 215, 0, 0.35);
}

.vip-card-shine {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(60deg, transparent 40%, rgba(255, 215, 0, 0.16) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: vipCardShineAnim 6s infinite linear;
  pointer-events: none;
}

@keyframes vipCardShineAnim {
  0% { transform: translateY(-70%) rotate(25deg); }
  100% { transform: translateY(70%) rotate(25deg); }
}

.vip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.vip-brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.8px;
}

.vip-status-pill {
  background: rgba(255, 215, 0, 0.18);
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.vip-card-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 10px 0;
  z-index: 2;
}

.chip-metal {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #d4af37, #f7e28b, #aa820a);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.chip-contactless {
  font-size: 18px;
  color: rgba(255, 215, 0, 0.7);
  transform: rotate(90deg);
}

.vip-card-number {
  font-family: "Courier New", Courier, monospace;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 12px;
  z-index: 2;
}

.vip-card-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  padding-top: 10px;
  z-index: 2;
}

.vip-card-label {
  font-size: 9px;
  color: #8b8a92;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.vip-card-val {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

/* VIP Privileges Section */
.vip-privileges-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.vip-privileges-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vip-privilege-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vip-privilege-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-secondary);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.vip-privilege-item i {
  font-size: 18px;
  margin-top: 2px;
}

.vip-privilege-item strong {
  font-size: 13.5px;
  color: #fff;
  display: block;
  margin-bottom: 2px;
}

.vip-privilege-item p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.vip-card-actions {
  margin-top: 16px;
}

/* Moment card VIP HD button */
.btn-vip-download-hd {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 149, 0, 0.12)) !important;
  border: 1px solid rgba(255, 215, 0, 0.4) !important;
  color: #ffd700 !important;
  font-weight: 700 !important;
}

.btn-vip-download-hd:hover {
  background: linear-gradient(135deg, #ffd700, #ffaa00) !important;
  color: #000 !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* Studio VIP Filter classes */
.filter-gold-luxury {
  filter: sepia(0.35) saturate(1.8) brightness(1.05) contrast(1.15) hue-rotate(-10deg) !important;
}

.filter-emerald {
  filter: saturate(1.5) contrast(1.1) hue-rotate(65deg) !important;
}

.vip-chip {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 149, 0, 0.08)) !important;
  border-color: rgba(255, 215, 0, 0.4) !important;
  color: #ffd700 !important;
  font-weight: 700 !important;
}

.vip-filter-pill {
  border-color: rgba(255, 215, 0, 0.4) !important;
}

/* ==========================================================================
   MEGA UPDATE 4: AUTHENTIC 1:1 STAGE, FILTERS, FRAMES, COLLAGE & MOSAIC FEED
   ========================================================================== */

#locket-square-stage .music-sticker-badge {
  top: 14px;
}

#locket-square-stage .locket-overlay {
  bottom: 14px;
  padding: 8px 16px;
}

.filter-peach {
  filter: sepia(0.12) saturate(1.35) brightness(1.06) contrast(1.05) hue-rotate(-8deg);
}

.filter-kodak {
  filter: sepia(0.22) contrast(1.18) saturate(1.28) brightness(1.02);
}

/* Frame Selector Pills */
.frame-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.frame-pill:hover, .frame-pill.active {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
}

/* Live Decorative Frame Overlay on Square Stage */
.preview-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  box-sizing: border-box;
}

.preview-frame-overlay.frame-vip-gold {
  border: 8px solid #ffd700;
  border-radius: 30px;
  box-shadow: inset 0 0 22px rgba(255, 215, 0, 0.55);
}

.preview-frame-overlay.frame-vip-gold::before {
  content: "✦ LOCKET VIP ✦";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffd700, #ff9500);
  color: #000;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 2px 10px;
  border-radius: 10px;
}

.preview-frame-overlay.frame-camcorder {
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
}

.preview-frame-overlay.frame-camcorder::before {
  content: "● REC";
  position: absolute;
  top: 14px;
  left: 16px;
  color: #ff3b30;
  font-family: "Courier New", monospace;
  font-weight: 900;
  font-size: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.preview-frame-overlay.frame-camcorder::after {
  content: attr(data-timestamp);
  position: absolute;
  bottom: 14px;
  right: 16px;
  color: #ff9500;
  font-family: "Courier New", monospace;
  font-weight: 800;
  font-size: 11px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.preview-frame-overlay.frame-polaroid-mini {
  border: 14px solid #ffffff;
  border-bottom-width: 34px;
  border-radius: 30px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.preview-frame-overlay.frame-polaroid-mini::after {
  content: "Locket · " attr(data-timestamp);
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: #181a1f;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.preview-frame-overlay.frame-timestamp::after {
  content: attr(data-timestamp);
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #ffd700;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

/* Smart Caption Quick Tools */
.smart-caption-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.smart-cap-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.smart-cap-btn:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  background: rgba(255, 204, 0, 0.08);
}

/* Compact Mosaic Feed View */
.feed-grid.compact-mosaic {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.feed-grid.compact-mosaic .moment-card {
  border-radius: var(--radius-lg);
}

.feed-grid.compact-mosaic .moment-header {
  padding: 10px 12px;
}

.feed-grid.compact-mosaic .author-avatar {
  width: 30px;
  height: 30px;
}

.feed-grid.compact-mosaic .moment-footer {
  display: none;
}

/* Double-Click Heart Burst Animation */
.dblclick-heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  font-size: 72px;
  pointer-events: none;
  z-index: 20;
  filter: drop-shadow(0 8px 24px rgba(255, 45, 85, 0.75));
  animation: heartBurstPop 0.85s ease forwards;
}

@keyframes heartBurstPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  65% { opacity: 1; transform: translate(-50%, -56%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -72%) scale(1.35); }
}

/* Collage Maker Modal */
.collage-modal-box {
  max-width: 780px;
  width: 94vw;
}

.collage-modal-body {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.collage-preview-wrap {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  background: #0b0c0e;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

#collage-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.collage-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.collage-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.collage-opt-btn,
.collage-bg-btn {
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.collage-opt-btn.active,
.collage-bg-btn.active {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
}

@media (max-width: 780px) {
  .collage-modal-body {
    grid-template-columns: 1fr;
  }
  .phone-frame {
    width: 100%;
    max-width: 340px;
  }
}

/* ==========================================================================
   MEGA UPDATE 5: LOCKET GOLD SUPREME VIP EXPANSION & AURAS
   ========================================================================== */

/* VIP Avatar Auras */
.aura-rainbow {
  border: 2.5px solid transparent !important;
  background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), conic-gradient(from 0deg, #ff2d55, #ffcc00, #34c759, #00f2fe, #a855f7, #ff2d55);
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.55) !important;
  animation: auraRainbowPulse 3s linear infinite !important;
}

.aura-emerald {
  border: 2.5px solid #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.65), inset 0 0 8px rgba(16, 185, 129, 0.3) !important;
  animation: none !important;
}

.aura-ice {
  border: 2.5px solid #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.7), inset 0 0 8px rgba(224, 242, 254, 0.35) !important;
  animation: none !important;
}

@keyframes auraRainbowPulse {
  0% { box-shadow: 0 0 14px rgba(255, 45, 85, 0.55); }
  50% { box-shadow: 0 0 22px rgba(0, 242, 254, 0.7); }
  100% { box-shadow: 0 0 14px rgba(255, 45, 85, 0.55); }
}

/* New Live VIP Frames & Watermark */
.preview-frame-overlay.frame-neon-cyber {
  border: 5px solid #00f2fe;
  border-radius: 30px;
  box-shadow: inset 0 0 22px rgba(0, 242, 254, 0.55), inset 0 0 0 2px rgba(168, 85, 247, 0.75);
}

.preview-frame-overlay.frame-neon-cyber::before {
  content: "⚡ CYBER VIP · " attr(data-timestamp);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #00f2fe, #a855f7);
  color: #050814;
  font-size: 9.5px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.preview-frame-overlay.frame-cinema-vip {
  border-top: 34px solid #050507;
  border-bottom: 34px solid #050507;
  border-radius: 30px;
}

.preview-frame-overlay.frame-cinema-vip::before {
  content: "🎬 CINEMA LOCKET VIP";
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffd700;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  white-space: nowrap;
}

.preview-frame-overlay.frame-cinema-vip::after {
  content: attr(data-timestamp);
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.preview-vip-watermark {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.92), rgba(255, 149, 0, 0.92));
  color: #000;
  font-size: 9.5px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.4px;
  z-index: 9;
  pointer-events: none;
}

/* VIP Studio Pro Image Enhancer Card */
.vip-studio-pro-box {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 149, 0, 0.04));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.vip-studio-pro-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vip-studio-pro-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffd700;
  flex-wrap: wrap;
}

.vip-studio-pro-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vip-toggle-pill {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--text-primary);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.vip-toggle-pill:hover,
.vip-toggle-pill.active {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.vip-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.vip-slider-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vip-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.vip-slider-item input[type="range"] {
  width: 100%;
  accent-color: #ffd700;
  cursor: pointer;
}

/* VIP Super Reaction Burst */
.vip-combo-react-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 149, 0, 0.2)) !important;
  border: 1px solid rgba(255, 215, 0, 0.55) !important;
  color: #ffd700 !important;
  font-size: 13px !important;
  font-weight: 800;
  padding: 4px 9px !important;
  border-radius: var(--radius-full) !important;
}

.vip-combo-react-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.vip-floating-particle {
  position: absolute;
  bottom: 18px;
  font-size: 26px;
  pointer-events: none;
  z-index: 30;
  animation: vipFloatUp 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes vipFloatUp {
  0% { opacity: 0; transform: translateY(0) scale(0.5) rotate(0deg); }
  20% { opacity: 1; transform: translateY(-30px) scale(1.2) rotate(-10deg); }
  100% { opacity: 0; transform: translateY(-220px) scale(0.95) rotate(18deg); }
}

/* VIP Customization Console in Profile */
.vip-customizer-console {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 215, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vip-customizer-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-console-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.vip-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vip-opt-pill,
.vip-theme-pill,
.vip-title-preset-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.vip-opt-pill:hover,
.vip-opt-pill.active,
.vip-theme-pill:hover,
.vip-theme-pill.active,
.vip-title-preset-btn:hover {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  border-color: #ffd700;
  font-weight: 700;
}

.vip-title-editor-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vip-title-editor-row input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

/* Chat VIP Quick Replies Bar */
.chat-vip-quick-bar {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  overflow-x: auto;
  border-top: 1px solid var(--border-subtle);
  background: rgba(20, 22, 26, 0.65);
  scrollbar-width: thin;
}

.chat-vip-chip {
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffd700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.chat-vip-chip:hover {
  background: #ffd700;
  color: #000;
  transform: translateY(-1px);
}

/* ================= ADMIN-GRANTED VIP GATE & CONTROL PANEL ================= */
.vip-locked-gate-box {
  background: linear-gradient(145deg, rgba(22, 20, 14, 0.92), rgba(14, 15, 19, 0.96));
  border: 1.5px dashed rgba(255, 215, 0, 0.45);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.vip-locked-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vip-locked-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.vip-locked-header h4 {
  margin: 0 0 4px 0;
  color: #ffd700;
  font-size: 16px;
}

.vip-locked-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.vip-locked-identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.vip-redeem-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.vip-redeem-row input {
  flex: 1 1 240px;
  min-width: 0;
}

/* Exclusive Root Admin VIP Control Panel */
.admin-vip-manager-panel {
  margin-top: 18px;
  background: linear-gradient(155deg, rgba(10, 22, 36, 0.94), rgba(16, 18, 26, 0.96));
  border: 1px solid rgba(0, 198, 255, 0.45);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 30px rgba(0, 150, 255, 0.12);
}

.admin-vip-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-vip-panel-header h4 {
  margin: 0 0 4px 0;
  color: #4dd2ff;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-vip-panel-header p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.admin-vip-grant-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: center;
}

.admin-generated-code-box {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-code-label {
  font-size: 12px;
  color: #ffd700;
  font-weight: 700;
}

.admin-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-code-row code {
  flex: 1 1 200px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-vip-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.admin-vip-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-vip-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.admin-vip-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-vip-member-info strong {
  font-size: 13.5px;
  color: var(--text-primary);
}

.admin-vip-member-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

.admin-vip-member-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Locked Studio Pro Enhancer Box (Non-VIP) */
.vip-studio-pro-box.vip-locked-box {
  position: relative;
  opacity: 0.72;
}

.vip-studio-pro-box.vip-locked-box::after {
  content: "🔒 VIP (@tunggg0201 cấp)";
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 215, 0, 0.18);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #ffd700;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  pointer-events: none;
}

/* Quick Grant/Revoke VIP button on Friend Cards (Admin Only) */
.btn-friend-vip-toggle {
  font-size: 11.5px !important;
  padding: 6px 10px !important;
  font-weight: 700;
  white-space: nowrap;
}

/* ==========================================================================
   MOBILE PHONE OPTIMIZATION (360px - 768px & iOS/Android Safe Area)
   ========================================================================== */
@media (max-width: 768px) {
  .app-layout {
    padding-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }

  .main-content {
    width: 100%;
    max-width: 100%;
    padding: 12px 12px calc(82px + env(safe-area-inset-bottom, 0px)) 12px;
  }

  /* Sticky Translucent Mobile Header */
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 950;
    margin: -12px -12px 14px -12px;
    padding: max(10px, env(safe-area-inset-top, 10px)) 14px 10px 14px;
    background: rgba(15, 17, 21, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-brand {
    font-size: 16px;
    gap: 6px;
    min-width: 0;
  }

  .mobile-user-avatar {
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-user-avatar .avatar-circle {
    width: 34px;
    height: 34px;
  }

  /* Safe-area Fixed Bottom Navigation Bar */
  .mobile-nav-bar {
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 4px 4px env(safe-area-inset-bottom, 0px) 4px;
    background: rgba(15, 17, 21, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 2px;
    font-size: 10.5px;
    gap: 3px;
    border-radius: 10px;
  }

  .mobile-nav-item i {
    font-size: 17px;
  }

  .mobile-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* Prevent iOS Safari input auto-zoom & constrain input width */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  select.filter-select,
  .form-select {
    font-size: 16px !important;
    max-width: 100%;
    min-width: 0;
  }

  /* Toast Stack for Mobile */
  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: calc(100vw - 24px);
  }

  .toast {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 10px 14px;
    max-width: 100%;
  }

  /* Auth Screen on Mobile */
  .auth-screen {
    padding: 14px;
    align-items: center;
    overflow-y: auto;
  }

  .auth-card {
    padding: 24px 18px;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 22px;
  }

  .auth-logo {
    margin-bottom: 20px;
  }

  .locket-logo-circle {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  /* Headers */
  .feed-header,
  .friends-header,
  .memories-header {
    margin-bottom: 14px;
    gap: 10px;
  }

  h2 {
    font-size: 20px;
  }

  .section-desc {
    font-size: 12.5px;
  }

  /* Tab 1: Feed */
  .feed-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
  }

  .feed-actions .filter-select,
  .feed-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    font-size: 13px !important;
  }

  .feed-toolbar {
    padding: 12px;
    margin-bottom: 14px;
    gap: 10px;
  }

  .search-input-wrap {
    min-width: 100%;
    width: 100%;
  }

  .feed-toolbar-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 6px;
  }

  .feed-toolbar-actions::-webkit-scrollbar {
    display: none;
  }

  .feed-toolbar-actions > * {
    flex-shrink: 0;
  }

  .stories-section {
    margin-bottom: 14px;
  }

  .story-circle-item {
    width: 64px;
  }

  .story-avatar-ring {
    width: 58px;
    height: 58px;
  }

  .feed-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feed-grid.compact-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .moment-header {
    padding: 12px 14px;
  }

  .author-info {
    min-width: 0;
  }

  .author-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    word-break: break-word;
  }

  .moment-footer {
    padding: 12px 14px;
    gap: 10px;
  }

  .quick-reactions-bar {
    padding: 5px 8px;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .quick-reactions-bar::-webkit-scrollbar {
    display: none;
  }

  .reaction-emoji-btn {
    font-size: 19px;
    padding: 3px;
    flex-shrink: 0;
  }

  .moment-meta-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Tab 2: Post Studio */
  .post-studio {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-column {
    position: static;
    max-width: 100%;
    margin-bottom: 0;
  }

  .phone-frame {
    width: 100%;
    max-width: 300px;
    min-height: 410px;
    border-radius: 36px;
    border-width: 5px;
    padding: 10px 10px 14px;
    margin: 0 auto;
  }

  .controls-card {
    padding: 16px 14px;
    gap: 14px;
    border-radius: 18px;
  }

  .upload-zone {
    padding: 18px 12px;
  }

  .filters-pill-group,
  .quick-stickers-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .filters-pill-group::-webkit-scrollbar,
  .quick-stickers-row::-webkit-scrollbar {
    display: none;
  }

  .sticker-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .vip-studio-pro-box {
    padding: 12px;
  }

  .vip-studio-pro-box.vip-locked-box {
    padding-top: 36px;
  }

  .vip-sliders-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Tab 3: Memories Calendar */
  .calendar-nav-controls {
    width: 100%;
    justify-content: space-between;
  }

  .monthly-recap-banner {
    padding: 12px 14px;
    gap: 10px;
  }

  .calendar-container {
    padding: 12px 8px;
    border-radius: 16px;
  }

  .calendar-weekdays {
    font-size: 11px;
    padding-bottom: 8px;
  }

  .calendar-days-grid {
    gap: 4px;
    margin-top: 8px;
  }

  .calendar-day-cell {
    padding: 4px;
    border-radius: 8px;
  }

  .day-number {
    font-size: 10.5px;
  }

  .day-moments-count {
    width: 15px;
    height: 15px;
    font-size: 8.5px;
    bottom: 2px;
    right: 2px;
  }

  .day-moments-section {
    padding: 14px 12px;
  }

  .day-moments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Tab 4: Chat */
  .chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 148px);
    min-height: 440px;
    border-radius: 16px;
  }

  .chat-sidebar {
    height: auto;
    max-height: 116px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }

  .chat-sidebar-header {
    padding: 10px 14px;
  }

  .chat-sidebar-header h3 {
    font-size: 15px;
    margin: 0;
  }

  .conversations-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .conversations-list::-webkit-scrollbar {
    display: none;
  }

  .conv-item {
    min-width: 170px;
    max-width: 210px;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    flex-shrink: 0;
  }

  .conv-avatar {
    width: 36px;
    height: 36px;
  }

  .chat-main {
    flex: 1;
    min-height: 0;
  }

  .chat-header {
    padding: 10px 14px;
  }

  .chat-messages-wrap {
    padding: 12px;
  }

  .msg-bubble-wrap {
    max-width: 84%;
  }

  .chat-vip-quick-bar {
    padding: 8px 12px;
  }

  .chat-input-bar {
    padding: 10px 12px;
    gap: 8px;
  }

  /* Tab 5: Friends */
  .friends-header .search-wrap,
  .friends-header .search-wrap input {
    width: 100%;
  }

  .add-friend-card {
    padding: 14px;
    gap: 12px;
    margin-bottom: 16px;
  }

  .add-friend-form {
    width: 100%;
    flex-direction: column;
  }

  .add-friend-form input,
  .add-friend-form button {
    width: 100%;
    flex: none;
  }

  .friends-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .friend-card {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .friend-card-avatar {
    width: 44px;
    height: 44px;
  }

  .friend-card-actions {
    margin-left: auto;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Tab 6: Profile, VIP Card & Admin Panel */
  .profile-banner {
    height: 100px;
  }

  .profile-avatar-wrapper {
    left: 16px;
    bottom: -32px;
  }

  .profile-avatar {
    width: 76px;
    height: 76px;
    border-width: 3px;
  }

  .profile-body {
    padding: 42px 14px 18px 14px;
  }

  .profile-badges {
    gap: 6px;
    margin-bottom: 16px;
  }

  .badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .vip-gold-card {
    padding: 16px;
    min-height: 185px;
    border-radius: 18px;
  }

  .vip-card-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .vip-card-number {
    font-size: 14px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .vip-card-details {
    flex-wrap: wrap;
    gap: 8px;
  }

  .vip-card-val {
    font-size: 11.5px;
  }

  .vip-locked-gate-box,
  .vip-privileges-box,
  .admin-vip-manager-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .vip-locked-identity-row,
  .vip-redeem-row {
    flex-direction: column;
    align-items: stretch;
  }

  .vip-locked-identity-row button,
  .vip-redeem-row input,
  .vip-redeem-row button {
    flex: none;
    width: 100%;
    white-space: normal;
    height: auto;
  }

  .admin-vip-grant-form {
    grid-template-columns: 1fr;
  }

  .stats-overview-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 12px 6px;
  }

  .stat-number {
    font-size: 20px;
  }

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

  .info-item {
    flex-wrap: wrap;
    gap: 4px;
    word-break: break-all;
    font-size: 13px;
  }

  /* Modals & Fullscreen Viewers */
  .modal-backdrop {
    padding: 10px;
  }

  .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 14px;
    max-height: calc(90dvh - 58px);
    overflow-y: auto;
  }

  .story-viewer-box {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .story-footer {
    padding: 12px 14px max(18px, env(safe-area-inset-bottom, 18px)) 14px;
  }

  .slideshow-nav-btn.prev {
    left: 8px;
    width: 38px;
    height: 38px;
  }

  .slideshow-nav-btn.next {
    right: 8px;
    width: 38px;
    height: 38px;
  }

  .polaroid-actions-row,
  .qr-modal-actions {
    flex-direction: column;
  }

  .polaroid-actions-row button,
  .qr-modal-actions button {
    width: 100%;
  }

  .iphone-homescreen-frame {
    padding: 12px 12px 18px 12px;
  }
}

@media (max-width: 480px) {
  .feed-actions {
    grid-template-columns: 1fr 1fr;
  }

  .feed-actions #btn-refresh-feed {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .form-row .col {
    flex: 1 1 100%;
  }
}


