:root {
  --primary-color: #2d8659;
  --primary-hover: #36a169;
  --primary-active: #236b47;
  --secondary-color: #0d9488;
  --alternate-color: #c4b5fd;
  --success-color: #2d8659;
  --error-color: #ef4444;
  --text-primary: #bfdbfe;
  --text-secondary: #93c5fd;
  --bg-primary: linear-gradient(135deg, #1e1b4b 0%, #1e3a8a 100%);
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --border-color: rgba(191, 219, 254, 0.2);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  width: 380px;
  min-height: 400px;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(196, 181, 253, 0.3);
}

h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--alternate-color);
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Options Section */
.options {
  margin-bottom: 24px;
}

.section-heading {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.option-group {
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.08);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.checkbox-label input[type="checkbox"]:focus {
  outline: 2px solid var(--alternate-color);
  outline-offset: 2px;
}

.checkbox-label span {
  font-size: 14px;
  font-weight: 500;
}

.help-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-left: 28px;
}

/* Actions Section */
.actions {
  margin-bottom: 16px;
}

.btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:focus {
  outline: 2px solid var(--alternate-color);
  outline-offset: 2px;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  background: var(--primary-active);
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 18px;
}

.status-message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-message.success {
  background: rgba(45, 134, 89, 0.2);
  color: #6ee7b7;
  border: 1px solid var(--success-color);
}

.status-message.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid var(--error-color);
}

.status-message.loading {
  background: rgba(13, 148, 136, 0.2);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

/* Footer */
.footer {
  padding-top: 16px;
  border-top: 1px solid rgba(196, 181, 253, 0.3);
}

.footer-text {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 11px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  color: var(--alternate-color);
}

/* Loading spinner animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-icon.loading {
  animation: spin 1s linear infinite;
}
