/* Mobile PPT Generator Styles */

:root {
  --color-primary:  #282a43;
  --color-secondary:#85A3E4;
  --color-support:  #5B5F77;
  --color-accent:   #FFBB00;
  --color-neutral:  #85858B;
  --color-bg:       #F2F8FF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-primary);
  background: var(--color-bg);
  min-height: 100vh;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.container {
  width: 100%;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  padding: 2rem;
  text-align: center;
}

.header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.header p {
  opacity: 0.9;
  font-size: 0.9rem;
}

.content {
  padding: 2rem;
  height: 100vh;
}

.file-upload {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s;
}

.file-upload:hover {
  border-color: var(--color-secondary);
}

.file-upload.dragover {
  border-color: var(--color-secondary);
  background: linear-gradient(135deg, var(--color-bg) 0%, rgba(133, 163, 228, 0.1) 100%);
}

#fileInput {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.selected-files {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-support);
}

.prompt-section {
  margin-bottom: 1.5rem;
}

.prompt-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

#promptTemplate {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.button {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(40, 42, 67, 0.2);
}

.button:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-support) 0%, var(--color-secondary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 42, 67, 0.3);
}

.button:disabled {
  background: var(--color-neutral);
  cursor: not-allowed;
}

.button.accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #ffcc33 100%);
  color: var(--color-primary);
  font-weight: 700;
}

.button.accent:hover:not(:disabled) {
  background: linear-gradient(135deg, #e6a600 0%, var(--color-accent) 100%);
}

.progress-container {
  margin-top: 1.5rem;
  display: none;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(133, 133, 139, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #002F5F 0%, #00B2FF 100%);
  width: 0%;
  transition: width 0.3s ease;
}

.status {
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.9rem;
  white-space: pre-wrap;
  display: none;
}

.status.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.status.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}

.status.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

/* AI Status Styles */
.ai-status {
  color: white;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ai-status.downloading {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

.ai-status.ready {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.ai-status.error {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

.ai-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

.ai-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.3s ease;
  width: 0%;
}

.downloading .ai-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: downloading 2s infinite;
}

/* Upload Description */
.upload-description {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* Button Variants */
.button.primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.button.secondary {
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
}

.button.test-button {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  margin-bottom: 0.5rem;
}

/* Progress Text */
.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-support);
  margin-top: 0.5rem;
}

/* Animations */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes downloading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 0.75rem;
    align-items: center;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 8px;
  }
  
  .header {
    padding: 1.5rem 1rem;
  }
  
  .header h1 {
    font-size: 1.25rem;
  }
  
  .content {
    padding: 1.5rem 1rem;
  }
  
  .file-upload {
    padding: 1.5rem 1rem;
  }
  
  .button {
    font-size: 0.9rem;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }
  
  .container {
    border-radius: 4px;
  }
  
  .header {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 1.1rem;
  }
  
  .content {
    padding: 1rem;
  }
  
  .file-upload {
    padding: 1rem;
  }
  
  .button {
    font-size: 0.85rem;
    padding: 0.7rem;
  }
}

@media (max-width: 320px) {
  body {
    padding: 0.25rem;
  }
  
  .header {
    padding: 0.75rem;
  }
  
  .content {
    padding: 0.75rem;
  }
  
  .file-upload {
    padding: 0.75rem;
  }
}
