: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;
  position: relative;
  overflow: hidden;
}

.import-box:active {
  opacity: 0.85;
}

#importText {
  pointer-events: none;
}

#importBox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Buttons */
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;
}

/* Status */
.status {
  margin-bottom: 16px;
  font-size: 15px;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

/* Footer */
.footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none;
}

/* Hide native file input */
input[type="file"] {
  display: none;
}

/* Theme switch */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-switch .icon {
  font-size: 14px;
  opacity: 0.7;
}

.theme-switch input {
  display: none;
}

.theme-switch .slider {
  position: relative;
  width: 42px;
  height: 22px;
  background: #555;
  border-radius: 20px;
}

.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);
}
