/* =========================================================
   Video Compressor - Scoped Styles (.vc-* prefix)
   Safe to use inside any WordPress / CMS page via shortcode
   ========================================================= */

.vc-app, .vc-app *, .vc-app *::before, .vc-app *::after {
  box-sizing: border-box;
}

.vc-app {
  --vc-bg: #0f172a;
  --vc-bg-2: #1e293b;
  --vc-panel: #ffffff;
  --vc-text: #0f172a;
  --vc-text-light: #64748b;
  --vc-border: #e2e8f0;
  --vc-primary: #6366f1;
  --vc-primary-hover: #4f46e5;
  --vc-primary-light: #eef2ff;
  --vc-success: #10b981;
  --vc-danger: #ef4444;
  --vc-warning: #f59e0b;

  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  color: var(--vc-text);
  overflow-x: hidden;
}

/* Fullscreen mode when standalone */
body:has(> .vc-app:only-child) {
  margin: 0;
  padding: 0;
  height: 100vh;
}

.vc-app h1, .vc-app h2, .vc-app h3, .vc-app p {
  margin: 0;
  padding: 0;
}

/* ========== Header ========== */
.vc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  flex-shrink: 0;
}

.vc-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vc-logo svg {
  width: 32px;
  height: 32px;
  color: #818cf8;
}

.vc-logo h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vc-badge {
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #c7d2fe;
}

/* ========== Main ========== */
.vc-main {
  flex: 1;
  padding: 32px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.vc-screen {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  animation: vcFadeIn 0.4s ease;
}

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

/* ========== Upload Screen ========== */
.vc-dropzone {
  background: rgba(255,255,255,0.98);
  border: 3px dashed var(--vc-border);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 32px;
}

.vc-dropzone:hover, .vc-dropzone.vc-drag-over {
  border-color: var(--vc-primary);
  background: var(--vc-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(99,102,241,0.2);
}

.vc-drop-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: var(--vc-primary);
}

.vc-drop-icon svg {
  width: 100%;
  height: 100%;
}

.vc-dropzone h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--vc-text);
}

.vc-dropzone p {
  color: var(--vc-text-light);
  font-size: 16px;
  margin-bottom: 24px;
}

.vc-supported {
  margin-top: 20px;
  font-size: 13px;
  color: var(--vc-text-light);
}

.vc-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.vc-feature {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  backdrop-filter: blur(10px);
}

.vc-feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.vc-feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.vc-feature p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

/* ========== Buttons ========== */
.vc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.vc-btn-primary {
  background: linear-gradient(135deg, var(--vc-primary) 0%, var(--vc-primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.vc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99,102,241,0.5);
}

.vc-btn-secondary {
  background: #f1f5f9;
  color: var(--vc-text);
  border: 1px solid var(--vc-border);
}

.vc-btn-secondary:hover {
  background: #e2e8f0;
}

.vc-btn-danger {
  background: var(--vc-danger);
  color: #fff;
  margin-top: 20px;
}

.vc-btn-danger:hover {
  background: #dc2626;
}

.vc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========== Editor Screen ========== */
.vc-editor-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
}

.vc-preview-panel, .vc-controls-panel {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.vc-video-wrap {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vc-video-wrap video {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.vc-file-info {
  margin-top: 16px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 13px;
  color: var(--vc-text-light);
  line-height: 1.7;
}

.vc-file-info strong {
  color: var(--vc-text);
}

.vc-controls-panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.vc-control-group {
  margin-bottom: 20px;
}

.vc-control-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--vc-text);
  margin-bottom: 8px;
}

.vc-control-group label span {
  color: var(--vc-primary);
  font-weight: 700;
}

.vc-control-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--vc-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--vc-text);
  font-family: inherit;
  cursor: pointer;
}

.vc-control-group input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--vc-border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.vc-control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--vc-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,0.4);
}

.vc-control-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--vc-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,0.4);
}

.vc-slider-info {
  margin-top: 6px;
  font-size: 12px;
  color: var(--vc-text-light);
}

.vc-preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.vc-preset {
  padding: 10px;
  border: 2px solid var(--vc-border);
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--vc-text);
  font-family: inherit;
}

.vc-preset:hover {
  border-color: var(--vc-primary);
  color: var(--vc-primary);
}

.vc-preset.active {
  background: var(--vc-primary);
  color: #fff;
  border-color: var(--vc-primary);
}

.vc-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 0 !important;
}

.vc-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--vc-primary);
}

.vc-checkbox span {
  color: var(--vc-text) !important;
  font-weight: 500 !important;
}

.vc-estimate {
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  border: 1px solid #c7d2fe;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.vc-estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: var(--vc-text-light);
}

.vc-estimate-row strong {
  color: var(--vc-text);
  font-size: 15px;
}

.vc-estimate-row.vc-savings {
  border-top: 1px solid #c7d2fe;
  margin-top: 4px;
  padding-top: 10px;
}

.vc-estimate-row.vc-savings strong {
  color: var(--vc-success);
  font-size: 17px;
}

.vc-actions {
  display: flex;
  gap: 10px;
}

.vc-actions .vc-btn {
  flex: 1;
}

/* ========== Processing Screen ========== */
.vc-process-card, .vc-result-card {
  background: #fff;
  border-radius: 24px;
  padding: 48px;
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.vc-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.vc-spinner svg {
  width: 100%;
  height: 100%;
  animation: vcSpin 2s linear infinite;
}

.vc-spinner circle {
  stroke: var(--vc-primary);
  stroke-dasharray: 90 150;
  stroke-linecap: round;
}

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

.vc-process-card h2, .vc-result-card h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.vc-process-card p {
  color: var(--vc-text-light);
  margin-bottom: 24px;
}

.vc-progress {
  height: 12px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin: 20px 0 8px;
}

.vc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--vc-primary), #a855f7);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}

.vc-progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--vc-primary);
}

/* ========== Result Screen ========== */
.vc-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: var(--vc-success);
  background: #d1fae5;
  border-radius: 50%;
  padding: 16px;
  animation: vcPop 0.5s ease;
}

@keyframes vcPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.vc-success-icon svg { width: 100%; height: 100%; }

.vc-result-video-wrap {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
  aspect-ratio: 16/9;
}

.vc-result-video-wrap video {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: contain;
}

.vc-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.vc-stat {
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 12px;
  min-width: 120px;
  text-align: center;
}

.vc-stat-arrow {
  background: transparent;
  font-size: 24px;
  color: var(--vc-primary);
  font-weight: 700;
  min-width: auto;
  padding: 0;
}

.vc-stat-label {
  display: block;
  font-size: 12px;
  color: var(--vc-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.vc-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--vc-text);
}

.vc-stat-new .vc-stat-value, .vc-stat-new {
  color: var(--vc-primary) !important;
}

.vc-stat-saved {
  background: #d1fae5;
}

.vc-stat-saved .vc-stat-value {
  color: var(--vc-success);
}

.vc-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.vc-result-actions .vc-btn {
  min-width: 200px;
}

/* ========== Footer ========== */
.vc-footer {
  padding: 16px;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  flex-shrink: 0;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .vc-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .vc-header {
    padding: 14px 16px;
    flex-direction: column;
    gap: 8px;
  }
  .vc-logo h1 { font-size: 18px; }
  .vc-main { padding: 16px; }
  .vc-dropzone { padding: 40px 20px; }
  .vc-dropzone h2 { font-size: 22px; }
  .vc-process-card, .vc-result-card { padding: 28px 20px; }
  .vc-preset-buttons { grid-template-columns: 1fr; }
  .vc-actions { flex-direction: column; }
  .vc-stats { flex-direction: column; gap: 10px; }
  .vc-stat-arrow { transform: rotate(90deg); }
}
