/* Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, #1b2a3a 0%, #05070b 55%, #020308 100%);
  color: #e5f0ff;
  min-height: 100vh;
}

/* Splash */
#splash {
  position: fixed;
  inset: 0;
  background: #05070b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.6s ease;
}

#splash-img {
  width: 160px;
  height: auto;
}

/* App shell */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 72px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.ma-header {
  padding: 8px 0 16px;
}

.ma-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ma-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: radial-gradient(circle at top, #3aa0ff, #0b1624);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(58, 160, 255, 0.6);
}

.ma-logo-a {
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
}

.ma-logo-text h1 {
  font-size: 22px;
  font-weight: 600;
}

.ma-logo-text p {
  font-size: 13px;
  color: #9fb4d9;
}

/* Main */
.ma-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards */
.ma-search-card,
.ma-output-card {
  background: rgba(10, 16, 26, 0.9);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(70, 110, 160, 0.6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

/* Input */
.ma-input-label {
  font-size: 13px;
  color: #9fb4d9;
  margin-bottom: 6px;
  display: block;
}

.ma-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(70, 110, 160, 0.7);
  background: rgba(5, 10, 18, 0.9);
  color: #e5f0ff;
  font-size: 14px;
  outline: none;
}

.ma-input::placeholder {
  color: #5f7397;
}

/* Buttons */
.ma-button-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.ma-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

.ma-btn.primary {
  background: linear-gradient(135deg, #2d9cff, #5fd1ff);
  color: #05070b;
  box-shadow: 0 0 16px rgba(45, 156, 255, 0.7);
}

.ma-btn.secondary {
  background: rgba(12, 20, 32, 0.9);
  color: #e5f0ff;
  border: 1px solid rgba(70, 110, 160, 0.7);
}

.ma-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

/* Output cards */
.ma-output-card h2 {
  font-size: 15px;
  margin-bottom: 8px;
  color: #c7dcff;
}

.ma-output-card p {
  font-size: 14px;
  color: #e5f0ff;
}

/* Settings panel (existing styles can be merged) */
#settingsPanel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: rgba(5, 10, 18, 0.98);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 16px;
  transition: bottom 0.3s ease;
  max-width: 480px;
  margin: 0 auto;
  z-index: 9999; /* ⭐ FIX: ensures panel is above everything */
}

#closeSettings {
  position: relative;
  z-index: 10000; /* ⭐ FIX: ensures button is clickable */
}

#settingsContent {
  max-height: 70vh;
  overflow-y: auto;
}

.setting-row,
.setting-section {
  margin-bottom: 14px;
}

.setting-section h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.small-text {
  font-size: 12px;
  color: #9fb4d9;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #3a4a63;
  transition: 0.2s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2d9cff;
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Bottom nav */
.ma-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 16px 12px;
  background: rgba(5, 10, 18, 0.96);
  border-top: 1px solid rgba(70, 110, 160, 0.6);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.nav-item {
  flex: 1;
  border: none;
  background: transparent;
  color: #9fb4d9;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.nav-active {
  color: #e5f0ff;
}

/* QR image */
#qr-img {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  border: 1px solid rgba(70, 110, 160, 0.7);
  background: #05070b;
  object-fit: contain;
}
.ma-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 0 18px rgba(58, 160, 255, 0.6);
}
.ma-page {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ma-page-title {
  font-size: 20px;
  font-weight: 600;
  color: #e5f0ff;
  margin-bottom: 8px;
}

.ma-profile-card {
  background: rgba(10, 16, 26, 0.9);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(70, 110, 160, 0.6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.ma-profile-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: #c7dcff;
}

.ma-profile-card p {
  font-size: 14px;
  color: #e5f0ff;
}

