/* Sharp text rendering */
body {
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Drop zone styling */
#dropZone {
  transition: all 0.3s ease;
}

#dropZone.drag-over {
  border-color: #10b981 !important;
  background-color: #f0fdf4 !important;
}

/* Video element styling */
#videoElement {
  transform: scaleX(-1); /* Mirror for selfie view */
  max-height: 400px; /* Compact on desktop */
  object-fit: cover;
}

/* Preview image compact on desktop */
#previewImage {
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Canvas overlay */
#landmarksCanvas {
  pointer-events: none;
}

/* Face shape badge - Softer green to match button colors */
.shape-badge {
  display: inline-block;
  background: rgb(5 150 105/var(--tw-bg-opacity,1));
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.confidence-score {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  margin-left: 0.75rem;
}

/* Recommendation cards */
.recommendation-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.recommendation-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recommendation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendation-list li {
  padding: 0.625rem 0;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: 0.9375rem;
}

.recommendation-list li:last-child {
  border-bottom: none;
}

.recommendation-list li::before {
  content: "✓ ";
  color: #10b981;
  font-weight: 700;
  margin-right: 0.5rem;
}

.avoid-list li::before {
  content: "✗ ";
  color: #ef4444;
}

/* Secondary shapes */
.secondary-shape-item {
  display: inline-block;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  margin: 0.25rem;
  font-size: 0.875rem;
  color: #374151;
}

.secondary-shape-item .shape-name {
  font-weight: 600;
  color: #111827;
}

.secondary-shape-item .shape-percent {
  color: #6b7280;
  margin-left: 0.375rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .shape-badge {
    font-size: 1.25rem;
    padding: 0.625rem 1.25rem;
  }
  
  input[type="file"] {
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  #videoElement {
    max-height: 320px;
  }
}

/* Details/Summary styling */
details {
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
}

details:last-child {
  border-bottom: none;
}

details summary {
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #6b7280;
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

details p {
  margin-top: 0.75rem;
  padding-left: 0.5rem;
}

/* Share button pulse animation */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

#shareResultBtn:hover {
  animation: pulse 1.5s infinite;
}
