/* dashboard.css - AhoyHomes Video Processing Dashboard */

:root {
  --primary: #1f2937;
  --secondary: #374151;
  --tertiary: #4b5563;
  --background: #111827;
  --surface: #1f2937;
  --card-bg: #2d3748;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --accent: #3b82f6;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --border: #374151;
  --hover: #374151;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  color: var(--text);
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.025em;
}

.full-white-title {
  color: var(--text) !important;
}

/* Modern Card Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease-in-out;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  font-size: 1.5rem;
  opacity: 0.8;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

.card-content {
  color: var(--text-muted);
  line-height: 1.6;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Video Project Cards */
.video-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.video-project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease-in-out;
}

.video-project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.project-icon {
  font-size: 1.5rem;
}

.project-info h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.project-source {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

.format-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.format-item:hover {
  background: var(--hover);
}

.format-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-status {
  font-size: 1.2rem;
}

.format-label {
  font-weight: 500;
  color: var(--text);
}

.format-details {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.format-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-ready { color: var(--success); }
.status-processing { color: var(--warning); }
.status-source { color: var(--accent); }
.status-failed { color: var(--danger); }

.brand-name {
  color: white;
}

.input-section {
  background: #0d1117;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  border-left: 5px solid var(--secondary);
  border: 1px solid #30363d;
}
.input-section h2 {
  color: var(--text);
  margin-bottom: 20px;
  font-size: 1.5em;
}
.input-section h3 {
  color: var(--text-muted);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.dropbox-input { margin-bottom: 30px; }
.url-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.url-input-group input[type="url"], .url-input-group input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 12px;
  border: 2px solid #30363d;
  border-radius: 8px;
  font-size: 14px;
  background: #0d1117;
  color: var(--text);
}
.url-input-group input[type="url"]:focus, .url-input-group input[type="text"]:focus {
  border-color: var(--secondary);
  outline: none;
}
.url-input-group button {
  padding: 12px 24px;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.url-input-group button:hover {
  background: var(--primary);
}

.upload-section { margin-bottom: 30px; }
.upload-area {
  border: 2px dashed #30363d;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #0d1117;
}
.upload-area:hover { border-color: var(--secondary); background: #161b22; }
.upload-area.dragover { border-color: var(--secondary); background: #161b22; }
.upload-content { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-icon { font-size: 3em; }
.upload-content p { margin: 0; font-size: 1.1em; color: var(--text); }
.upload-content small { color: var(--text-muted); }
.file-input-hidden { display: none; }

.platform-selection { margin-top: 20px; }
.processing-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}
.info-card {
  display: flex;
  align-items: center;
  background: #232a36;
  border: 2px solid #333a4a;
  border-radius: 10px;
  padding: 15px;
  transition: all 0.2s;
}
.info-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.info-icon { font-size: 2em; margin-right: 15px; }
.info-content { flex: 1; }
.info-title { font-weight: bold; margin-bottom: 5px; color: var(--secondary); }
.info-desc { font-size: 0.9em; color: var(--text-muted); }

/* Queue Stats - Vertical Layout */
.queue-status {
    background: #0d1117;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #30363d;
}

.queue-status h2 {
    margin: 0 0 20px 0;
    color: var(--secondary);
    font-size: 1.4em;
    text-align: center;
}

.status-item {
    background: var(--surface);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(34, 101, 163, 0.3);
    transition: all 0.3s ease;
}

.status-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 101, 163, 0.2);
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-icon {
    font-size: 1.2em;
    margin-right: 10px;
}

.status-title {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.status-count {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    min-width: 40px;
    text-align: center;
}

.processing-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(34, 101, 163, 0.3);
}

.current-job {
    background: var(--background);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(35, 175, 176, 0.3);
}

.job-filename {
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 8px;
    font-size: 0.9em;
    word-break: break-all;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(34, 101, 163, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
    width: 0%;
}

.progress-text {
    font-size: 0.8em;
    color: var(--text-muted);
    min-width: 35px;
}

.job-status {
    font-size: 0.8em;
    color: var(--text-muted);
    font-style: italic;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  color: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.stat-number { font-size: 2.5em; font-weight: bold; margin-bottom: 5px; }
.stat-label { font-size: 1.1em; opacity: 0.9; }

.sections { display: grid; grid-template-columns: 1fr; gap: 30px; }
.section {
  background: #0d1117;
  border-radius: 15px;
  padding: 25px;
  border: 1px solid #30363d;
}
.section h2 {
  color: var(--text);
  margin-bottom: 20px;
  font-size: 1.5em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}
.file-card {
  background: #161b22;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #30363d;
}
.file-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.25); }
.file-card.processing { border-left-color: var(--warning); }
.file-card.input { border-left-color: var(--input); }
.file-name { font-weight: bold; color: var(--primary); margin-bottom: 8px; word-break: break-all; }
.file-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; font-size: 0.9em; color: var(--text-muted); }
.file-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.processing-status { margin-bottom: 15px; }
.status-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.status-indicator { width: 12px; height: 12px; border-radius: 50%; }
.status-ready { background: #6c757d; }
.status-processing { background: var(--warning); animation: pulse 2s infinite; }
.status-complete { background: var(--success); }
.status-error { background: var(--danger); }
.status-text { font-weight: bold; color: var(--text); }
.progress-bar { position: relative; background: #333a4a; border-radius: 4px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 0.3s ease; }
.progress-text { position: absolute; top: -20px; right: 0; font-size: 0.8em; color: var(--text-muted); }
.processing-indicator { background: #2d2d2d; color: var(--warning); padding: 8px 12px; border-radius: 4px; font-size: 0.9em; border: 1px solid #444; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.btn {
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card-bg);
  color: var(--text);
  min-width: 120px;
  letter-spacing: 0.025em;
}

.btn:hover {
  background: var(--hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  min-width: 100px;
  margin: 0 4px;
}

.btn-danger { 
  background: var(--danger); 
  border-color: var(--danger);
  color: white; 
}
.btn-danger:hover { 
  background: #dc2626; 
  border-color: #dc2626;
}

.btn-primary { 
  background: var(--accent); 
  border-color: var(--accent);
  color: white; 
}
.btn-primary:hover { 
  background: #2563eb; 
  border-color: #2563eb;
}

.btn-success { 
  background: var(--success); 
  border-color: var(--success);
  color: white; 
}
.btn-success:hover { 
  background: #059669; 
  border-color: #059669;
}

.btn-logs { 
  background: var(--tertiary); 
  border-color: var(--tertiary);
  color: var(--text);
}

.btn-logs:hover { 
  background: var(--hover); 
  border-color: var(--accent);
}
.btn-clear-queue { 
  max-width: 150px; 
  white-space: nowrap; 
  font-size: 0.85em; 
  padding: 8px 12px;
}
.btn-download { background: var(--success); color: white; }
.btn-download:hover { background: #218838; }
.btn-process { background: var(--primary); color: white; }
.btn-process:hover { background: var(--tertiary); }
.btn-redo {
  margin-top: 10px;
  background: var(--warning);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}
.btn-redo:hover {
  background: var(--primary);
}

/* File Management Button Styles */
.btn-clear-input {
  background: var(--secondary) !important;
  color: white !important;
  border: 2px solid var(--secondary) !important;
}
.btn-clear-input:hover {
  background: var(--tertiary) !important;
  border-color: var(--tertiary) !important;
  transform: translateY(-1px);
}

.btn-clear-output {
  background: var(--secondary) !important;
  color: white !important;
  border: 2px solid var(--secondary) !important;
}
.btn-clear-output:hover {
  background: var(--tertiary) !important;
  border-color: var(--tertiary) !important;
  transform: translateY(-1px);
}

/* Button Group Separators */
.btn-group-separator {
  border-left: 2px solid #444;
  padding-left: 15px;
  margin-left: 15px;
}
.refresh-controls { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; justify-content: center; flex-wrap: wrap; }
.auto-refresh { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { 
  position: absolute; 
  cursor: pointer; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background-color: #444; 
  transition: .4s; 
  border-radius: 34px;
  border: 2px solid #666;
}
.slider:before { 
  position: absolute; 
  content: ""; 
  height: 24px; 
  width: 24px; 
  left: 3px; 
  bottom: 3px; 
  background-color: #fff; 
  transition: .4s; 
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
input:checked + .slider { 
  background-color: var(--secondary);
  border-color: var(--secondary);
}
input:checked + .slider:before { 
  transform: translateX(26px); 
}
.refresh-btn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 25px; cursor: pointer; font-size: 1em; transition: transform 0.2s; }
.refresh-btn:hover { transform: scale(1.05); }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); font-style: italic; }
.status-indicator { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.status-processing { background: var(--warning); animation: pulse 2s infinite; }
.status-complete { background: var(--success); }
.status-input { background: var(--input); }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Section Divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #404040, transparent);
  margin: 40px 0;
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #555555;
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* Server Metrics */
.metrics-status {
    background: #0d1117;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #30363d;
}

.metrics-status h2 {
    margin: 0 0 20px 0;
    color: var(--warning);
    font-size: 1.4em;
    text-align: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.metric-item {
    background: var(--surface);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.metric-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.metric-icon {
    font-size: 1.2em;
    margin-right: 10px;
}

.metric-title {
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.metric-details {
    margin-bottom: 0;
}

.metric-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.metric-text {
    text-align: center;
    font-size: 0.9em;
    color: var(--text-muted);
}

.storage-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--background);
    border-radius: 6px;
    font-size: 0.9em;
}

.breakdown-label {
    color: var(--text-muted);
}

.breakdown-value {
    color: var(--text);
    font-weight: 500;
}

/* Compact Metrics - Horizontal Layout */
.metrics-status-compact {
    background: #0d1117;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #30363d;
}

.metrics-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

.metric-item-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.metric-icon {
    font-size: 1.1em;
}

.metric-label {
    font-size: 0.9em;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    font-size: 0.9em;
    color: var(--text);
    font-weight: bold;
    min-width: 35px;
}

/* File card metadata styles */
.file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.file-name {
    flex: 1;
    font-weight: bold;
    color: var(--text);
    word-break: break-word;
    margin-right: 10px;
}

.file-preset {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.preset-icon {
    font-size: 1em;
}

.preset-text {
    font-size: 0.9em;
}

/* Organized input files layout */
.input-files-organized {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.preset-column {
    background: var(--background);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #30363d;
}

.preset-column h3 {
    margin: 0 0 15px 0;
    color: var(--text);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.preset-column .preset-icon {
    font-size: 1.2em;
}

/* Job Cards Container - AWS Elemental Style */
.job-cards-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Special styling for completed videos - dynamic height, no scrolling */
#completedFilesList {
    max-height: none !important;
    overflow-y: visible !important;
}

.job-cards-container::-webkit-scrollbar {
    width: 6px;
}

.job-cards-container::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

.job-cards-container::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.job-cards-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* AWS Elemental Style Job Card */
.job-card {
    background: var(--background);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.job-card:hover {
    border-color: #444c56;
    background: #161b22;
    transform: translateX(2px);
}

.job-card.queued {
    border-left-color: #58a6ff;
}

.job-card.processing {
    border-left-color: #f85149;
    background: linear-gradient(90deg, rgba(248, 81, 73, 0.05) 0%, var(--background) 100%);
    animation: processingPulse 2s ease-in-out infinite;
}

.job-card.completed {
    border-left-color: #3fb950;
}

.job-card.failed {
    border-left-color: #f85149;
    background: linear-gradient(90deg, rgba(248, 81, 73, 0.03) 0%, var(--background) 100%);
}

@keyframes processingPulse {
    0% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(248, 81, 73, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0); }
}

/* Job Card Header */
.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-card-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9em;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-card-status {
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-card-status.queued {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
}

.job-card-status.processing {
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
}

.job-card-status.completed {
    background: rgba(63, 185, 80, 0.1);
    color: #3fb950;
}

.job-card-status.failed {
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
}

/* Job Card Metadata */
.job-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.75em;
    color: var(--text-muted);
}

.job-card-type {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-card-time {
    font-style: italic;
}

/* Progress Bar for Processing Jobs */
.job-card-progress {
    margin-top: 8px;
    margin-bottom: 4px;
}

.job-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(88, 166, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.job-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #58a6ff, #1f6feb);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.job-progress-text {
    font-size: 0.7em;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

.job-progress-stage {
    font-size: 0.7em;
    color: var(--warning);
    margin-top: 2px;
    text-align: center;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-list .file-card {
    margin-bottom: 0;
}

/* Download Links Styles (No Video Previews) */
.job-card-videos {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--secondary);
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-item {
    background: var(--tertiary);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.format-info {
    flex: 1;
}

.video-label {
    font-size: 0.9em;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.video-platforms {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.file-name {
    font-size: 0.7em;
    color: var(--text-muted);
    font-family: monospace;
}

.download-actions {
    margin-left: 15px;
}

.preview-video {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    background: black;
    margin-bottom: 10px;
}

.video-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.video-actions .btn {
    padding: 4px 8px;
    font-size: 0.7em;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--success);
    color: white;
}

.btn-primary:hover {
    background: #2ea043;
}

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

.btn-secondary:hover {
    background: #6e6e6e;
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.video-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    z-index: 10001;
}

.fullscreen-video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

/* Format indicator styles */
.format-indicators {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.format-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
}

.format-indicator.format-16-9 {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--format-16-9);
    color: var(--format-16-9);
}

.format-indicator.format-9-16 {
    background-color: rgba(139, 92, 246, 0.1);
    border-color: var(--format-9-16);
    color: var(--format-9-16);
}

.format-indicator.format-4-5 {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--format-4-5);
    color: var(--format-4-5);
}

.format-indicator .icon {
    font-size: 9px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-previews {
        grid-template-columns: 1fr;
    }
    
    .preview-video {
        max-width: 100%;
    }
    
    .video-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .video-actions .btn {
        width: 100%;
        max-width: 150px;
    }
    
    .format-indicators {
        justify-content: center;
    }
}
