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

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface2: #22222e;
  --border: #2a2a3a;
  --text: #e0e0e8;
  --text2: #8888a0;
  --accent: #6c5ce7;
  --accent-hover: #7c6cf7;
  --green: #00b894;
  --red: #e74c3c;
  --yellow: #f39c12;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text2);
  margin-top: 0.25rem;
}

/* Download */
.download-section {
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover { background: var(--border); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  border-radius: 12px;
}

.btn-small {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
}

.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.85; }

.btn-add { background: var(--green); border-color: var(--green); color: #fff; }
.btn-add:hover { opacity: 0.85; }

.hint {
  color: var(--text2);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.manual-cmd {
  margin-top: 1rem;
  color: var(--text2);
  font-size: 0.85rem;
}
.manual-cmd summary { cursor: pointer; }
.manual-cmd code {
  display: inline-block;
  background: var(--bg);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  margin: 0.5rem 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--green);
  word-break: break-all;
}

.badge {
  background: var(--accent);
  color: #fff;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
}

/* Mod list */
.mod-list-section {
  margin-bottom: 1.5rem;
}

.mod-list-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.mod-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mod-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.mod-card:hover { border-color: var(--accent); }

.mod-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}

.mod-info { flex: 1; min-width: 0; }

.mod-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.mod-name span {
  color: var(--text2);
  font-weight: 400;
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

.mod-meta {
  color: var(--text2);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-actions { flex-shrink: 0; }

.empty-state {
  text-align: center;
  color: var(--text2);
  padding: 2rem;
}

/* Admin */
.admin-section details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.admin-section summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text2);
}

.admin-content { padding: 0 1rem 1rem; }

.admin-login {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input[type="text"],
input[type="password"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
input:focus { border-color: var(--accent); }

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 999;
  animation: fadeIn 0.2s;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* SmartScreen guide */
.smartscreen-guide {
  margin-top: 1.25rem;
}

.smartscreen-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--yellow);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.smartscreen-toggle:hover {
  background: var(--surface2);
  border-color: var(--yellow);
}

.smartscreen-steps {
  display: none;
  margin-top: 1rem;
  text-align: left;
}
.smartscreen-guide.open .smartscreen-steps {
  display: block;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--text2);
  margin-top: 0.5rem;
}

.step-content p strong {
  color: var(--text);
}

/* Mock SmartScreen windows */
.step-mock {
  background: #1b3a5c;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  border: 1px solid #264a73;
}

.mock-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.mock-shield {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.mock-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.mock-desc {
  color: #a0c4e8;
  font-size: 0.78rem;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.mock-link {
  margin-top: 0.75rem;
  color: #7cb8e4;
  text-decoration: underline;
  cursor: default;
  font-size: 0.78rem;
  display: inline-block;
}

.mock-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

.mock-btn {
  padding: 0.35rem 1rem;
  border-radius: 4px;
  font-size: 0.78rem;
  background: #2a4f75;
  color: #a0c4e8;
  border: 1px solid #3a6a96;
}

.mock-btn-active {
  background: #3a7bd5;
  color: #fff;
  border-color: #5a9be5;
}

@keyframes pulse-highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
  50% { box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.4); }
}

.highlight-pulse {
  animation: pulse-highlight 2s ease-in-out infinite;
  border-radius: 4px;
  padding: 2px 4px;
}

/* Responsive */
@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; }
  .btn-large { padding: 0.75rem 1.5rem; font-size: 1rem; }
  .mod-icon { width: 40px; height: 40px; }
}
