/* Premium Dark Mode Glassmorphic Stylesheet */
:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(20, 26, 46, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary-glow: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --btn-hover-glow: rgba(168, 85, 247, 0.4);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-accent: #a855f7;
  --text-success: #10b981;
  --text-error: #ef4444;
  
  --dropzone-border: rgba(168, 85, 247, 0.3);
  --dropzone-active: #6366f1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
  position: relative;
}

/* Background decorative glows */
body::before, body::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.3;
}

body::before {
  background: #6366f1;
  top: 15%;
  left: 15%;
}

body::after {
  background: #ec4899;
  bottom: 15%;
  right: 15%;
}

.container {
  max-width: 620px;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
}

header {
  margin-bottom: 2.5rem;
}

.brand-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 10px rgba(168, 85, 247, 0.4));
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

p.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

p.subtitle b {
  color: var(--text-main);
  background: var(--primary-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* File Drop Zone */
.dropzone {
  border: 2px dashed var(--dropzone-border);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.dropzone:hover {
  border-color: var(--text-accent);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

.dropzone.dragover {
  border-color: var(--dropzone-active);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.2);
}

.dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.dropzone:hover .dropzone-icon {
  color: var(--text-accent);
  transform: translateY(-2px);
}

.dropzone-text {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.dropzone-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* File Details Card */
.file-details {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  text-align: left;
  animation: fadeIn 0.3s ease-out forwards;
}

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

.file-icon {
  width: 32px;
  height: 32px;
  margin-right: 0.75rem;
  color: var(--text-accent);
  flex-shrink: 0;
}

.file-info {
  flex-grow: 1;
  overflow: hidden;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  background: var(--primary-glow);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--btn-hover-glow);
}

.btn:hover:not(:disabled)::before {
  opacity: 1;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

/* Custom Progress Bar */
.progress-container {
  margin: 1.5rem 0 2rem;
  text-align: left;
  display: none;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.progress-status {
  font-weight: 600;
  color: var(--text-main);
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-glow);
  border-radius: 999px;
  transition: width 0.1s linear;
}

/* Video Preview Container */
.preview-container {
  display: none;
  margin-top: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.4s ease-out forwards;
}

video {
  width: 100%;
  display: block;
  max-height: 360px;
  object-fit: contain;
}

/* Footer styling */
footer {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

footer a:hover {
  color: var(--text-accent);
  border-color: var(--text-accent);
}

/* Browser compatibility alert */
.compat-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: left;
  display: none;
}

.compat-alert h3 {
  color: var(--text-error);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
