/* Left side: Image */
.start-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}
#startImage{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 
    0 4px 20px rgba(0,0,0,.4);
}
#startTitle{
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 28px;
}
#startTitle span {
  color: rgba(120,160,220,0.7);
  font-weight: 500;
}

/* Right side: Login/Welcome and Start */
.start-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 280px;
  max-width: 320px;
  padding: 16px 24px 16px 0;
}

/* Login form styling */
.start-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.start-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.start-input-group label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.start-input-group input {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}
.start-input-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}
.start-input-group input::placeholder {
  color: rgba(255,255,255,0.3);
}

/* Welcome message (shown when logged in) */
.start-welcome {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  line-height: 1.5;
}
.start-welcome strong {
  color: var(--accent);
  font-weight: 600;
}

/* Messages */
.start-message {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: none;
  margin-bottom: 14px;
  line-height: 1.4;
}
.start-message.error {
  display: block;
  background: rgba(255,100,100,0.15);
  border: 1px solid rgba(255,100,100,0.3);
  color: #fca5a5;
}
.start-message.success {
  display: block;
  background: rgba(100,255,150,0.15);
  border: 1px solid rgba(100,255,150,0.3);
  color: #86efac;
}

/* Shared project info banner */
.shared-project-info {
  background: rgba(120, 180, 255, 0.15);
  border: 1px solid rgba(120, 180, 255, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
}
.shared-project-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}
.shared-project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* Hint text */
.start-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  line-height: 1.6;
}
.start-hint strong {
  color: rgba(255,200,150,0.7);
}

/* Gallery link */
.start-gallery-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}
.start-gallery-link:hover {
  text-decoration: underline;
}

/* Start screen links container */
.start-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.start-links .start-gallery-link {
  margin-top: 0;
}

/* Progress row */
#progressRow {
  margin-top: 16px;
  width: 100%;
}

/* Responsive: stack on mobile */
@media (max-width: 800px) {
  #startCardInner {
    flex-direction: column;
    padding: 12px;
    gap: 20px;
  }
  .start-left {
    flex: none;
  }
  #startImage {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .start-right {
    min-width: auto;
    max-width: none;
    width: 100%;
    padding: 8px 12px 12px;
  }
  #startTitle {
  text-align: center;
}
}

/* Settings Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  min-width: 280px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title svg {
  opacity: 0.6;
}
.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.modal-row:last-of-type {
  border-bottom: none;
}
.modal-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.modal-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.modal-row input[type="number"] {
  width: 70px;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
}
.modal-row select {
  padding: 4px 8px;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
}
.modal-row select option {
  background: #1a1d24;
  color: #e0e0e0;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: all 0.15s;
}
.modal-btn:hover {
  background: rgba(255,255,255,0.1);
}
.modal-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.modal-btn.primary:hover {
  filter: brightness(1.1);
}

/* Settings Modal Rows */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.settings-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.settings-row input[type="number"],
.settings-row select {
  padding: 6px 10px;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  min-width: 100px;
}
.settings-row input[type="number"]:focus,
.settings-row select:focus {
  outline: none;
  border-color: var(--accent);
}
.settings-row select option {
  background: #1a1d24;
  color: #e0e0e0;
}

/* Video Export Modal */
.export-modal {
  max-width: 520px;
  width: 90%;
}
.export-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg);
  padding: 4px;
  border-radius: 8px;
}
.export-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.export-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.export-tab.active {
  background: rgba(120,180,255,0.15);
  color: var(--accent);
}
.export-tab-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(120,180,255,0.2);
  border-radius: 4px;
  font-size: 9px;
  margin-left: 6px;
  text-transform: uppercase;
}
.export-section {
  margin-bottom: 16px;
}
.export-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.export-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line2);
}
.export-option:last-child {
  border-bottom: none;
}
.export-option-label {
  font-size: 13px;
  color: var(--text);
}
.export-option-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.export-select {
  padding: 8px 12px;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  min-width: 140px;
  cursor: pointer;
}
.export-select:focus {
  outline: none;
  border-color: var(--accent);
}
.export-select option {
  background: #1a1d24;
  color: #e0e0e0;
}
.export-info-box {
  background: rgba(120,180,255,0.08);
  border: 1px solid rgba(120,180,255,0.2);
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
}
.export-info-box.warning {
  background: rgba(255,200,100,0.08);
  border-color: rgba(255,200,100,0.3);
}
.export-info-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.export-info-box.warning .export-info-title {
  color: var(--gold);
}
.export-info-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.export-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.export-btn {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.export-btn-secondary {
  background: transparent;
  color: var(--muted);
}
.export-btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.export-btn-primary {
  background: linear-gradient(135deg, rgba(120,180,255,0.25), rgba(100,160,240,0.15));
  border-color: rgba(120,180,255,0.4);
  color: var(--accent);
}
.export-btn-primary:hover {
  background: linear-gradient(135deg, rgba(120,180,255,0.35), rgba(100,160,240,0.25));
}
.export-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Export Progress Modal */
.export-progress-modal {
  max-width: 480px;
  width: 90%;
}
.export-progress-preview {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-progress-preview canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.export-progress-bar-container {
  background: var(--bg);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.export-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(120,180,255,0.6));
  border-radius: 6px;
  transition: width 0.1s;
  width: 0%;
}
.export-progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.export-progress-status {
  font-size: 13px;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}
.export-progress-detail {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.export-complete-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 16px;
}
.export-complete-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}
.export-complete-subtitle {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
}
.export-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.export-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.export-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  transition: all 0.2s;
}
.export-toggle-slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--muted);
  border-radius: 50%;
  transition: all 0.2s;
}
.export-toggle input:checked + .export-toggle-slider {
  background: rgba(120,180,255,0.2);
  border-color: rgba(120,180,255,0.4);
}
.export-toggle input:checked + .export-toggle-slider:before {
  transform: translateX(20px);
  background: var(--accent);
}

#startCard .btn.start-btn{
  width: 100%;
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(120,180,255,0.2), rgba(100,160,240,0.1));
  border: 1px solid rgba(120,180,255,0.3);
  color: rgba(200,225,255,0.95);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
#startCard .btn.start-btn::before{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  border-radius: 7px;
}
#startCard .btn.start-btn:hover{
  background: linear-gradient(135deg, rgba(120,180,255,0.3), rgba(100,160,240,0.2));
  border-color: rgba(120,180,255,0.5);
  box-shadow: 0 4px 24px rgba(120,180,255,0.25);
  transform: translateY(-1px);
}
#startCard .btn.start-btn:active{
  transform: translateY(0);
}
#startCard .btn.start-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
#progressRow{
  display:flex; 
  gap:10px; 
  align-items:center; 
  margin-top:14px;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#progressRow.visible{
  opacity: 1;
}
#progressBar{
  flex:1;
  height:5px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.08);
}
#progressFill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(100,160,240,.6), rgba(140,200,255,.8));
  box-shadow: 0 0 12px rgba(120,180,255,0.4);
  transition: width 0.3s ease;
}
#progressText{
  font-size: 10px;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
