/* ═══════════════════════════════════════════
   Özüm'ün Doğum Günü Partisi - Stylesheet
   ═══════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────── */
:root {
  --bg-primary: #0F0A1A;
  --bg-secondary: #1A1028;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);

  --pink: #FF6B9D;
  --pink-light: #FF8FB1;
  --purple: #C084FC;
  --purple-light: #D8B4FE;
  --gold: #FFD700;
  --gold-light: #FBBF24;

  --text: #FFFFFF;
  --text-sec: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.4);

  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.1);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

img, video { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── Confetti Canvas ───────────────────── */
#confetti-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
}

/* ─── Container ─────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ─── Glass Card ────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
}

.glass-pill {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--text-sec);
}

/* ─── Buttons ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--r-md);
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,157,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,107,157,0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn-glass:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

.btn-camera, .btn-browse {
  flex: 1; justify-content: center;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  font-size: 0.9rem;
}
.btn-camera:hover, .btn-browse:hover { background: rgba(255,255,255,0.1); }

.btn-text { color: var(--pink); font-weight: 600; font-size: 0.85rem; padding: 4px 8px; }
.btn-text:hover { opacity: 0.8; }

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-sec);
  backdrop-filter: blur(12px);
}

/* ─── HERO ──────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 20px 40px;
  overflow: hidden;
}

.hero-glow {
  position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,107,157,0.15) 0%, rgba(192,132,252,0.08) 50%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; max-width: 600px; }

.hero-badge {
  display: inline-block;
  padding: 8px 20px; border-radius: 100px;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.25);
  color: var(--gold);
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 24px;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(255,215,0,0); }
}

.cake-emoji-wrapper { margin-bottom: 16px; }
.cake-emoji {
  font-size: 4rem;
  display: inline-block;
  animation: cakeBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px rgba(255,107,157,0.3));
}
@keyframes cakeBounce {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 900; line-height: 1.15;
  margin-bottom: 16px;
}
.hero-title-highlight {
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-sec);
  margin-bottom: 32px;
  max-width: 440px; margin-left: auto; margin-right: auto;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Hero floating decorations */
.hero-decorations { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.float-deco {
  position: absolute; font-size: 2rem;
  animation: floatDeco 6s ease-in-out infinite;
  opacity: 0.5;
}
.float-deco-1 { top: 10%; left: 5%; animation-delay: 0s; font-size: 2.5rem; }
.float-deco-2 { top: 15%; right: 8%; animation-delay: 1s; }
.float-deco-3 { top: 45%; left: 3%; animation-delay: 2s; font-size: 1.8rem; }
.float-deco-4 { top: 60%; right: 5%; animation-delay: 0.5s; }
.float-deco-5 { bottom: 25%; left: 8%; animation-delay: 1.5s; font-size: 2.2rem; }
.float-deco-6 { bottom: 15%; right: 12%; animation-delay: 3s; }
.float-deco-7 { top: 30%; right: 3%; animation-delay: 2.5s; font-size: 1.6rem; }
.float-deco-8 { bottom: 35%; left: 12%; animation-delay: 4s; }

@keyframes floatDeco {
  0%,100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-18px) rotate(5deg); }
  66% { transform: translateY(8px) rotate(-3deg); }
}

/* ─── Floating Balloons BG ──────────────── */
.balloons-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.balloon-float {
  position: absolute; bottom: -80px;
  font-size: 2rem; opacity: 0.15;
  animation: balloonRise linear infinite;
}
@keyframes balloonRise {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.15; }
  10% { opacity: 0.2; }
  90% { opacity: 0.08; }
  100% { transform: translateY(-110vh) rotate(20deg); opacity: 0; }
}

/* ─── Section ───────────────────────────── */
.section { padding: 60px 0; position: relative; z-index: 1; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800; margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.section-icon { font-size: 1.4em; }

/* ─── UPLOAD SECTION ────────────────────── */
.upload-card { padding: 28px 20px; max-width: 600px; margin: 0 auto; }

.upload-area {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: var(--r-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--pink);
  background: rgba(255,107,157,0.06);
}
.upload-area.drag-over {
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(255,107,157,0.15);
}

.upload-icon-wrapper { margin-bottom: 16px; }
.upload-icon {
  width: 48px; height: 48px; margin: 0 auto;
  color: var(--pink);
  opacity: 0.8;
}
.upload-text { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.upload-subtext { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.upload-formats { font-size: 0.75rem; color: var(--text-muted); }

.upload-buttons { display: flex; gap: 10px; margin-top: 16px; }

.name-input-wrapper {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 0 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
}
.input-icon { font-size: 1.2rem; padding-left: 12px; }
.input-name {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); padding: 14px 12px 14px 0;
  font-size: 0.95rem;
}
.input-name::placeholder { color: var(--text-muted); }

/* ─── Preview ───────────────────────────── */
.preview-section { margin-top: 24px; }
.preview-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.preview-title { font-size: 0.95rem; font-weight: 600; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px; margin-bottom: 20px;
}
.preview-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--r-sm); overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.preview-item img, .preview-item video {
  width: 100%; height: 100%; object-fit: cover;
}
.preview-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
}
.preview-remove:hover { background: rgba(255,60,60,0.8); }
.preview-video-badge {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.6); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600;
}

/* ─── Progress Bar ──────────────────────── */
.progress-wrapper { margin-bottom: 16px; }
.progress-bar {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.1);
  overflow: hidden; margin-bottom: 8px;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width 0.3s var(--ease);
}
.progress-info { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-sec); }

.btn-upload-submit { width: 100%; justify-content: center; }
.btn-upload-submit:disabled {
  opacity: 0.5; pointer-events: none;
}

/* ─── GALLERY ───────────────────────────── */
.gallery-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 8px;
}

.gallery-grid {
  column-count: 2; column-gap: 10px;
}
@media (min-width: 640px) { .gallery-grid { column-count: 3; } }
@media (min-width: 1024px) { .gallery-grid { column-count: 4; } }

.gallery-item {
  break-inside: avoid; margin-bottom: 10px;
  border-radius: var(--r-md); overflow: hidden;
  position: relative; cursor: pointer;
  transition: transform 0.3s var(--ease);
  background: rgba(255,255,255,0.03);
}
.gallery-item:hover { transform: scale(1.02); }

.gallery-item img {
  width: 100%; display: block;
  transition: opacity 0.4s;
}
.gallery-item img.lazy { opacity: 0; }
.gallery-item img.loaded { opacity: 1; }

.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 60%, rgba(0,0,0,0.6));
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end;
  padding: 12px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-info {
  font-size: 0.8rem; color: rgba(255,255,255,0.9);
}
.gallery-item-info .uploader { font-weight: 600; }
.gallery-item-info .time { font-size: 0.7rem; color: rgba(255,255,255,0.6); }

.gallery-video-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.3s, background 0.3s;
}
.gallery-item:hover .gallery-video-badge {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255,107,157,0.7);
}
.gallery-video-badge svg { width: 22px; height: 22px; color: #fff; margin-left: 2px; }

/* Empty state */
.gallery-empty {
  text-align: center; padding: 60px 20px;
}
.empty-illustration { position: relative; display: inline-block; margin-bottom: 20px; }
.empty-icon-main { font-size: 4rem; opacity: 0.4; }
.empty-sparkle {
  position: absolute; font-size: 1.2rem;
  animation: sparkle 2s ease-in-out infinite;
}
.empty-sparkle-1 { top: -10px; right: -15px; animation-delay: 0s; }
.empty-sparkle-2 { bottom: 0; left: -20px; animation-delay: 0.7s; }
.empty-sparkle-3 { top: -5px; left: -10px; animation-delay: 1.3s; }
@keyframes sparkle {
  0%,100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 0.8; transform: scale(1.2); }
}
.empty-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: var(--text-sec); }
.empty-subtext { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; }

.gallery-loading { text-align: center; padding: 40px; color: var(--text-sec); }

.spinner { width: 36px; height: 36px; margin: 0 auto 12px; }
.spinner-ring {
  width: 100%; height: 100%;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-load-more { display: block; margin: 28px auto 0; }

/* ─── LIGHTBOX ──────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
}

.lightbox-container {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

.lightbox-header {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; z-index: 2;
  background: linear-gradient(rgba(0,0,0,0.5), transparent);
}
.lightbox-info { font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.lightbox-info .uploader { font-weight: 600; }

.lightbox-actions { display: flex; gap: 8px; }
.lightbox-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.2); }
.lightbox-btn svg { width: 20px; height: 20px; color: #fff; }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav svg { width: 24px; height: 24px; color: #fff; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-media-wrapper {
  max-width: 90vw; max-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-media-wrapper img {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain; border-radius: 4px;
}
.lightbox-media-wrapper video {
  max-width: 90vw; max-height: 80vh;
  border-radius: 4px;
}

/* ─── TOAST ─────────────────────────────── */
.toast-container {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 10001; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 20px; border-radius: var(--r-md);
  font-size: 0.9rem; font-weight: 500;
  color: #fff; min-width: 260px; max-width: 380px;
  animation: toastIn 0.3s var(--ease);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.success { background: linear-gradient(135deg, #10B981, #059669); }
.toast.error { background: linear-gradient(135deg, #EF4444, #DC2626); }
.toast.info { background: linear-gradient(135deg, var(--pink), var(--purple)); }
.toast.removing { animation: toastOut 0.3s var(--ease) forwards; }

@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(100px); opacity: 0; } }

/* ─── FOOTER ────────────────────────────── */
.footer {
  text-align: center; padding: 40px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative; z-index: 1;
}
.footer-emojis { font-size: 1.5rem; margin-bottom: 10px; letter-spacing: 8px; }
.footer-text {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* ─── Mobile Responsive ─────────────────── */
@media (max-width: 480px) {
  .hero { padding: 40px 16px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .upload-card { padding: 20px 14px; }
  .upload-area { padding: 28px 16px; }
  .upload-buttons { flex-direction: column; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .lightbox-nav { width: 36px; height: 36px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .toast-container { bottom: 12px; left: 12px; right: 12px; }
  .toast { min-width: unset; width: 100%; }
  .gallery-grid { column-count: 2; column-gap: 8px; }
  .gallery-item { margin-bottom: 8px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .gallery-grid { column-count: 2; }
}
