:root {
  --color-primary: #38bdf8;
  --color-primary-dark: #0ea5e9;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-bg-light: #f9fafb;
  --color-bg-dark: #0f172a;
  --color-surface-light: #ffffff;
  --color-surface-dark: #1e293b;
  --color-border-light: #e5e7eb;
  --color-border-dark: #374151;
  --color-text-light: #0f172a;
  --color-text-muted-light: #6b7280;
  --color-text-dark: #e5e7eb;
  --color-text-muted-dark: #9ca3af;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.25);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100%;
}

body.theme-light {
  background: linear-gradient(145deg, #e0f2fe, #f9fafb);
  color: var(--color-text-light);
}

body.theme-dark {
  background: radial-gradient(circle at top, #1d283a, #020617);
  color: var(--color-text-dark);
}

#app {
  min-height: 100vh;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

body.theme-light .header {
  background: linear-gradient(120deg, #0f172a, #1e293b);
  color: #e5e7eb;
}

body.theme-dark .header {
  background: linear-gradient(120deg, #020617, #111827);
  color: #e5e7eb;
}

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

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0f172a;
}

.title-block h1 {
  margin: 0;
  font-size: 15px;
}

.subtitle {
  display: block;
  font-size: 11px;
  opacity: 0.85;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #bbf7d0;
  border: 1px solid rgba(16, 185, 129, 0.6);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fed7aa;
  border: 1px solid rgba(245, 158, 11, 0.7);
}

.badge-error {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.7);
}

.badge-neutral {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

body.theme-light .card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-light);
}

body.theme-dark .card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--color-border-dark);
}

.card h2 {
  margin: 0 0 6px 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.card-text {
  margin: 0 0 10px 0;
  font-size: 11px;
  opacity: 0.88;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.btn {
  position: relative;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background-image: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: #0f172a;
  box-shadow: 0 8px 16px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  background-image: linear-gradient(135deg, #38bdf8, #7dd3fc);
}

.btn-secondary {
  background-image: linear-gradient(135deg, #1e293b, #0f172a);
  color: #e5e7eb;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.4);
}

.btn-secondary:hover {
  background-image: linear-gradient(135deg, #111827, #020617);
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.btn-ghost:hover {
  border-style: solid;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.7);
  border-top-color: #e5e7eb;
  animation: spin 0.7s linear infinite;
}

.hidden {
  display: none !important;
}

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

.input-label {
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
  opacity: 0.8;
}

.input {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 6px 8px;
  font-size: 12px;
  margin-bottom: 8px;
  background: transparent;
  color: inherit;
}

.input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.5);
  border-color: #38bdf8;
}

.status-line {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.status-neutral {
  opacity: 0.85;
}

.status-success {
  background: rgba(16, 185, 129, 0.08);
  color: #22c55e;
  border-color: rgba(22, 163, 74, 0.5);
}

.status-warning {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.5);
}

.status-error {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
}

.download-links {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-link {
  font-size: 11px;
  color: #38bdf8;
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}

.log-list {
  margin: 0;
  padding-left: 16px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 11px;
}

.log-list li {
  margin-bottom: 3px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  padding: 4px 6px 2px 6px;
  opacity: 0.8;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  #app {
    padding: 8px;
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  .badge {
    align-self: flex-start;
  }
}

/* Additional styles for new features */
.error-list {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 8px;
  background: rgba(239, 68, 68, 0.05);
}

.error-list h3 {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: var(--color-text-light);
}

.error-list ul {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
}

.error-item {
  margin-bottom: 6px;
  padding: 4px;
  border-radius: var(--radius-md);
}

.error-error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
}

.error-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
}

.error-success {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
}

.error-item small {
  display: block;
  margin-top: 2px;
  opacity: 0.8;
  font-size: 10px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.card-compact {
  padding: 8px;
}

.privacy-notice {
  font-size: 10px;
  opacity: 0.85;
  line-height: 1.4;
}

.filename-display {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 4px;
  font-family: monospace;
}

.btn-success {
  background-image: linear-gradient(135deg, #10b981, #22c55e);
  color: #0f172a;
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  background-image: linear-gradient(135deg, #22c55e, #4ade80);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

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

.modal-content {
  background: var(--color-surface-light);
  border-radius: var(--radius-lg);
  max-width: 800px;
  max-height: 80vh;
  width: 90%;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.debug-section {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
}

.debug-section h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--color-text-light);
}

.debug-section p {
  margin: 4px 0;
  font-size: 12px;
}

.debug-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.debug-table th,
.debug-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.debug-table th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.debug-table tr:last-child td {
  border-bottom: none;
}

.debug-ok {
  color: #10b981;
  font-weight: 600;
}

.debug-error {
  color: #ef4444;
  font-weight: 600;
}

.debug-error-list {
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 12px;
  color: #ef4444;
}

.debug-error-list li {
  margin: 4px 0;
}

/* Lizenz & PayPal Styles */
.license-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.license-badge {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.license-badge.badge-success {
  background: rgba(16, 185, 129, 0.18);
  color: #bbf7d0;
  border: 1px solid rgba(16, 185, 129, 0.6);
}

.license-badge.badge-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fed7aa;
  border: 1px solid rgba(245, 158, 11, 0.7);
}

.license-activate-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.license-input {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.license-input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.5);
  border-color: #38bdf8;
}

.license-divider {
  text-align: center;
  margin: 12px 0;
  position: relative;
  font-size: 11px;
  opacity: 0.6;
}

.license-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.4);
}

.license-divider span {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  padding: 0 8px;
  backdrop-filter: blur(4px);
}

body.theme-dark .license-divider span {
  background: rgba(15, 23, 42, 0.9);
}

.paypal-section {
  margin-top: 8px;
}

.btn-paypal {
  background: linear-gradient(135deg, #0070ba, #003087);
  color: #ffffff;
  box-shadow: 0 6px 12px rgba(0, 112, 186, 0.35);
  border: 1px solid #009cde;
}

.btn-paypal:hover {
  background: linear-gradient(135deg, #009cde, #0070ba);
}

.paypal-logo {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.5px;
}

