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

:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-color: #6c757d;
  --secondary-hover: #5a6268;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --border-color: #dee2e6;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-text);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  margin: 0;
}

/* Version footer (bottom-right) */
.app-version-footer {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 9999;
  font-size: 12px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(6px);
}

/* Card Container */
.card {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  animation: fadeIn 0.3s ease;
}

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

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark-text);
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-text);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-text);
}

/* Panel */
.panel {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
}

/* Row */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.row > * {
  flex: 1 1 auto;
}

/* Buttons */
button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  min-height: 44px; /* Touch target size */
}

button:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  background: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
}

button.secondary {
  background: var(--secondary-color);
}

button.secondary:hover:not(:disabled) {
  background: var(--secondary-hover);
}

button.success {
  background: var(--success-color);
}

button.danger {
  background: var(--danger-color);
}

/* Input Fields */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
  background: white;
  min-height: 44px; /* Touch target size */
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-text);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-text);
  white-space: nowrap;
}

/* Small Text */
.small {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
}

/* Code */
code {
  background: var(--light-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: var(--danger-color);
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Video Container */
.video-container {
  margin-bottom: 30px;
  background: var(--light-bg);
  padding: 15px;
  border-radius: var(--border-radius);
}

.video-container h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--dark-text);
}

.video-container video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  background: #000;
}

.video-controls {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Checkbox */
input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-right: 8px;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .card {
    padding: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .row > * {
    width: 100%;
  }

  button {
    width: 100%;
    margin-bottom: 10px;
  }

  .badge {
    font-size: 12px;
    padding: 4px 8px;
  }

  .video-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .video-controls button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  .card {
    padding: 15px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .panel {
    padding: 15px;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Loading Animation */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 200px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-container {
  width: 100%;
  max-width: 400px;
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--info-color));
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: pulse 2s ease-in-out infinite;
}

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

.progress-text {
  text-align: center;
  font-size: 14px;
  color: var(--dark-text);
  font-weight: 500;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 12px;
  color: #6c757d;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 5px;
  position: relative;
}

.progress-step.active {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-step.completed::before {
  content: "✓";
  color: var(--success-color);
  margin-right: 5px;
}

/* Camera Progress */
.camera-progress {
  margin-bottom: 15px;
  padding: 15px;
  background: var(--light-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.camera-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.camera-progress-name {
  font-weight: 600;
  color: var(--dark-text);
}

.camera-progress-status {
  font-size: 12px;
  color: #6c757d;
}

.camera-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--light-bg);
  border-radius: 3px;
  overflow: hidden;
}

.camera-progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Video List Items */
.video-list-item {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  background: white;
  transition: var(--transition);
  margin-bottom: 10px;
}

.video-list-item:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
  transform: translateX(5px);
}

.video-list-item:active {
  transform: translateX(2px);
}

/* Empty State */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
}

.empty-state::before {
  content: "📹";
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
}


