/* Ray-Ban AI Portrait Experience Styles */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Oswald', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* App Container */
.app-container {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Ray-Ban Start Screen */
.rayban-start-screen {
  background: #EB1E23;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rayban-start-screen:hover {
  /* background: #d02721; */
}

.rayban-logo {
  margin-bottom: 60px;
  height: 100px;
}

.rayban-logo-photobooth {
  height: 100px;
}

.rayban-logo img,
.rayban-logo-photobooth img {
  height: 100%;
  width: auto;
}

.logo-svg {
  width: 200px;
  height: 60px;
}

.logo-text {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 24px;
  fill: white;
  font-style: italic;
}

.start-content {
  max-width: 600px;
}

.welcome-title {
  font-size: 3rem;
  font-weight: 600;
  color: white;
  margin-bottom: 30px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.welcome-subtitle {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 40px;
  line-height: 1.5;
  font-weight: 300;
  opacity: 0.9;
}

.tap-instruction {
  font-size: 1.1rem;
  color: white;
  font-weight: 400;
  opacity: 0.8;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Loading Screen */
.loading-screen {
  background: #000;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px;
}

.loader {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(234, 48, 43, 0.3);
  border-top: 3px solid #EB1E23;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-screen p {
  color: white;
  font-size: 1.2rem;
  font-weight: 300;
}

/* Main Photobooth */
.photobooth {
  background: #EB1E23;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.photobooth.hidden {
  display: none;
}

/* App Header */
.app-header {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  margin-bottom: 30px;
}

.rayban-logo-small {
  opacity: 0.9;
}

.logo-svg-small {
  width: 120px;
  height: 30px;
}

.logo-text-small {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 16px;
  fill: white;
  font-style: italic;
}

/* Camera Section */
.camera-section {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.camera-frame {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
}

.camera-container {
  width: 640px;
  height: 480px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

/* Camera Ready Screen */
.camera-ready {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #333 0%, #666 100%);
  z-index: 10;
}

.ready-content {
  text-align: center;
  color: white;
}

.ready-message {
  font-size: 1.3rem;
  margin-bottom: 30px;
  font-weight: 300;
}

/* Live View */
.live-view {
  position: relative;
  width: 100%;
  height: 100%;
}

.live-view.hidden {
  display: none;
}

#webcam {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotateY(180deg);
}

.output-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
}

/* Countdown */
.countdown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.countdown.hidden {
  display: none;
}

.countdown-number {
  font-size: 8rem;
  color: #EB1E23;
  font-weight: 700;
  animation: countdownPulse 1s ease-in-out;
}

@keyframes countdownPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* Photo Result */
.photo-result {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  flex-direction: column;
}

.photo-result.hidden {
  display: none;
}

#photoCanvas {
  width: 100%;
  height: calc(100% - 80px);
  object-fit: contain;
}

.photo-actions {
  height: 80px;
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  background: #f5f5f5;
  padding: 20px;
}

/* Ray-Ban Buttons */
.rayban-button {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 140px;
}

.rayban-button.primary {
  background: #EB1E23;
  color: white;
}

.rayban-button.primary:hover {
  background: #d02721;
  transform: translateY(-2px);
}

.rayban-button.secondary {
  background: transparent;
  color: #333;
  border: 2px solid #333;
}

.rayban-button.secondary:hover {
  background: #333;
  color: white;
  transform: translateY(-2px);
}

.rayban-button.capture {
  background: #EB1E23;
  color: white;
  font-size: 16px;
  padding: 20px 40px;
  min-width: 200px;
}

.rayban-button.capture:hover {
  background: #d02721;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(234, 48, 43, 0.3);
}

/* Controls Section */
.controls-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 600px;
  margin: 0 auto;
}

/* Size Control */
.size-control {
  background: rgba(255,255,255,0.95);
  padding: 25px 35px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.8);
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.control-label {
  display: block;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.size-value {
  color: #EB1E23;
  font-weight: 600;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

.slider-label {
  font-size: 12px;
  color: #555;
  text-transform: uppercase;
  font-weight: 500;
  min-width: 40px;
}

.rayban-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 300px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  outline: none;
}

.rayban-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #EB1E23;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.rayban-slider::-webkit-slider-thumb:hover {
  background: #d02721;
  transform: scale(1.1);
}

.rayban-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #EB1E23;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.rayban-slider::-moz-range-thumb:hover {
  background: #d02721;
  transform: scale(1.1);
}

/* Camera Controls */
.camera-controls {
  margin-top: 20px;
}

.camera-controls.hidden {
  display: none;
}

/* Loading States */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  border: 3px solid #333;
  border-top: 3px solid #EB1E23;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-title {
    font-size: 2rem;
  }
  
  .welcome-subtitle {
    font-size: 1.1rem;
  }
  
  .camera-container {
    width: 90vw;
    max-width: 640px;
    height: calc(90vw * 0.62);
    max-height: 480px;
  }
  
  .camera-frame {
    padding: 10px;
    width: 100%;
    max-width: 95vw;
  }
  
  .countdown-number {
    font-size: 6rem;
  }
  
  .rayban-slider {
    width: 200px;
  }
  
  .size-control {
    padding: 20px;
  }
  
  .rayban-button.capture {
    padding: 15px 30px;
    font-size: 14px;
    min-width: 160px;
  }
}

@media (max-width: 480px) {
  .welcome-title {
    font-size: 1.5rem;
  }
  
  .camera-container {
    width: 100%;
    height: calc(95vw * 0.62);
    max-height: 400px;
  }
  
  .controls-section {
    padding: 0 10px;
  }
}