/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Clone Bot Manager — Premium Yellow & Black Theme
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Design Tokens ── */
:root {
  --yellow:        #FFD700;
  --yellow-light:  #FFE566;
  --yellow-dark:   #E6B800;
  --yellow-glow:   rgba(255, 215, 0, 0.25);
  --yellow-soft:   rgba(255, 215, 0, 0.08);

  --black:         #000000;
  --bg-1:          #0A0A0A;
  --bg-2:          #111111;
  --bg-3:          #1A1A1A;
  --bg-4:          #222222;
  --bg-card:       #141414;
  --bg-card2:      #1C1C1C;

  --text-primary:  #FFFFFF;
  --text-secondary:#AAAAAA;
  --text-muted:    #666666;

  --danger:        #FF4444;
  --success:       #22C55E;
  --warning:       #FF9900;

  --border:        rgba(255, 215, 0, 0.12);
  --border-hover:  rgba(255, 215, 0, 0.35);

  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow:        0 4px 24px rgba(0, 0, 0, 0.6);
  --shadow-glow:   0 0 30px rgba(255, 215, 0, 0.15);
  --shadow-card:   0 2px 16px rgba(0, 0, 0, 0.4);

  --font:          'Outfit', -apple-system, sans-serif;
  --transition:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-1);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input { font-family: var(--font); outline: none; }

/* ── Background Particles ── */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--yellow);
  opacity: 0;
  animation: floatParticle var(--dur) ease-in-out infinite;
}
@keyframes floatParticle {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  10%  { opacity: 0.3; }
  90%  { opacity: 0.1; }
  100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

/* ── App Shell ── */
.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  background: linear-gradient(180deg, var(--bg-2) 0%, rgba(17,17,17,0.95) 100%);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.logo-text { display: flex; flex-direction: column; }
.logo-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.logo-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

.user-badge {}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-4), var(--bg-3));
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--yellow);
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Slot Bar */
.slot-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
}
.slot-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.slot-track {
  flex: 1;
}
.slot-dots {
  display: flex;
  gap: 5px;
}
.slot-dot {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-4);
  transition: background var(--transition);
  flex: 1;
}
.slot-dot.used {
  background: linear-gradient(90deg, var(--yellow-dark), var(--yellow));
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}
.slot-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--yellow);
  white-space: nowrap;
}

/* ── Main ── */
.main {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Section ── */
.section {}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── Add Button ── */
.btn-add {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-add:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.25);
}
.btn-add-icon {
  font-size: 22px;
  color: var(--black);
  font-weight: 700;
  line-height: 1;
  margin-top: -2px;
}

/* ── Bot List ── */
.bot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Bot Card ── */
.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  animation: cardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bot-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.08);
}

.bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--yellow-soft), rgba(255, 215, 0, 0.15));
  border: 1.5px solid rgba(255, 215, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.bot-info {
  flex: 1;
  min-width: 0;
}
.bot-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bot-username {
  font-size: 12px;
  color: var(--yellow);
  margin-top: 2px;
  font-weight: 500;
}
.bot-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.bot-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.bot-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}
.bot-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  background: var(--bg-4);
  padding: 2px 6px;
  border-radius: 4px;
}

.bot-remove {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--danger);
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.bot-remove:active {
  transform: scale(0.9);
  background: rgba(255, 68, 68, 0.18);
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
  gap: 12px;
  animation: fadeIn 0.4s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.empty-icon { font-size: 56px; }
.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 240px;
}

/* ── Buttons ── */
.btn-primary {
  padding: 13px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.96); box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  padding: 13px 28px;
  border-radius: var(--radius);
  background: var(--bg-4);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: background var(--transition), transform var(--transition);
}
.btn-secondary:active { transform: scale(0.96); background: var(--bg-3); }

.btn-danger {
  padding: 13px 28px;
  border-radius: var(--radius);
  background: rgba(255, 68, 68, 0.12);
  color: var(--danger);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid rgba(255, 68, 68, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
}
.btn-danger:active { transform: scale(0.96); background: rgba(255, 68, 68, 0.2); }

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal Card ── */
.modal {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  padding: 28px 24px 36px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}
.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--yellow-soft);
  border: 1.5px solid rgba(255, 215, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
}
.modal-icon.danger {
  background: rgba(255, 68, 68, 0.08);
  border-color: rgba(255, 68, 68, 0.2);
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Modal Body ── */
.modal-body { margin-bottom: 24px; }

/* ── Input ── */
.input-group { margin-bottom: 16px; }
.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
}
.input-wrapper {
  position: relative;
}
.input {
  width: 100%;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  padding: 13px 44px 13px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-glow);
}
.input.valid { border-color: var(--success); }
.input.invalid { border-color: var(--danger); }
.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}
.input-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Token Info */
.token-info {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.info-icon { font-size: 16px; flex-shrink: 0; }

/* Validation Box */
.validation-box {
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  animation: slideDown 0.2s ease both;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.validation-box.valid-box {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--success);
}
.validation-box.invalid-box {
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: var(--danger);
}
.validation-box.loading-box {
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid var(--border);
  color: var(--yellow);
}

/* ── Modal Footer ── */
.modal-footer {
  display: flex;
  gap: 10px;
}
.modal-footer > * { flex: 1; text-align: center; }

/* ── Spinner ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: rgba(34, 197, 94, 0.4); color: var(--success); }
.toast.error   { border-color: rgba(255, 68, 68, 0.4); color: var(--danger); }

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 2px; }

/* ── Responsive ── */
@media (max-height: 600px) {
  .header { padding: 10px 16px 0; }
  .main { padding: 14px; }
  .modal { padding: 20px 18px 28px; }
}
