:root {
  --bg: #0f0f12;
  --card: #1c1c20;
  --text: #ffffff;
  --muted: #9a9aa1;
  --accent: #0a84ff;
  --success: #30d158;
  --error: #ff453a;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #000000;
  --muted: #6e6e73;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  padding: 20px;
}

.card {
  max-width: 420px;
  margin: auto;
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 22px;
}

.subtitle {
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}

/* Import box */
.import-box {
  margin: 24px 0;
  border: 2px dashed var(--accent);
  border-radius: 16px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
}

#importBox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

button {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
}

button:active {
  opacity: 0.85;
}

#installBtn {
  background: var(--accent);
  color: white;
}

.donate-btn {
  margin-top: 16px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.status {
  margin-bottom: 16px;
  font-size: 15px;
}

.status.success { color: var(--success); }
.status.error { color: var(--error); }

.footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

input[type="file"] {
  display: none;
}

/* Theme switch */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-switch input {
  display: none;
}

.theme-switch .slider {
  width: 42px;
  height: 22px;
  background: #555;
  border-radius: 20px;
  position: relative;
}

.theme-switch .slider::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: 0.2s;
}

.theme-switch input:checked + .slider {
  background: var(--accent);
}

.theme-switch input:checked + .slider::after {
  transform: translateX(20px);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-content {
  background: var(--card);
  padding: 24px;
  border-radius: 18px;
  max-width: 420px;
  width: 100%;
}

.modal-text {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 20px;
}

.center {
  text-align: center;
}

/* Donation card */
.donation-card {
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.donation-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.donation-address {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
  margin-bottom: 14px;
}

.copy-btn {
  background: var(--accent);
  color: white;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
}

/* Close button */
.close-btn {
  background: var(--accent);
  color: white;
}

.close-btn.subtle {
  background: transparent;
  color: var(--muted);
  padding: 12px;
}

/* MUST BE LAST */
.hidden {
  display: none !important;
}
