/* CSS styles remain unchanged */
body {
  font-family: "Inter", sans-serif;
  max-width: 420px;
  min-width: 320px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  background: #fff7fd;
}
#logo { max-width: 200px; height: auto; margin-bottom: 0px; }
/* Hide main logo when strip is visible */
body.strip-visible #logo {
  display: none;
}
#strip-logo { max-width: 300px; width: 80%; height: auto; margin-bottom: 30px; }
h1 { margin-top: 5px; margin-bottom: 5px; color: #5d4843; }
#camera-container { margin-bottom: 15px; position: relative; display: block; width: 100%; }
#switch-btn {
  position: absolute; top: 15px; right: 15px; width: 48px; height: 48px;
  padding: 10px; margin: 0; border: none; background: rgba(0, 0, 0, 0.4); z-index: 10;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0.9; border-radius: 50%; backdrop-filter: blur(10px);
  transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
#switch-btn:hover {
  opacity: 1; background: rgba(0, 0, 0, 0.8); transform: scale(1.05);
}
#switch-btn img { width: 28px; height: 28px; transition: transform 0.3s ease; filter: invert(1); }
#switch-btn:active { transform: scale(0.95); }
#switch-btn:active img { opacity: 0.8; }

/* Mobile-specific improvements */
@media (max-width: 768px) {
  #switch-btn {
    width: 52px; height: 52px; top: 20px; right: 20px;
    padding: 12px; background: rgba(0, 0, 0, 0.7);
  }
  #switch-btn img { width: 30px; height: 30px; }
}
#video, canvas {
  width: 100%; height: auto; aspect-ratio: 4/3; background-color: #000;
  margin-bottom: 15px; border-radius: 8px; transform: scaleX(-1);
  object-fit: cover; -webkit-transform: scaleX(-1);
  transition: transform 0.5s ease-out, -webkit-transform 0.5s ease-out;
  will-change: transform; overflow: hidden;
}
#video.environment { transform: scaleX(1); -webkit-transform: scaleX(1); }
.filter-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; position: relative; width: 100%;
  max-width: 200px; margin: 0 auto 10px;
}
.filter-nav button { background: none; border: none; padding: 8px;
  cursor: pointer; color: #666; font-size: 18px; }
.filter-nav button:disabled { color: #ccc; cursor: not-allowed; }
.filter-name { font-size: 16px; padding: 8px; cursor: pointer; position: relative; }
.filter-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: white; border: 1px solid #ddd; border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 1000;
  max-height: 150px; overflow-y: auto;
}
.filter-dropdown.show { display: block; }
.filter-option { padding: 8px; cursor: pointer; }
.filter-option:hover { background: #f5f5f5; }
#snap-btn {
  padding: 12px 24px; font-family: 'Inter', sans-serif; font-size: 18px; cursor: pointer;
  background-color: #4CAF50; color: white; border: none; border-radius: 8px;
  width: 100%; max-width: 200px; margin: 5px auto;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s;
}
#snap-btn:active { background-color: #3d8b40; }
#save-btn, #back-btn {
  padding: 12px 24px; font-family: 'Inter', sans-serif; font-size: 18px; cursor: pointer;
  background-color: #2196F3; color: white; border: none; border-radius: 8px;
  width: 100%; max-width: 200px; margin: 8px auto; display: block;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s;
}
#save-btn:active, #back-btn:active { background-color: #1976d2; }
#photo-strip { padding: 15px; gap: 15px; }
.photo { width: 100%; max-width: 300px; height: auto; aspect-ratio: 4/3; border-radius: 8px; }
#snap-btn:disabled { background-color: #cccccc; cursor: not-allowed; }
#strip-container { display: none; margin-top: 20px; }
#photo-strip {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 20px; 
  background-color: #f6e7f3;
  background-image: url('../images/pattern.svg');
  background-repeat: repeat;
  background-size: 40px 40px;
  background-position: center;
  padding: 30px;
  border-radius: 8px;
  font-family: 'Fraunces', serif;
  max-width: 400px;
  margin: 20px auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.photo { 
  width: 100%; 
  max-width: 320px; 
  height: auto; 
  aspect-ratio: 4/3;
  transform: scaleX(var(--photo-transform, 1));
  margin-bottom: 30px;
  border-radius: 4px;
}
.photo:last-of-type {
  margin-bottom: 20px;
}
.hashtags {
  font-family: var(--hashtag-font-family, 'Fraunces', serif);
  color: var(--hashtag-color, #5d4843);
  font-size: var(--hashtag-font-size, 14px);
  margin-top: 10px;
  text-align: var(--hashtag-text-align, center);
  line-height: var(--hashtag-line-height, 1.6);
}
#save-btn, #back-btn { padding: 10px 20px; font-family: 'Inter', sans-serif; font-size: 16px; cursor: pointer;
  background-color: #2196F3; color: white; border: none; border-radius: 4px; }
#countdown {
  display: none; position: absolute; top: 40%; left: 50%;
  transform: translate(-50%, -50%); font-size: 72px;
  color: rgba(255, 255, 255, 0.5); padding: 20px 40px; border-radius: 8px;
  z-index: 1000; width: fit-content; margin: 0 auto;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.flash {
  position: absolute; top: 0; left: 0; width: 100%; 
  aspect-ratio: 4/3; height: auto;
  background-color: white; opacity: 0; z-index: 999; animation: flash 0.3s ease-out;
  border-radius: 8px; margin-bottom: 15px;
  pointer-events: none;
}
@keyframes flash { 0% { opacity: 0; } 50% { opacity: 0.8; } 100% { opacity: 0; } }