/* Clikkka Style Sheet - Retro Modern Aesthetics */

:root {
  --bg-primary: #0a0b12;
  --bg-secondary: #121320;
  --glass-bg: rgba(20, 22, 38, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --primary-accent: #8b5cf6; /* Violet */
  --secondary-accent: #ec4899; /* Pink */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-sunset: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --grad-neon: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

/* Ambient glow backgrounds */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.2;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-accent);
  top: -10%;
  right: -10%;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: var(--secondary-accent);
  bottom: -10%;
  left: -20%;
}

/* Core Container */
.app-container {
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  font-size: 1.75rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Connection indicator badge */
.connection-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.connection-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

/* Views manager */
.app-view {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  animation: fadeIn 0.4s ease-out forwards;
}

.app-view.active {
  display: flex;
}

/* General typography */
h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: 700;
  margin-bottom: 1rem;
}

.gradient-text {
  background: var(--grad-sunset);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center {
  text-align: center;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Form Styles */
.styled-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

input[type="text"], input[type="number"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-accent {
  background: var(--grad-neon);
  color: white;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.5);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-icon-only {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}

.btn-glow:hover {
  animation: pulse-glow 1.5s infinite alternate;
}

/* Glassmorphism card system */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.title-icon {
  color: var(--secondary-accent);
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.badge-admin {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Landing specific */
.hero-section {
  text-align: center;
  padding: 3rem 1rem;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-badge {
  background: var(--primary-accent);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.styled-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  margin: 0.5rem 0;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--secondary-accent);
  cursor: pointer;
  transition: transform 0.1s;
}

.styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Admin Dashboard Specific */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

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

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qr-section {
  align-items: center;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding-right: 2rem;
}

@media (max-width: 768px) {
  .qr-section {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 0;
    padding-bottom: 2rem;
  }
}

.qr-container {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  width: 230px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.qr-image {
  max-width: 100%;
}

.qr-help {
  font-size: 0.85rem;
}

.link-display {
  display: flex;
  width: 100%;
  max-width: 280px;
  gap: 0.5rem;
}

.link-display input {
  font-size: 0.8rem;
  padding: 0.5rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.status-circle.pulse {
  animation: pulse-ring 1.5s infinite;
}

.text-capturing, .status-circle {
  color: var(--success);
}
.status-circle {
  background: var(--success);
}

.text-revealed {
  color: var(--primary-accent);
}

.status-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.status-value {
  font-weight: 700;
}

.statistics-box {
  display: flex;
  gap: 1rem;
}

.stat-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  display: block;
  background: var(--grad-sunset);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.danger-zone {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-start;
}

/* Welcome Login card */
.login-card {
  max-width: 500px;
  margin: 4rem auto;
}

.welcome-icon {
  font-size: 3rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

/* VIRTUAL DISPOSABLE CAMERA COMPONENT */
.camera-plastic-body {
  background: #f8af1d; /* Classic Disposable Yellow */
  color: #111;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  border: 8px solid #222;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: hidden;
  user-select: none;
}

/* Kodak/fuji retro stripes */
.camera-plastic-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 45px;
  background: linear-gradient(180deg, #1f6b3b 0%, #17542d 100%); /* Green stripe for Fuji contrast */
  z-index: 1;
  border-bottom: 4px solid #222;
}

.camera-brand {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
}

.camera-model {
  font-size: 0.65rem;
  background: #222;
  color: #f8af1d;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

/* Viewfinder Frame styling */
.camera-viewfinder-outer {
  background: #111;
  padding: 10px;
  border-radius: 16px;
  border: 4px solid #333;
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.8);
  position: relative;
  z-index: 2;
}

.camera-viewfinder-inner {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #15151a;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(1); /* No mirroring for front, regular for back */
}

/* Lens view fallback screen */
.fallback-camera-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #666;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: radial-gradient(circle, #252836 0%, #15161e 100%);
  transition: all 0.3s ease;
}

.fallback-camera-view:hover {
  color: var(--text-primary);
}

.camera-lens-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.fallback-camera-view span {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Flash animation overlay */
.flash-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  z-index: 99;
  pointer-events: none;
}

.flash-active {
  animation: flash-fire 0.4s ease-out;
}

/* Camera controls bottom bar */
.camera-controls {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

/* Counter display segment style */
.counter-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-lcd {
  background: #3a1414;
  border: 3px solid #222;
  color: #ff3b30;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  width: 60px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  letter-spacing: 0.05em;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
  text-shadow: 0 0 8px rgba(255, 59, 48, 0.6);
}

.control-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: #222;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* Winding Gear dial */
.winding-dial-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.winding-dial {
  width: 54px;
  height: 36px;
  background: #222;
  border-radius: 4px;
  border: 3px solid #333;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Gear ridges visual */
.winding-dial::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    #111 4px,
    #111 8px
  );
}

/* Shutter Button classic */
.shutter-control {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shutter-btn {
  width: 64px;
  height: 64px;
  background: radial-gradient(circle, #e63946 0%, #b81d24 100%);
  border: 5px solid #222;
  border-radius: 50%;
  box-shadow: 0 6px 0 #111, 0 10px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  outline: none;
  transition: all 0.1s ease;
}

.shutter-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #111, 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* Guest Info status bar */
.guest-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  width: 100%;
  max-width: 440px;
  margin: 0.5rem auto;
}

.guest-name {
  color: var(--primary-accent);
}

.offline-sync-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  width: 100%;
  max-width: 440px;
  margin: 0.5rem auto;
}

/* SHARED GALLERY SCREEN */
.gallery-header {
  margin-bottom: 3rem;
}

.gallery-tools {
  margin-top: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.gallery-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.3);
}

.photo-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #151726;
  position: relative;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.photo-info {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.uploader-nickname {
  font-weight: 600;
  color: var(--text-primary);
}

.photo-time {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed var(--glass-border);
  border-radius: 16px;
}

.empty-icon {
  font-size: 3.5rem;
  color: var(--glass-border);
  margin-bottom: 1.5rem;
}

/* LIGHTBOX MODAL */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(6, 7, 13, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  object-fit: contain;
  animation: zoomIn 0.3s ease-out;
}

.lightbox-caption {
  margin: 1.5rem auto;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--secondary-accent);
  text-decoration: none;
  cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-glow {
  from {
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
  }
  to {
    box-shadow: 0 4px 25px rgba(236, 72, 153, 0.7);
  }
}

@keyframes flash-fire {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.hidden {
  display: none !important;
}
