body {
  font-family: system-ui, -apple-system, sans-serif;
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

.camera-start-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.start-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.camera-options {
  display: flex;
  gap: 1rem;
}

.camera-option-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s ease;
  color: white;
  font-weight: 600;
  background: #0070f3;
  box-shadow: 0 4px 12px rgba(0,112,243,0.3);
  text-align: center;
  line-height: 1.2;
}

.camera-option-button:hover {
  background: #0051b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,112,243,0.4);
}

.camera-option-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,112,243,0.3);
}

.camera-option-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.camera-option-button.button-active {
  background: #28a745 !important;
  animation: pulse 0.6s;
}

.camera-option-button small {
  font-size: 0.7rem;
  margin-top: 2px;
}

.save-toggle-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  text-align: center;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 60px;
  height: 30px;
  background: #ccc;
  border-radius: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-slider {
  background: #28a745;
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(30px);
}

.toggle-text {
  font-weight: 600;
  color: #333;
}

.save-disclaimer {
  color: #666;
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.save-disclaimer strong {
  color: #d32f2f;
}

.camera-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.side-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 2.5rem;
  transition: all 0.2s ease;
  color: white;
  font-weight: 600;
  background: #0070f3;
  box-shadow: 0 4px 12px rgba(0,112,243,0.3);
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}

.side-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,112,243,0.4);
}

.side-button:active {
  transform: scale(0.95);
}

.side-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.side-button.button-active {
  background: #28a745;
  animation: pulse 0.6s;
}

.side-button.button-capture {
  background: #ff6b35;
  animation: glow 1s infinite;
}

.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.7rem;
  margin-top: 0.5rem;
  text-align: center;
  line-height: 1;
  color: white;
  font-weight: 600;
}

#video, #canvas {
  max-width: min(90vw, 500px);
  max-height: min(80vh, 600px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

#dogified-image {
  max-width: min(95vw, 1024px);
  max-height: min(85vh, 1024px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  margin: 1rem auto;
  display: block;
}

#share-container {
  text-align: center;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

#share-container::before {
  content: "Share your $dogified photo:";
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

#share-container.temp-url::after {
  content: "⚠️ Image sharing may not work reliably on social media (enable save option for better sharing)";
  display: block;
  font-size: 0.75rem;
  color: #f57c00;
  margin-top: 0.5rem;
  font-style: italic;
}

#share-container.saved-url::after {
  content: "✅ Image saved for reliable sharing on social media";
  display: block;
  font-size: 0.75rem;
  color: #388e3c;
  margin-top: 0.5rem;
  font-weight: 500;
}

.regular-button {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  background: #0070f3;
  color: white;
  border: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-height: 50px;
  font-weight: 600;
  margin: 1rem 0;
}

.regular-button:hover {
  background: #0051b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,112,243,0.3);
}

.regular-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,112,243,0.3);
}

.regular-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.regular-button.button-active {
  background: #28a745 !important;
  animation: pulse 0.6s;
}

.regular-button.button-capture {
  background: #ff6b35 !important;
  animation: glow 1s infinite;
}

.accordion {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin: 1rem 0;
  overflow: hidden;
}

.accordion-header {
  padding: 1rem;
  background: #f1f3f4;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #333;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: #e8eaed;
}

.accordion-toggle {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.accordion-toggle.expanded {
  transform: rotate(90deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.expanded {
  max-height: 500px;
}

.accordion-section {
  padding: 1rem;
  border-top: 1px solid #e9ecef;
}

.accordion-section:first-child {
  border-top: none;
}

.accordion-section h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
}

.accordion-section .content-box {
  background: #fff;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #333;
  max-height: 150px;
  overflow-y: auto;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px currentColor; }
  50% { box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid #e9ecef;
}

.powered-by-text {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  margin: 0;
}

.venice-logo {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.venice-logo:hover {
  opacity: 1;
}

#status {
  margin: 1rem 0;
  padding: 0.5rem;
  border-radius: 4px;
  background: #f5f5f5;
  text-align: center;
}

#dogified-image {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile optimization */
@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }
  
  .camera-container {
    gap: 0.5rem;
  }
  
  .side-button {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  
  .vertical-text {
    font-size: 0.6rem;
  }
  
  #video, #canvas {
    max-width: 250px;
  }
}
