@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

/* Base Variables - Matching index.css */
:root {
  --primary-color: #FF5757;
  --secondary-color: #3A86FF;
  --accent-color: #FFBE0B;
  --dark-color: #2B2D42;
  --light-color: #F8F9FA;
  --text-color: #333;
  --bg-color: #FFFFFF;
  --gradient-primary: linear-gradient(135deg, #FF5757 0%, #FF8A5B 100%);
  --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* Base styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Fredoka', sans-serif;
    background-color: white;
}

/* Add/update these styles */
html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* Navigation styles */
.nav-bar {
  background-color: var(--bg-color);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  transition: transform 0.3s ease;
}

.logo:hover .logo-img {
  transform: rotate(10deg);
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-color);
}

.logo-highlight {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 5px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link i {
  font-size: 0.9rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(255, 87, 87, 0.08);
}

/* Booth Page Styles */
.booth-page {
  background-color: var(--light-color);
  padding-top: 80px;
}

.booth-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 100px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.booth-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: 700;
}

.highlight {
  color: var(--primary-color);
}

/* Timer Panel */
.timer-panel {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
}

.panel-label {
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.timer-btn {
  padding: 8px 20px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.timer-btn:hover {
  background: var(--primary-color);
  color: white;
}

.timer-btn.active {
  background: var(--primary-color);
  color: white;
}

/* Shots Counter */
.shots-counter {
  background: white;
  padding: 12px 20px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
}

.shots-counter i {
  color: var(--primary-color);
}

/* Booth Layout */
.booth-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1;
  margin-bottom: 20px;
}

.booth-left {
  flex: 1;
  min-width: 300px;
}

.camera-section {
    width: 100%;
    aspect-ratio: 4/3; /* Default aspect ratio - will be updated by JS */
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    max-height: calc(100vh - 350px); /* Limit max height to ensure buttons are visible */
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Change from cover to contain */
    background: #000;
}

/* Optional: Add these styles to create black bars on sides if needed */
.camera-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #000;
    z-index: -1;
}

/* Camera Overlay */
.camera-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.overlay-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid white;
}

.top-left {
  top: 20px;
  left: 20px;
  border-right: none;
  border-bottom: none;
}

.top-right {
  top: 20px;
  right: 20px;
  border-left: none;
  border-bottom: none;
}

.bottom-left {
  bottom: 20px;
  left: 20px;
  border-right: none;
  border-top: none;
}

.bottom-right {
  bottom: 20px;
  right: 20px;
  border-left: none;
  border-top: none;
}

/* Countdown */
.countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  display: none;
  z-index: 10;
  font-weight: 700;
}

/* Control Buttons */
.control-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
  position: sticky;
  bottom: 20px;
  z-index: 100;
}

.capture-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-primary);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255,87,87,0.3);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.capture-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,87,87,0.4);
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--dark-color);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.btn:hover {
  transform: translateY(-3px);
  background: #3a3f5c;
}

/* Reset Button */
.reset-btn {
  background: #dc3545;
  color: white;
}

.reset-btn:hover {
  background: #bd2130;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(220,53,69,0.3);
}

/* Gallery Section */
.gallery-section {
  flex: 0 0 300px;
  max-height: calc(100vh - 350px); /* Match camera section height */
  overflow-y: auto !important;
  padding: 20px;
  background: white;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  gap: 15px;
  scroll-behavior: smooth;
  box-shadow: var(--box-shadow);
  position: relative;
}

.gallery-header {
  position: sticky;
  top: 0;
  background: white;
  padding-bottom: 15px;
  z-index: 5;
  border-bottom: 1px solid #eee;
}

.gallery-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark-color);
}

.gallery-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  opacity: 0.5;
}

.gallery-empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #ccc;
}

.gallery-empty-state p {
  color: #999;
}

/* Captured image container */
.captured-image-container {
  width: 100%;
  height: 150px;
  flex-shrink: 0;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.captured-image-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.captured-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: auto;
}

/* Gallery Item */
.gallery-item {
  width: 100%;
  height: 150px;
  margin: 0 0 15px 0;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Gallery Hint */
.gallery-hint {
  text-align: center;
  padding: 10px;
  background-color: rgba(255,255,255,0.8);
  border-radius: 50px;
  margin: 20px auto;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--dark-color);
  box-shadow: var(--box-shadow);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-hint.show {
  opacity: 1;
}

.gallery-hint i {
  color: var(--primary-color);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Photo Modal */
.photo-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: var(--border-radius);
  max-width: 90%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--dark-color);
  z-index: 10;
}

.modal-content img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  background: var(--gradient-primary);
  color: white;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255,87,87,0.2);
}

/* Booth Footer */
.booth-footer {
  background-color: var(--dark-color);
  color: white;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

.copyright {
  color: #999;
  font-size: 0.9rem;
}

/* Custom Scrollbar */
.gallery-section::-webkit-scrollbar {
  width: 8px;
}

.gallery-section::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.gallery-section::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.gallery-section::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 30px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 5px;
  transition: var(--transition);
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary-color);
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  text-align: center;
}

.notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Shake animation for button */
.shake-animation {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* Highlight counter */
.highlight-counter {
  animation: pulse-highlight 1.5s ease;
}

@keyframes pulse-highlight {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 0 0 rgba(255,87,87,0); 
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 0 15px rgba(255,87,87,0.7);
    background-color: var(--primary-color);
    color: white;
  }
}

/* Update the Create PhotoStrip button to have a disabled state */
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #999;
}

/* Counter badge for photo requirement */
.photo-requirement {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary-color);
  color: white;
  font-size: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Add these styles */
.camera-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.control-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Media Queries */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  
  .booth-layout {
    flex-direction: column;
  }
  
  .gallery-section {
    max-height: 200px;
  }
  
  .timer-controls {
    flex-wrap: wrap;
  }
  
  .camera-section {
    max-height: calc(100vh - 400px); /* Adjusted for mobile */
  }
}

@media (max-width: 480px) {
  .booth-title {
    font-size: 1.8rem;
  }
  
  .control-buttons {
    flex-direction: column;
  }
  
  .capture-btn, .btn {
    width: 100%;
    justify-content: center;
  }
  
  .timer-btn {
    padding: 8px 15px;
    font-size: 14px;
  }
}