:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(18, 24, 38, 0.75);
  --card-border: rgba(255, 255, 255, 0.1);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #a855f7;
  --accent-cyan: #06b6d4;
  --excel-color: #10b981;
  --word-color: #3b82f6;
  --pdf-color: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Background Animated Globs */
.background-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  right: -150px;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 680px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

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

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 13px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-install {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.btn-install:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  transform: translateY(-1px);
}

.badge-status {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--excel-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--excel-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Card Container */
.main-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.section-title h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-title p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.icon-pulse {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  color: var(--primary);
}

.drop-zone h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.drop-zone p {
  font-size: 14px;
  color: var(--text-muted);
}

.btn-browse {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.supported-formats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 12px;
}

.tag {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-excel { background: rgba(16, 185, 129, 0.15); color: var(--excel-color); }
.tag-word { background: rgba(59, 130, 246, 0.15); color: var(--word-color); }
.tag-pdf { background: rgba(239, 68, 68, 0.15); color: var(--pdf-color); }

.max-size-info {
  font-size: 12px !important;
  color: var(--text-muted);
}

/* File Progress */
.file-progress-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.file-info-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.file-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
  font-size: 15px;
  word-break: break-all;
}

.file-size {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s;
}

.btn-icon:hover { color: #fff; }

.progress-bar-wrapper {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.status-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Success & QR Output */
.success-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--excel-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.qr-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 580px) {
  .qr-card {
    grid-template-columns: 1fr;
  }
}

.qr-code-wrapper {
  background: #ffffff;
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.qrcode-box {
  width: 180px;
  height: 180px;
}

.qrcode-box img {
  width: 100%;
  height: 100%;
  display: block;
}

.scan-instruction {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-item .label {
  font-size: 12px;
  color: var(--text-muted);
}

.summary-item .value {
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.badge-expiry {
  color: #f59e0b;
  font-size: 13px !important;
}

.link-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Modal Styling */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.install-step-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.step-badge {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

.install-step-box h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.install-step-box p {
  font-size: 12px;
  color: var(--text-muted);
}

.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.step-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.btn-full {
  width: 100%;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--card-border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 300;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
