/* ============================================================
   JENNYS MARKETINGGENERATOR - CIRQUE DU SOLEIL BUBBLEGUM EDITION
   The most colorful, crazy, candy-coated UI ever made
   ============================================================ */

:root {
  --candy-pink: #FF6B9D;
  --candy-magenta: #C44569;
  --candy-purple: #9B59B6;
  --candy-blue: #3498DB;
  --candy-cyan: #00D2D3;
  --candy-green: #2ECC71;
  --candy-lime: #A8E6CF;
  --candy-yellow: #F9CA24;
  --candy-orange: #F39C12;
  --candy-red: #E74C3C;
  --candy-coral: #FF7675;
  --candy-peach: #FAB1A0;
  --bubblegum: #FF69B4;
  --bubblegum-dark: #DB2777;
  --bubblegum-light: #FFC0CB;
  --neon-green: #39FF14;
  --neon-blue: #00F0FF;
  --neon-pink: #FF00FF;
  --neon-yellow: #FFFF00;
  --card-bg: rgba(255,255,255,0.92);
  --text-dark: #2D1B69;
  --text-light: #6C5CE7;
}

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

html, body {
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(135deg,
    #FF6B9D 0%, #C44569 10%, #9B59B6 20%, #6C5CE7 30%,
    #3498DB 40%, #00D2D3 50%, #2ECC71 60%, #F9CA24 70%,
    #F39C12 80%, #E74C3C 90%, #FF6B9D 100%);
  background-size: 400% 400%;
  animation: rainbowShift 15s ease infinite;
  color: var(--text-dark);
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   FLOATING BUBBLES BACKGROUND
   ============================================================ */
.bg-bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  animation: floatBubble linear infinite;
  filter: blur(1px);
}

@keyframes floatBubble {
  0% { transform: translateY(110vh) rotate(0deg) scale(0.5); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) rotate(720deg) scale(1.2); opacity: 0; }
}

.rainbow-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(255,105,180,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(0,210,211,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(155,89,182,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================================
   BUBBLE GUM LETTERS
   ============================================================ */
.bubble-letter {
  display: inline-block;
  font-family: 'Rubik Bubbles', 'Bubblegum Sans', cursive;
  color: hsl(var(--hue), 80%, 55%);
  text-shadow:
    0 2px 0 hsl(var(--hue), 80%, 40%),
    0 4px 0 hsl(var(--hue), 80%, 35%),
    0 6px 10px rgba(0,0,0,0.2),
    0 0 20px hsla(var(--hue), 100%, 60%, 0.5),
    0 0 40px hsla(var(--hue), 100%, 60%, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  -webkit-text-stroke: 1.5px hsl(var(--hue), 90%, 35%);
  paint-order: stroke fill;
}

.bubble-letter:hover {
  transform: scale(1.3) rotate(-5deg);
  filter: brightness(1.2);
}

.bubble-letter.big {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  animation: bubbleBounce 2s ease-in-out infinite;
  animation-delay: calc(var(--delay) * 0.08s);
}

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

.title-space {
  display: inline-block;
  width: 0.5em;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.login-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 3rem;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.3),
    0 0 0 3px var(--bubblegum),
    0 0 40px rgba(255,105,180,0.3),
    inset 0 1px 0 rgba(255,255,255,0.6);
  max-width: 420px;
  width: 90%;
  animation: cardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
  from { transform: scale(0.5) rotate(-5deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.login-logo .bubble-letter {
  font-size: 3rem;
}

.login-subtitle {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.5rem;
  color: var(--candy-purple);
  margin: 0.5rem 0 2rem;
  text-shadow: 0 2px 4px rgba(155,89,182,0.3);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-candy {
  position: relative;
}

.input-candy input {
  width: 100%;
  padding: 14px 20px;
  border: 3px solid var(--bubblegum-light);
  border-radius: 50px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  background: rgba(255,255,255,0.8);
  color: var(--text-dark);
  outline: none;
  transition: all 0.3s ease;
}

.input-candy input:focus {
  border-color: var(--bubblegum);
  box-shadow: 0 0 0 4px rgba(255,105,180,0.2), 0 0 20px rgba(255,105,180,0.15);
  background: white;
}

.input-candy input::placeholder {
  color: #ccc;
}

.login-error {
  color: var(--candy-red);
  font-size: 0.9rem;
  min-height: 1.2rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-bubblegum {
  position: relative;
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bubblegum), var(--candy-purple), var(--candy-blue));
  background-size: 200% 200%;
  animation: btnGradient 3s ease infinite;
  box-shadow:
    0 4px 15px rgba(255,105,180,0.4),
    0 2px 0 rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-bubblegum:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 8px 25px rgba(255,105,180,0.5),
    0 4px 0 rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-bubblegum:active {
  transform: translateY(0) scale(0.98);
}

@keyframes btnGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-sparkle {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
}

.btn-bubblegum:hover .btn-sparkle {
  animation: sparkleSlide 0.6s ease;
}

@keyframes sparkleSlide {
  to { transform: translateX(100%); }
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.btn-generate {
  width: 100%;
  padding: 16px;
  font-size: 1.4rem;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-logout {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 20px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50px;
  background: rgba(255,255,255,0.15);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-logout:hover {
  background: rgba(255,255,255,0.3);
  border-color: white;
}

/* ============================================================
   HEADER
   ============================================================ */
.crazy-header {
  position: relative;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg,
    rgba(255,105,180,0.85),
    rgba(155,89,182,0.85),
    rgba(108,92,231,0.85));
  backdrop-filter: blur(10px);
  border-bottom: 4px solid;
  border-image: linear-gradient(90deg,
    var(--candy-red), var(--candy-orange), var(--candy-yellow),
    var(--candy-green), var(--candy-cyan), var(--candy-blue),
    var(--candy-purple), var(--candy-pink)) 1;
  box-shadow: 0 4px 30px rgba(0,0,0,0.2);
  z-index: 10;
}

.header-content {
  position: relative;
  text-align: center;
}

.main-title {
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.subtitle-sparkle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
}

/* ============================================================
   TAB NAVIGATION
   ============================================================ */
.candy-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(15px);
}

.tab-btn {
  padding: 12px 28px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.1rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.tab-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px) scale(1.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--bubblegum), var(--candy-purple));
  border-color: white;
  box-shadow:
    0 4px 20px rgba(255,105,180,0.5),
    0 0 0 2px rgba(255,255,255,0.3);
  transform: scale(1.08);
}

.tab-icon {
  font-size: 1.2rem;
  margin-right: 4px;
}

/* ============================================================
   TAB CONTENT
   ============================================================ */
.tab-content {
  display: none;
  padding: 1.5rem;
  animation: tabSlide 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes tabSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   GENERATOR GRID LAYOUT
   ============================================================ */
.generator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .generator-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CANDY CARDS
   ============================================================ */
.candy-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 2rem;
  box-shadow:
    0 10px 40px rgba(0,0,0,0.15),
    0 0 0 2px rgba(255,105,180,0.2),
    inset 0 1px 0 rgba(255,255,255,0.8);
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.candy-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 4px;
  background: linear-gradient(90deg,
    var(--candy-red), var(--candy-orange), var(--candy-yellow),
    var(--candy-green), var(--candy-cyan), var(--candy-blue),
    var(--candy-purple), var(--candy-pink));
  border-radius: 24px 24px 0 0;
}

.card-title {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.rainbow-text {
  background: linear-gradient(90deg,
    var(--candy-red), var(--candy-orange), var(--candy-yellow),
    var(--candy-green), var(--candy-cyan), var(--candy-blue),
    var(--candy-purple), var(--candy-pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowText 3s linear infinite;
}

@keyframes rainbowText {
  to { background-position: 200% center; }
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.candy-label {
  display: block;
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.candy-label .hint {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.75rem;
  color: #999;
  font-weight: 300;
}

.candy-textarea,
.candy-input,
.candy-select {
  width: 100%;
  padding: 12px 16px;
  border: 2.5px solid var(--bubblegum-light);
  border-radius: 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.9);
  color: var(--text-dark);
  outline: none;
  transition: all 0.3s ease;
  resize: vertical;
}

.candy-textarea:focus,
.candy-input:focus,
.candy-select:focus {
  border-color: var(--bubblegum);
  box-shadow: 0 0 0 3px rgba(255,105,180,0.15), 0 0 15px rgba(255,105,180,0.1);
  background: white;
}

.candy-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23FF69B4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* ============================================================
   FILE UPLOAD ZONE
   ============================================================ */
.file-upload-zone {
  position: relative;
  border: 3px dashed var(--bubblegum-light);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, rgba(255,105,180,0.05), rgba(155,89,182,0.05));
}

.file-upload-zone:hover {
  border-color: var(--bubblegum);
  background: linear-gradient(135deg, rgba(255,105,180,0.1), rgba(155,89,182,0.1));
  transform: scale(1.01);
}

.file-upload-zone.drag-over {
  border-color: var(--neon-pink);
  background: linear-gradient(135deg, rgba(255,0,255,0.1), rgba(255,105,180,0.15));
  box-shadow: 0 0 20px rgba(255,0,255,0.2);
}

.file-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}

.file-upload-zone p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.preview-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 2px solid var(--bubblegum-light);
}

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

.preview-thumb .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--candy-red);
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================================
   PROGRESS & LOADING
   ============================================================ */
.progress-zone {
  text-align: center;
  padding: 2rem;
}

.loading-bubblegum {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.bubble {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  animation: bubblePulse 1.2s ease-in-out infinite;
}

.bubble.b1 {
  background: var(--bubblegum);
  animation-delay: 0s;
}
.bubble.b2 {
  background: var(--candy-purple);
  animation-delay: 0.2s;
}
.bubble.b3 {
  background: var(--candy-cyan);
  animation-delay: 0.4s;
}

@keyframes bubblePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.progress-text {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.1rem;
  color: var(--text-light);
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================================
   RESULT DISPLAY
   ============================================================ */
.result-display {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  opacity: 0.5;
}

.empty-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.5rem;
}

.result-image {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.3s ease;
  animation: resultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-image:hover {
  transform: scale(1.02);
}

.result-video {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: resultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-text {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(155,89,182,0.05);
  border-radius: 12px;
  border-left: 4px solid var(--candy-purple);
  font-size: 0.9rem;
  color: var(--text-light);
  width: 100%;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-action {
  padding: 8px 16px;
  border: 2px solid var(--bubblegum-light);
  border-radius: 50px;
  background: rgba(255,105,180,0.1);
  color: var(--bubblegum-dark);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-action:hover {
  background: var(--bubblegum);
  color: white;
  border-color: var(--bubblegum);
  transform: translateY(-2px);
}

.last-frame-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(0,210,211,0.08), rgba(46,204,113,0.08));
  border-radius: 16px;
  border: 2px dashed var(--candy-cyan);
  text-align: center;
  width: 100%;
}

.last-frame-section h3 {
  font-family: 'Bubblegum Sans', cursive;
  color: var(--candy-cyan);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.last-frame-section img {
  max-width: 200px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  margin-bottom: 0.5rem;
}

.last-frame-section p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-card {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid transparent;
  background: white;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--bubblegum);
  box-shadow: 0 10px 30px rgba(255,105,180,0.3);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-item-info {
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-item-type {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gallery-item-type.image {
  background: linear-gradient(135deg, var(--bubblegum-light), var(--candy-peach));
  color: var(--bubblegum-dark);
}

.gallery-item-type.video {
  background: linear-gradient(135deg, var(--candy-lime), var(--candy-cyan));
  color: #0a6c4d;
}

.gallery-item-date {
  font-size: 0.75rem;
  color: #999;
}

.gallery-item-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(231,76,60,0.85);
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: all 0.2s ease;
}

.gallery-item:hover .gallery-item-delete {
  display: flex;
}

.gallery-item-delete:hover {
  background: var(--candy-red);
  transform: scale(1.15);
}

.gallery-item-startframe {
  position: absolute;
  bottom: 40px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--neon-green), #2ecc71);
  color: #111;
  border: none;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(57,255,20,0.4);
  transition: all 0.2s ease;
  z-index: 5;
}

.gallery-item:hover .gallery-item-startframe {
  display: flex;
}

.gallery-item-startframe:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(57,255,20,0.6);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover {
  background: var(--candy-red);
  border-color: var(--candy-red);
  transform: rotate(90deg);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .bubble-letter.big {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }

  .crazy-header {
    padding: 1rem;
  }

  .btn-logout {
    position: static;
    transform: none;
    margin-top: 0.5rem;
  }

  .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .candy-tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    font-size: 0.9rem;
    padding: 8px 16px;
  }

  .candy-card {
    padding: 1.2rem;
  }
}

/* ============================================================
   SCROLLBAR CANDY
   ============================================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255,105,180,0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--bubblegum), var(--candy-purple));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--bubblegum-dark), var(--candy-magenta));
}

/* ============================================================
   SPARKLE CURSOR TRAIL
   ============================================================ */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  animation: sparkleFade 0.8s ease forwards;
}

@keyframes sparkleFade {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

/* ============================================================
   DISCO BORDER FOR GENERATING
   ============================================================ */
.generating {
  animation: discoBorder 0.5s linear infinite;
}

@keyframes discoBorder {
  0% { border-color: var(--candy-red); }
  14% { border-color: var(--candy-orange); }
  28% { border-color: var(--candy-yellow); }
  42% { border-color: var(--candy-green); }
  57% { border-color: var(--candy-cyan); }
  71% { border-color: var(--candy-blue); }
  85% { border-color: var(--candy-purple); }
  100% { border-color: var(--candy-pink); }
}

/* ============================================================
   TOOLTIP STYLE
   ============================================================ */
.use-as-start-btn {
  padding: 6px 14px;
  border: 2px solid var(--candy-cyan);
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(0,210,211,0.15), rgba(46,204,113,0.15));
  color: var(--candy-cyan);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.use-as-start-btn:hover {
  background: var(--candy-cyan);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,210,211,0.4);
}
