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

:root {
  --orange: #F7941D;
  --orange-dark: #E5850F;
  --teal: #2DBFB8;
  --teal-dark: #25A8A2;
  --white: #ffffff;
  --light-gray: #f8f8f8;
  --gray: #666666;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  color: #333;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  padding: 10px 0 20px;
}

.logo {
  max-width: 280px;
  height: auto;
  margin-bottom: 8px;
}

.text-logo {
  font-family: 'Quicksand', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.tagline {
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 500;
  letter-spacing: 0.05em;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Camera Preview */
.camera-wrapper {
  position: relative;
  width: 100%;
  max-width: 350px;
  aspect-ratio: 3/4;
  background: var(--light-gray);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 3px solid var(--orange);
}

#camera {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror for selfie */
}

#preview-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.flip-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--orange);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flip-btn:hover {
  background: var(--white);
  transform: scale(1.05);
}

/* Countdown Overlay */
.countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  font-weight: 300;
  color: var(--orange);
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.9);
  z-index: 10;
}

/* Flash Effect */
.flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

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

@keyframes flash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* Status Text */
.status {
  font-size: 0.95rem;
  color: var(--gray);
  text-align: center;
  min-height: 24px;
  font-weight: 500;
}

/* Filter Buttons */
.filters {
  display: flex;
  gap: 10px;
}

.filter-btn {
  background: var(--white);
  border: 2px solid var(--light-gray);
  color: var(--gray);
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* Capture Button */
.capture-btn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid var(--orange);
  padding: 4px;
  cursor: pointer;
  transition: transform 0.1s;
  margin-top: 10px;
}

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

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

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

.capture-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--orange);
  transition: background 0.2s;
}

.capture-btn:hover .capture-inner {
  background: var(--orange-dark);
}

/* Photo Strip Preview */
.strip-preview {
  width: 100%;
  text-align: center;
  padding: 20px 0;
}

.strip-preview h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 15px;
}

#strip-canvas {
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.strip-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.action-btn {
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:not(.secondary) {
  background: var(--orange);
  border: none;
  color: var(--white);
}

.action-btn:not(.secondary):hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.action-btn.secondary {
  background: var(--white);
  border: 2px solid var(--teal);
  color: var(--teal);
}

.action-btn.secondary:hover {
  background: var(--teal);
  color: var(--white);
}

.save-tip {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 15px;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: auto;
}

footer a {
  color: var(--teal);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 400px) {
  .container {
    padding: 15px;
  }

  .logo {
    max-width: 220px;
  }

  .camera-wrapper {
    max-width: 300px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}
