/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #1A1A2E 0%, #16213E 100%);
  color: #FFFFFF;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

.feedback-container {
  max-width: 500px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   BUSINESS HEADER
   ======================================== */

.business-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 33, 62, 0.8);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.business-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.business-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.business-info {
  flex: 1;
  min-width: 0;
}

.business-name {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-context {
  font-size: 14px;
  color: #B0B0B0;
  line-height: 1.3;
}

/* ========================================
   SWIPE ZONE
   ======================================== */

.swipe-zone {
  position: relative;
  flex: 1;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.swipe-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(26, 26, 46, 1), rgba(22, 33, 62, 1));
  transition: background 0.3s ease-out;
  z-index: 1;
}

/* Zone Labels (Top and Bottom) */
.zone-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.zone-positive {
  top: 40px;
}

.zone-negative {
  bottom: 40px;
}

.zone-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}

.zone-text {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 2px;
}

/* Center Swipe Indicator */
.swipe-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  z-index: 10;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.swipe-indicator.active {
  cursor: grabbing;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Idle pulse animation */
.swipe-indicator.idle-pulse {
  animation: idlePulse 2s ease-in-out infinite;
}

@keyframes idlePulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 1;
  }
}

.indicator-emoji {
  font-size: 80px;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.indicator-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

/* Particle Canvas */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Sentiment Label (appears while dragging) */
.sentiment-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 100px));
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  z-index: 11;
  white-space: nowrap;
  pointer-events: none;
}

/* Threshold Line */
.threshold-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9;
  pointer-events: none;
}

/* ========================================
   INSTRUCTIONS PANEL
   ======================================== */

.instructions-panel {
  padding: 20px;
  text-align: center;
  flex-shrink: 0;
}

.instruction-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  opacity: 0.7;
  color: #B0B0B0;
}

.gesture-animation {
  width: 100%;
  height: 100%;
  animation: gestureFloat 2s ease-in-out infinite;
}

@keyframes gestureFloat {
  0%, 100% {
    transform: translateY(0px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px);
    opacity: 1;
  }
}

.instruction-text {
  font-size: 16px;
  color: #B0B0B0;
  line-height: 1.5;
  margin-bottom: 8px;
}

.instruction-highlight {
  color: #FFFFFF;
  font-weight: 600;
}

.instruction-subtext {
  font-size: 14px;
  color: #6B6B6B;
  font-style: italic;
}

/* ========================================
   SUBMITTING OVERLAY
   ======================================== */

.submitting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.submitting-content {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submitting-content p {
  font-size: 18px;
  color: #FFFFFF;
}

/* ========================================
   THANK YOU SCREEN
   ======================================== */

.thank-you-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #1A1A2E 0%, #16213E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.thank-you-screen.visible {
  opacity: 1;
}

.thank-you-content {
  text-align: center;
  padding: 40px;
  max-width: 500px;
  animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  color: white;
  animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.thank-you-content h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.sentiment-emoji-large {
  font-size: 80px;
  margin: 20px 0;
  line-height: 1;
}

.thank-you-content > p {
  font-size: 18px;
  color: #B0B0B0;
  margin-bottom: 40px;
  line-height: 1.6;
}

.optional-actions {
  margin-top: 40px;
}

.optional-actions p {
  font-size: 16px;
  color: #B0B0B0;
  margin-bottom: 20px;
}

.voice-note-btn,
.skip-btn {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 10px 0;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.voice-note-btn {
  background: #4CAF50;
  color: white;
}

.voice-note-btn:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.skip-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #B0B0B0;
}

.skip-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-height: 600px) {
  .business-header {
    padding: 15px;
  }
  
  .swipe-indicator {
    width: 100px;
    height: 100px;
  }
  
  .indicator-emoji {
    font-size: 60px;
  }
  
  .zone-emoji {
    font-size: 36px;
  }
  
  .instructions-panel {
    padding: 15px;
  }
}