/* ========================================
   FESTA DE LELEH - UI/UX PROFISSIONAL
   Design: Glassmorphism + Neumorphism Hybrid
   Layout: Mobile-First, One-Hand Friendly
   ======================================== */

/* ========================================
   CSS VARIABLES & THEME
   ======================================== */
:root {
  /* Colors - Vibrant Pink Party Theme */
  --primary: #9d5614;
  --primary-dark: #a17b58;
  --primary-light: #ffae62;
  --secondary: #ffbc7d;
  --accent: #FFD700;

  /* Backgrounds */
  --bg-base: #1b0f00;
  --bg-elevated: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-overlay: rgba(18, 12, 0, 0.95);

  /* Glass & Blur */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --blur-amount: 20px;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(255, 134, 20, 0.3);

  /* Borders */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-elevated: 10;
  --z-sticky: 100;
  --z-modal: 1000;
  --z-toast: 2000;

  /* Typography */
  --font-display: 'Pacifico', cursive;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

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


  background: #131313;

  /* Reserve space for bottom nav on mobile */
  padding-bottom: 80px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input {
  font-family: inherit;
  outline: none;
}

/* ========================================
   LAYOUT CONTAINER
   ======================================== */
.app-container {
  max-width: 768px;
  margin: 0 auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   STORAGE BANNER
   ======================================== */
.storage-banner {
  position: sticky;
  top: var(--space-md);
  z-index: var(--z-sticky);

  width: 50%;
  margin: 0 auto;

  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-lg);

  animation: slideDown 0.4s var(--transition-bounce);
}


@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.storage-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.storage-icon {
  flex-shrink: 0;
  color: var(--primary);
}

.storage-banner.warning {
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
}

.storage-banner.warning .storage-icon {
  color: #FFC107;
}

.storage-banner.danger {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
}

.storage-banner.danger .storage-icon {
  color: #F44336;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;

  background: linear-gradient(135deg,
      rgba(255, 161, 20, 0.15),
      rgba(199, 92, 21, 0.1));
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl), var(--shadow-glow);

  padding: var(--space-xl);

  animation: heroEntrance 0.8s var(--transition-bounce);
}

@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(30px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%,
      rgba(255, 153, 20, 0.2) 0%,
      transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.title-emoji {
  font-size: 3rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.title-text {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-primary), var(--text-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 145, 20, 0.5));
}

.title-highlight {
  font-weight: 800;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ========================================
   GALLERY SECTION
   ======================================== */
.gallery-section {
  animation: slideUp 0.6s ease-out 0.2s both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding: 0 var(--space-xs);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(255, 134, 20, 0.5));
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;

  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);

  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.icon-btn:hover {
  background: var(--glass-border);
  color: var(--primary);
  transform: scale(1.1) rotate(90deg);
  box-shadow: var(--shadow-md);
}

.icon-btn:active {
  transform: scale(0.95) rotate(90deg);
}

/* ========================================
   PHOTO FEED (Timeline Vertical)
   ======================================== */
.photo-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Photo Card - Glassmorphism */
.photo-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);

  overflow: hidden;
  box-shadow: var(--shadow-lg);

  transition: all var(--transition-base);
  animation: cardEntrance 0.5s ease-out both;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), 0 0 24px rgba(255, 126, 20, 0.2);
  border-color: rgba(255, 67, 20, 0.3);
}

.photo-card:active {
  transform: scale(0.98);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  cursor: pointer;

  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-base));
  transition: transform var(--transition-slow);
}

.photo-card:hover .card-image {
  transform: scale(1.05);
}

.card-footer {
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.card-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

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

.author-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: var(--space-xs);
}

.card-action-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;

  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);

  transition: all var(--transition-fast);
}

.card-action-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.card-action-btn:active {
  transform: scale(0.95);
}

/* Feed Loader */
.feed-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   FLOATING ACTION BUTTON (FAB)
   ======================================== */
.fab {
  position: fixed;
  right: var(--space-lg);
  bottom: calc(80px + var(--space-lg));
  z-index: var(--z-elevated);

  width: 64px;
  height: 64px;

  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-full);

  display: grid;
  place-items: center;

  box-shadow: var(--shadow-xl), 0 0 32px rgba(255, 145, 20, 0.4);

  transition: all var(--transition-base);
  animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {

  0%,
  100% {
    box-shadow: var(--shadow-xl), 0 0 32px rgba(255, 145, 20, 0.4);
  }

  50% {
    box-shadow: var(--shadow-xl), 0 0 48px rgba(255, 114, 20, 0.6);
  }
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: var(--shadow-xl), 0 0 48px rgba(255, 106, 20, 0.6);
}

.fab:active {
  transform: scale(0.95) rotate(90deg);
}

.fab-icon {
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);

  display: flex;
  justify-content: space-around;
  align-items: center;

  background: var(--bg-base);
  backdrop-filter: blur(var(--blur-amount)) saturate(180%);
  border-top: 1px solid var(--glass-border);

  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);

  animation: navSlideUp 0.6s var(--transition-bounce);
}

@keyframes navSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border-radius: var(--radius-md);

  color: var(--text-muted);
  transition: all var(--transition-base);

  /* One-hand friendly - larger tap target */
  min-width: 64px;
  min-height: 56px;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--primary);
  background: rgba(100, 100, 100, 0.1);
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 8px rgba(255, 114, 20, 0.6));
  animation: iconPop 0.4s var(--transition-bounce);
}

@keyframes iconPop {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.nav-icon {
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.nav-item:active .nav-icon {
  transform: scale(0.9);
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;

}

/* ========================================
   FULLSCREEN MODALS
   ======================================== */
.fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);

  background: var(--bg-overlay);
  backdrop-filter: blur(var(--blur-amount));

  display: grid;
  place-items: center;
  padding: var(--space-md);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(var(--blur-amount));
  }
}

.fullscreen-modal[hidden] {
  display: none;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;

  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);

  box-shadow: var(--shadow-xl);

  display: flex;
  flex-direction: column;

  animation: modalSlideUp 0.4s var(--transition-bounce);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;

  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  color: var(--text-secondary);

  transition: all var(--transition-base);
}

.modal-close:hover {
  background: rgba(244, 67, 54, 0.2);
  color: #F44336;
  transform: rotate(90deg);
}

.modal-close:active {
  transform: scale(0.9) rotate(90deg);
}

.modal-body {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========================================
   UPLOAD MODAL
   ======================================== */
.upload-zone {
  position: relative;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);

  background: var(--bg-elevated);

  transition: all var(--transition-base);
  cursor: pointer;

  min-height: 240px;
  display: grid;
  place-items: center;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(255, 114, 20, 0.05);
  transform: scale(1.02);
}

.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(255, 114, 20, 0.1);
  border-style: solid;
  box-shadow: 0 0 24px rgba(255, 106, 20, 0.3);
}

.upload-content {
  text-align: center;
  pointer-events: none;
}

.upload-icon-wrapper {
  margin-bottom: var(--space-md);
  display: grid;
  place-items: center;
}

.upload-icon {
  color: var(--primary);
  filter: drop-shadow(0 4px 12px rgba(255, 153, 20, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.upload-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.upload-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.upload-queue {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 153, 20, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 181, 20, 0.2);
}

.queue-count {
  font-weight: 600;
  color: var(--primary);
}

.queue-count span {
  font-size: 1.25rem;
  font-weight: 800;
}

/* Upload Form */
.upload-form {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);

  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label svg {
  color: var(--primary);
}

.form-input {
  width: 100%;
  padding: var(--space-md);

  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  color: var(--text-primary);
  font-size: 1rem;

  transition: all var(--transition-base);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 153, 20, 0.3);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);

  padding: var(--space-md) var(--space-lg);

  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);

  color: white;
  font-weight: 700;
  font-size: 1rem;

  box-shadow: var(--shadow-md), 0 0 24px rgba(255, 114, 20, 0.3);

  transition: all var(--transition-base);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 32px rgba(255, 145, 20, 0.5);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-large {
  padding: var(--space-lg) var(--space-xl);
  font-size: 1.125rem;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);

  padding: var(--space-md) var(--space-lg);

  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  color: var(--text-primary);
  font-weight: 600;

  transition: all var(--transition-base);
}

.btn-download:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-download:active {
  transform: scale(0.98);
}

/* ========================================
   PROGRESS BAR
   ======================================== */
.upload-progress {
  animation: slideDown 0.3s ease-out;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.progress-bar-container {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  background-size: 200% 100%;
  border-radius: var(--radius-full);

  transition: width var(--transition-base);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ========================================
   PHOTO VIEWER MODAL
   ======================================== */
.photo-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);

  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(var(--blur-amount));

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: var(--space-lg);

  animation: modalFadeIn 0.3s ease-out;
}

.photo-viewer-modal[hidden] {
  display: none;
}

.viewer-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 1;

  width: 48px;
  height: 48px;

  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);

  color: white;

  display: grid;
  place-items: center;

  transition: all var(--transition-base);
}

.viewer-close:hover {
  background: rgba(244, 67, 54, 0.3);
  transform: rotate(90deg) scale(1.1);
}

.viewer-close:active {
  transform: rotate(90deg) scale(0.95);
}

.viewer-content {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.viewer-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  object-fit: contain;

  animation: imageZoom 0.4s var(--transition-bounce);
}

@keyframes imageZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.viewer-info {
  width: 100%;
  max-width: 500px;

  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);

  padding: var(--space-lg);

  display: flex;
  flex-direction: column;
  gap: var(--space-md);

  animation: slideUp 0.4s ease-out 0.1s both;
}

.viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.meta-uploader,
.meta-date {
  display: flex;
  align-items: center;
  gap: var(--space-sm);

  color: var(--text-secondary);
  font-size: 0.875rem;
}

.meta-uploader svg,
.meta-date svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* ========================================
   DOWNLOAD OPTIONS
   ======================================== */
.download-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.download-card {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);

  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);

  transition: all var(--transition-base);
}

.download-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.download-icon {
  width: 80px;
  height: 80px;

  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);

  display: grid;
  place-items: center;

  box-shadow: var(--shadow-md);
}

.download-icon svg {
  color: white;
}

.download-card h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 400px;
}

/* ========================================
   ORGANIZER MODAL
   ======================================== */
.organizer-login {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.login-icon {
  margin: 0 auto var(--space-md);
  width: 96px;
  height: 96px;

  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-xl);

  display: grid;
  place-items: center;

  box-shadow: var(--shadow-lg);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

  0%,
  100% {
    box-shadow: var(--shadow-lg), 0 0 24px rgba(255, 114, 20, 0.3);
  }

  50% {
    box-shadow: var(--shadow-lg), 0 0 48px rgba(255, 126, 20, 0.6);
  }
}

.login-icon svg {
  color: white;
}

.organizer-login h3 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.organizer-login p {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Organizer Dashboard */
.organizer-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.dashboard-welcome {
  text-align: center;
  padding: var(--space-xl);

  background: linear-gradient(135deg, rgba(255, 153, 20, 0.3), rgba(199, 21, 133, 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 145, 20, 0.2);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.dashboard-welcome svg {
  color: var(--primary);
  filter: drop-shadow(0 4px 12px rgba(255, 114, 20, 0.3));
}

.dashboard-welcome h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
}

.dashboard-welcome p {
  color: var(--text-muted);
}

.dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.danger-action,
.secondary-action {
  display: flex;
  align-items: center;
  gap: var(--space-md);

  padding: var(--space-lg);

  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  text-align: left;

  transition: all var(--transition-base);
}

.danger-action {
  border-color: rgba(244, 67, 54, 0.3);
}

.danger-action:hover {
  background: rgba(244, 67, 54, 0.1);
  border-color: #F44336;
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.secondary-action:hover {
  background: var(--glass-bg);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.danger-action svg {
  color: #F44336;
  flex-shrink: 0;
}

.secondary-action svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.danger-action strong,
.secondary-action strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 1rem;
}

.danger-action small,
.secondary-action small {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE - TABLET & DESKTOP
   ======================================== */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .app-container {
    padding: var(--space-xl);
  }

  .photo-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .bottom-nav {
    display: none;
  }

  .fab {
    bottom: var(--space-xl);
  }

  .hero-section {
    padding: var(--space-2xl);
  }

  .modal-content {
    max-width: 700px;
  }
}

@media (min-width: 1024px) {
  .photo-feed {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   UTILITIES
   ======================================== */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}