:root {
  --bg: #f2f2f7;
  --text: #000;
  --card: #fff;
  --accent: #007aff;
}

[data-theme="dark"] {
  --bg: #1c1c1e;
  --text: #fff;
  --card: #2c2c2e;
  --accent: #0a84ff;
}

@font-face {
  font-family: 'MyFont';
  src: url('fonts/LeoSansFree-BW4jw.otf') format('opentype');
}

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

header {
  background: var(--accent);
  color: white;
  padding: 1rem;
  text-align: center;
}

h1 {
  font-family: 'MyFont', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: 0.3rem;
}

.tagline {
  font-family: 'MyFont', sans-serif;
  margin-top: 0;
}

.banner {
  background: #ffeb3b;
  color: #333;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid #ccc;
}

[data-theme="dark"] .banner {
  background: #fdd835;
  color: #1c1c1e;
  border-color: #444;
}

.theme-toggle-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 1rem 0;
  padding-right: 16px;
}

.toggle-label {
  margin-right: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #bbb;
  transition: background 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: transform 0.3s;
  border-radius: 50%;
}

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

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

[data-theme="dark"] .slider {
  background: #444;
}

.container {
  padding: 1rem;
  max-width: 800px;
  margin: auto;
}

h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
}

.shortcut {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: block;
}

.shortcut-content {
  display: flex;
  align-items: center;
}

.shortcut-title {
  background: var(--accent);
  color: white;
  padding: 2rem 1.25rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 140px;
  max-width: 140px;
  text-align: center;
  margin-right: 1.25rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.shortcut-desc {
  flex-grow: 1;
}

.download {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
}

.more-info {
  background: transparent;
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s, color 0.3s;
  margin-left: auto;
}

.more-info:hover {
  background: var(--accent);
  color: white;
}

/* .button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
} */
.theme-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  margin: 1rem 0;
}

.tips-link {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.3s, color 0.3s;
}

.tips-link:hover {
  background: var(--accent);
  color: white;
}


.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.usage-banner {
  margin: 1rem -1rem -1rem -1rem;
  padding: 1rem;
  background: #1f2a38;
  color: #cce6ff;
  border-top: 1px solid #0a84ff;
  border-radius: 0 0 12px 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .usage-banner {
  background: #1f2a38;
  color: #cce6ff;
  border-left-color: #0a84ff;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 2rem 1rem;
  color: #777;
  background: var(--card);
  border-top: 1px solid #ccc;
}

footer .support-btn {
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
  transition: background 0.3s;
}

footer .support-btn:hover {
  background: #005ecb;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
}
