@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

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

:root {
  /* Apple Industrial Standard Palette - Dark Mode (Default) */
  --bg: #000000;
  --surface: rgba(28, 28, 30, 0.7);
  --surface2: rgba(44, 44, 46, 0.8);
  --surface3: rgba(58, 58, 60, 0.9);
  --accent: #0A84FF; /* Apple System Blue */
  --accent-green: #30D158; /* Apple System Green */
  --accent-red: #FF453A; /* Apple System Red */
  --accent-gradient: linear-gradient(180deg, #0A84FF 0%, #007AFF 100%);
  --text: #FFFFFF;
  --text-secondary: #8E8E93;
  --text-inverse: #FFFFFF;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: 'SF Mono', 'Space Mono', monospace;
  --blur: blur(20px) saturate(180%);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #F2F2F7;
  --surface: rgba(255, 255, 255, 0.7);
  --surface2: rgba(242, 242, 247, 0.8);
  --surface3: rgba(229, 229, 234, 0.9);
  --accent: #007AFF;
  --text: #000000;
  --text-secondary: #8E8E93;
  --text-inverse: #FFFFFF;
  --border: rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

html, body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Apple Standard Layout ─────────────────────────── */

.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Header ─────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  position: sticky;
  top: 0;
  background: transparent;
  backdrop-filter: var(--blur);
  z-index: 100;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.2);
}

.logo-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}

.theme-toggle, .qr-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.theme-toggle svg, .qr-btn svg {
  width: 16px;
  height: 16px;
}

.theme-toggle:hover, .qr-btn:hover {
  background: var(--surface3);
  transform: scale(1.05);
}

.my-badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface2);
  padding: 2px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  height: 32px;
  min-width: 60px;
  flex-shrink: 1;
  overflow: hidden;
}

.my-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-id {
  font-size: 8px;
  color: var(--text-secondary);
  font-family: var(--mono);
  line-height: 1.1;
  opacity: 0.8;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  padding: 0 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  height: 32px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  flex-shrink: 0;
}

.status-dot.connected {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

#status-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── Responsive Header ────────────────────────────── */

@media (max-width: 600px) {
  .logo-name { display: none; } /* Show only icon on small mobile */
  .status-pill { padding: 0 8px; }
  #status-text { font-size: 10px; }
  .header-right { gap: 6px; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .logo-name { font-size: 17px; }
  .header-right { gap: 8px; }
}

/* ─── Main Grid ──────────────────────────────────────── */

.main-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ─── Cards ──────────────────────────────────────────── */

.card {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.span-full {
  grid-column: 1 / -1;
}

/* ─── Mode Selector & Panels ────────────────────────── */

.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.mode-tab.active {
  background: rgba(10, 132, 255, 0.1);
  border-color: var(--accent);
}

.mode-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.mode-info {
  min-width: 0;
}

.mode-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.mode-desc {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-panel {
  background: var(--surface2);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  animation: fadeIn 0.3s ease;
}

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

.mode-help-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* ─── Step Headers ─────────────────────────────────── */

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}

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

/* ─── Room System ────────────────────────────────────── */

.room-box {
  background: var(--surface2);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.room-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.room-info {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 500;
}

.room-input-wrap {
  display: flex;
  gap: 6px;
}

.room-input-wrap input {
  flex: 1;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.room-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.room-input-wrap button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.room-status {
  font-size: 10px;
  margin-top: 8px;
  color: var(--text-secondary);
}

#current-room {
  color: var(--accent);
  font-weight: 700;
}

/* ─── Drop Zone ──────────────────────────────────────── */

.drop-zone {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 16px;
  padding: 32px 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.drop-zone:hover, .drop-zone.drag-over {
  background: var(--surface3);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.drop-zone:active {
  transform: scale(0.99);
}

.drop-icon {
  font-size: 40px;
  margin-bottom: 4px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.drop-zone:hover .drop-icon {
  transform: scale(1.05) translateY(-5px);
}

.drop-label {
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.drop-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  opacity: 0.8;
}

/* Hide default file input completely */
#file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.send-btn {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 10px;
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.send-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.send-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn.error {
  background: var(--surface2);
  color: var(--text-secondary);
  border: 1px dashed var(--border);
  font-weight: 400;
  font-size: 14px;
}

/* ─── Peer List ──────────────────────────────────────── */

.peer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.peer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.peer-item:hover {
  background: var(--surface3);
}

.peer-item.selected {
  border-color: var(--accent);
  background: rgba(10, 132, 255, 0.1);
}

.peer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

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

.peer-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peer-meta {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--mono);
}

/* ─── Stats ──────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-box {
  padding: 16px 12px;
  background: var(--surface2);
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.stat-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--mono);
}

.stat-val.green { color: var(--accent-green); }
.stat-val.blue { color: var(--accent); }

.stat-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ─── Transfer Center ────────────────────────────────── */

.transfer-tabs {
  display: flex;
  background: var(--surface2);
  padding: 2px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--surface3);
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.transfer-settings {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 16px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.switch-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.queue-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.clear-btn:hover {
  background: rgba(255, 69, 58, 0.1);
}

.save-all-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.save-all-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.4);
  opacity: 0.9;
}

.save-all-btn:active {
  transform: translateY(0);
}

.file-queue, .recv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.file-queue::-webkit-scrollbar, .recv-list::-webkit-scrollbar {
  width: 4px;
}

.file-queue::-webkit-scrollbar-thumb, .recv-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.file-item, .recv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.file-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface3);
  border-radius: 10px;
}

.file-preview-container {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface3);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.file-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-icon-placeholder {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--surface2);
  border-radius: 10px;
}

.file-details, .recv-details {
  flex: 1;
  min-width: 0;
}

.file-name, .recv-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size, .recv-meta {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--mono);
}

.progress-wrap {
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  width: 0%;
  transition: width 0.3s;
}

.file-info-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.file-stat {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.file-stat.sending { color: var(--accent); }
.file-stat.done { color: var(--accent-green); }

.file-eta {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--mono);
}

.remove-file {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}

.remove-file:hover {
  color: var(--accent-red);
}

.dl-btn {
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ─── Transfer Animation ────────────────────────────── */

.transfer-anim {
  display: none;
  background: var(--surface2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.transfer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  z-index: 2;
}

.transfer-track {
  width: 100%;
  height: 40px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.05);
}

.transfer-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--mono);
}

.cancel-btn {
  background: var(--surface3);
  color: var(--accent-red);
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background: var(--accent-red);
  color: white;
}

.transfer-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fly-dot 1.2s linear infinite;
  top: 50%;
  margin-top: -3px;
  opacity: 0.8;
  filter: blur(1px);
}

@keyframes fly-dot {
  0% { left: -10px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% + 10px); opacity: 0; }
}

@media (max-height: 700px) {
  .page-wrap {
    gap: 8px;
    padding-bottom: 12px;
  }
  .header {
    height: 48px;
  }
  .card {
    padding: 12px;
  }
  .card-title {
    margin-bottom: 8px;
  }
  .drop-zone {
    padding: 16px;
    gap: 4px;
  }
  .drop-icon {
    font-size: 32px;
  }
  .drop-label {
    font-size: 15px;
  }
  .send-btn {
    padding: 10px;
    margin-top: 8px;
    font-size: 14px;
  }
}

/* ─── Toasts ────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface3);
  backdrop-filter: var(--blur);
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ─── Modals ────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto; /* Allow overlay to scroll if modal is taller than screen */
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  margin: auto; /* Center in scrollable overlay */
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
}

/* About Modal Specific - Apple Style Glass */
.about-modal {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  max-width: 460px !important;
  width: 100% !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  color: #000000 !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.2) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
}

[data-theme="dark"] .about-modal {
  background: rgba(28, 28, 30, 0.97) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

.about-modal .modal-title,
.about-modal .modal-body,
.about-modal h3,
.about-modal h4,
.about-modal p,
.about-modal b {
  color: #000000 !important;
}

[data-theme="dark"] .about-modal .modal-title,
[data-theme="dark"] .about-modal .modal-body,
[data-theme="dark"] .about-modal h3,
[data-theme="dark"] .about-modal h4,
[data-theme="dark"] .about-modal p,
[data-theme="dark"] .about-modal b {
  color: #ffffff !important;
}

.about-modal .modal-header {
  padding: 18px 20px 12px !important;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .about-modal .modal-header {
  border-bottom-color: rgba(255,255,255,0.08);
}

.about-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-logo-mini {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0A84FF, #30D158);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.about-modal .close-icon-btn {
  background: rgba(0,0,0,0.06);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: #000;
}

[data-theme="dark"] .about-modal .close-icon-btn {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* About Inner Tabs */
.about-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

[data-theme="dark"] .about-tabs {
  background: rgba(255,255,255,0.04);
  border-bottom-color: rgba(255,255,255,0.08);
}

.about-tab {
  flex: 1;
  padding: 7px 6px;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: rgba(0,0,0,0.45);
  transition: all 0.2s;
}

[data-theme="dark"] .about-tab {
  color: rgba(255,255,255,0.4);
}

.about-tab.active {
  background: white;
  color: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="dark"] .about-tab.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Tab Panels */
.about-modal .modal-body {
  padding: 18px 20px !important;
  flex-grow: 1;
  overflow: hidden;
  margin-bottom: 0 !important;
}

.about-tab-panel {
  display: none;
}

.about-tab-panel.active {
  display: block;
}

.about-tagline {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
  color: #000 !important;
}

[data-theme="dark"] .about-tagline {
  color: #fff !important;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.feat-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .feat-item {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

.feat-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.feat-text {
  font-size: 12px;
  line-height: 1.4;
  color: #000;
}

[data-theme="dark"] .feat-text {
  color: #fff;
}

.features-grid.compact {
  gap: 8px;
  margin-bottom: 0;
}

.features-grid.compact .feat-text {
  font-size: 11px;
}

/* Support Tab */
.support-body {
  text-align: center;
  padding: 8px 0;
}

.support-emoji {
  font-size: 44px;
  margin-bottom: 12px;
}

.kofi-btn {
  display: block;
  width: 100%;
  margin: 14px 0 8px;
  padding: 13px;
  background: linear-gradient(135deg, #FF9500, #FFCC00);
  color: white !important;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255,149,0,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.kofi-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255,149,0,0.45);
}

.support-note {
  font-size: 11px !important;
  opacity: 0.45;
  margin: 0 !important;
}

.about-modal .modal-footer {
  padding: 12px 20px 18px !important;
  flex-shrink: 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .about-modal .modal-footer {
  border-top-color: rgba(255,255,255,0.08);
}



.donation-btn {
  width: 100%;
  padding: 12px;
  background: white;
  color: #FF9500;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
}

.feedback-section {
  margin-bottom: 12px;
}

.feedback-section h4 {
  margin-bottom: 8px;
}

.feedback-form textarea {
  width: 100%;
  height: 80px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  font-size: 13px;
  resize: none;
  margin-bottom: 10px;
}

.submit-feedback-btn {
  width: 100%;
  padding: 10px;
  background: #000000;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.feedback-success-msg {
  text-align: center;
  padding: 20px;
  background: rgba(48, 209, 88, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(48, 209, 88, 0.2);
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-success-msg .success-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.feedback-success-msg h4 {
  margin-bottom: 4px;
}

.feedback-success-msg p {
  font-size: 13px;
  opacity: 0.7;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.modal-btn.primary {
  background: var(--accent-gradient);
  color: white;
}

.modal-btn.secondary {
  background: var(--surface2);
  color: var(--text);
}

.qrcode-container {
  background: white;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
}

/* ─── PWA Banner ────────────────────────────────────── */

.install-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  padding: 16px 20px;
  border-radius: 20px;
  display: none;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 2000;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .install-banner {
  background: rgba(28, 28, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

@keyframes slideUp {
  from { transform: translateY(100px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.install-info {
  flex: 1;
}

.install-title {
  font-weight: 700;
  font-size: 15px;
  color: #000;
}

[data-theme="dark"] .install-title {
  color: #fff;
}

.install-text {
  font-size: 13px;
  color: rgba(0,0,0,0.6);
}

[data-theme="dark"] .install-text {
  color: rgba(255,255,255,0.6);
}

.install-btn {
  background: #007AFF;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.install-btn:hover {
  background: #0063CC;
  transform: scale(1.02);
}

.install-btn:active {
  transform: scale(0.98);
}

.install-close {
  background: rgba(0,0,0,0.05);
  border: none;
  color: #000;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .install-close {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.install-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}

/* ─── Utilities ──────────────────────────────────────── */

.empty-msg {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 32px 0;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
