/* Polaroid Frame style */
.frame-polaroid {
  border-top: 14px solid #fcfbf9;
  border-left: 14px solid #fcfbf9;
  border-right: 14px solid #fcfbf9;
  border-bottom: 56px solid #fcfbf9;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.12);
  width: 100%;
  height: 100%;
}




/* Frame Selector UI Row */
.frames-selector-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.frame-preset-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ffccd5;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.frame-preset-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent-pink);
}

.frame-preset-btn.active {
  border-color: var(--accent-pink);
  box-shadow: 0 0 8px rgba(255, 42, 116, 0.4);
  background: #fff0f3;
  transform: scale(1.05);
}


/* Kodak Frame style */
.frame-kodak {
  border-top: 10px solid #111;
  border-left: 22px solid #111;
  border-right: 22px solid #111;
  border-bottom: 24px solid #111;
  width: 100%;
  height: 100%;
  position: relative;
  font-family: 'Courier New', monospace;
  box-sizing: border-box;
}

.frame-kodak::before {
  content: 'KODAK 5063 TX';
  position: absolute;
  top: 50%;
  left: -18px;
  transform: rotate(-90deg) translate(-50%, -50%);
  transform-origin: left top;
  color: #ff9500;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.frame-kodak::after {
  content: '24  в–¶  24A';
  position: absolute;
  top: 50%;
  right: -16px;
  transform: rotate(90deg) translate(-50%, 50%);
  transform-origin: right top;
  color: #ff9500;
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.frame-kodak-date {
  position: absolute;
  bottom: 4px;
  right: 12px;
  color: #ff9500;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
}



/* ===== Frame: TikTok Live ===== */
.frame-tiktok .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 3px solid transparent;
  background: linear-gradient(#000, #000) padding-box,
              linear-gradient(135deg, #ff2d55, #25f4ee) border-box;
  border-radius: 0;
}
.frame-tiktok .studio-frame-border::before {
  content: 'LIVE';
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ff2d55;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  box-shadow: -6px 0 0 0 #ff2d55, -8px 0 0 0 white;
  animation: tiktok-pulse 1.4s ease-in-out infinite;
}
.frame-tiktok .studio-frame-border::after {
  content: '@fashionista';
  position: absolute;
  bottom: 14px;
  left: 12px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
@keyframes tiktok-pulse {
  0%, 100% { box-shadow: -6px 0 0 0 #ff2d55, -8px 0 0 0 #ff2d55; }
  50% { box-shadow: -6px 0 0 0 rgba(255,45,85,0.3), -8px 0 0 0 rgba(255,45,85,0.1); }
}

/* ===== Frame: VHS Retro ===== */
.frame-vhs .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: none;
}
.frame-vhs .studio-frame-border::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 2px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
}
.frame-vhs .studio-frame-border::after {
  content: 'в—Џ REC';
  position: absolute;
  top: 12px;
  right: 14px;
  color: #ff0000;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: bold;
  animation: vhs-blink 1s steps(1) infinite;
}
.frame-vhs-timestamp {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: white;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  opacity: 0.8;
  pointer-events: none;
}
.frame-vhs-tracking {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  animation: vhs-tracking 3s linear infinite;
  pointer-events: none;
}
@keyframes vhs-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes vhs-tracking {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== Frame: Y2K Aesthetic ===== */
.frame-aesthetic .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 8px solid;
  border-image: linear-gradient(135deg, #ff9a9e, #fecfef, #a18cd1, #fbc2eb, #a6c1ee) 1;
}
.frame-aesthetic .studio-frame-border::before {
  content: 'вњ¦ вњ§ в… вњ¦';
  position: absolute;
  top: 8px;
  right: 12px;
  color: #d4a5ff;
  font-size: 14px;
  letter-spacing: 4px;
  opacity: 0.9;
}
.frame-aesthetic .studio-frame-border::after {
  content: 'В·Лљ вњї ЛљВ·';
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: #ffb6c1;
  font-size: 16px;
  letter-spacing: 3px;
}

/* ===== Frame: Cinema 2.39:1 Letterbox ===== */
.frame-cinema .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: none;
  border-right: none;
  border-top: 52px solid #000;
  border-bottom: 52px solid #000;
}
.frame-cinema .studio-frame-border::before {
  content: '[ Fashion is art you wear ]';
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 12px;
  font-family: sans-serif;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  white-space: nowrap;
}
.frame-cinema .studio-frame-border::after {
  content: '2.39 : 1';
  position: absolute;
  top: 16px;
  right: 16px;
  color: rgba(255,255,255,0.5);
  font-size: 9px;
  font-family: monospace;
  letter-spacing: 1px;
}

/* ===== Frame: Glitch / Cyber ===== */
.frame-glitch .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 3px solid #0ff;
  box-shadow: 3px 0 0 #ff0050, -3px 0 0 #00ff87, inset 0 0 20px rgba(0,255,255,0.1);
}
.frame-glitch .studio-frame-border::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0,255,255,0.4);
  animation: glitch-scan 3s linear infinite;
}
.frame-glitch .studio-frame-border::after {
  content: 'SYS_ERR//0x7F';
  position: absolute;
  bottom: 10px;
  right: 12px;
  color: #0ff;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  opacity: 0.7;
  text-shadow: 0 0 5px #0ff;
}
@keyframes glitch-scan {
  0% { top: 0%; }
  100% { top: 100%; }
}

/* ===== Frame: Magazine Cover ===== */
.frame-magazine .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 3px solid white;
}
.frame-magazine .studio-frame-border::before {
  content: 'VOGUE';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 12px;
  font-family: 'Georgia', serif;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.frame-magazine .studio-frame-border::after {
  content: '||||||||||||||||| 7 82003 14567 8';
  position: absolute;
  bottom: 10px;
  right: 12px;
  color: white;
  font-family: monospace;
  font-size: 7px;
  letter-spacing: 0px;
  opacity: 0.6;
}
.frame-magazine-headlines {
  position: absolute;
  bottom: 60px;
  left: 14px;
  color: white;
  font-family: 'Georgia', serif;
  pointer-events: none;
}

/* ===== Frame: Pixel Art ===== */
.frame-pixel .studio-frame-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 6px solid #333;
  box-shadow:
    6px 6px 0 0 #222,
    -6px -6px 0 0 #222,
    6px -6px 0 0 #222,
    -6px 6px 0 0 #222,
    0 6px 0 0 #222,
    0 -6px 0 0 #222,
    6px 0 0 0 #222,
    -6px 0 0 0 #222;
  image-rendering: pixelated;
}
.frame-pixel .studio-frame-border::before {
  content: 'в™Ґ в™Ґ в™Ґ';
  position: absolute;
  top: 8px;
  left: 10px;
  color: #ff004d;
  font-size: 14px;
  letter-spacing: 4px;
  font-family: monospace;
}
.frame-pixel .studio-frame-border::after {
  content: 'SCORE: 9999';
  position: absolute;
  bottom: 8px;
  right: 10px;
  color: #29adff;
  font-size: 10px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 1px;
}

