body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  overflow: hidden;
}

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ================== SHARED SCREENS ================== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.screen.active {
  visibility: visible;
  opacity: 1;
  z-index: 2;
}

.welcome-title {
  font-weight: 600;
  color: white;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.welcome-subtitle {
  color: white;
  opacity: 0.9;
}

/* ================== BUTTONS ================== */
.pill-btn {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  margin-top: 15px;
  /* Fine tuning alignment slightly if capture-btn overflows bounds */
  padding: 0 30px;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  border: none;
  color: white;
  transition: 0.3s;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.pill-btn:hover {
  transform: scale(1.05);
}

.glass-btn {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 18px;
  transition: 0.3s;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 55px;
  height: 55px;
  flex-shrink: 0;
}

.glass-btn:hover {
  transform: scale(1.1);
}

/* ================== CAMERA SCREEN (NEW LAYOUT) ================== */
.main-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  width: 100%;
  height: 100vh;
}

.camera-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.camera-frame {
  width: 320px;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: black;
}

video {
  display: none;
}

canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filters {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  overflow-x: auto;
  max-width: 100%;
  /* keep it nicely bound */
}

.filters::-webkit-scrollbar {
  display: none;
}

.bottom-bar {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.capture-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #ff6b81;
  border: 5px solid white;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 0 20px rgba(255, 105, 135, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.capture-btn {
  background: linear-gradient(145deg, #ff6a88, #ff99ac);
  box-shadow: 0 0 25px rgba(255, 105, 135, 0.6);
  transition: 0.2s;
}

.capture-btn:hover {
  transform: scale(1.1);
}

.capture-btn:active {
  transform: scale(0.9);
}

.capture-btn:active {
  transform: scale(0.9);
}

.text-section {
  text-align: center;
  color: white;
}

.text-section h1 {
  font-weight: 700;
  font-size: 36px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ================== GALLERY ================== */
#galleryGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  padding: 20px;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
}

#galleryGrid::-webkit-scrollbar {
  display: none;
}

.gallery-img {
  width: 110px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.glass-btn {
  transition: all 0.25s ease;
}

.glass-btn:hover {
  transform: scale(1.15);
}

.glass-btn:active {
  transform: scale(0.9);
}