/* ── Texter Captcha Solver — Popup Styles ── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg-base: #0c0c14;
  --bg-surface: #14141f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #21213a;
  --bg-elevated: #252540;
  --text-primary: #eaeaf5;
  --text-secondary: #a0a0c0;
  --text-muted: #606080;
  --accent: #7c6aff;
  --accent-light: #9b8dff;
  --accent-glow: rgba(124, 106, 255, 0.25);
  --accent-secondary: #ff6b8a;
  --accent-sec-glow: rgba(255, 107, 138, 0.2);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(124, 106, 255, 0.3);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  width: 400px;
  max-height: 560px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  flex-direction: column;
  height: 560px;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(124, 106, 255, 0.06) 100%);
  border-bottom: 1px solid var(--border);
}

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

.logo h1 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #7c6aff 0%, #ff6b8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  cursor: default;
}

.status-dot .pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ── Tab Bar ── */
.tab-bar {
  position: relative;
  display: flex;
  gap: 0;
  padding: 0 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  position: relative;
  z-index: 1;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent-light);
}

.tab svg {
  opacity: 0.6;
  transition: opacity var(--transition);
}

.tab.active svg {
  opacity: 1;
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 18px;
  height: 2px;
  width: calc((100% - 36px) / 3);
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 2px 2px 0 0;
  transition: transform var(--transition);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ── Tab Panels ── */
.tab-panels {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.tab-panels::-webkit-scrollbar {
  width: 4px;
}

.tab-panels::-webkit-scrollbar-track {
  background: transparent;
}

.tab-panels::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 10px;
}

.tab-panel {
  display: none;
  padding: 14px 18px 10px;
  animation: fadePanel 0.3s ease;
}

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

@keyframes fadePanel {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Section ── */
.section {
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.section-header svg {
  color: var(--accent);
  opacity: 0.8;
}

.section-header h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

/* ── Toggle Cards ── */
.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all var(--transition);
}

.toggle-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.toggle-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.toggle-icon.eci {
  background: linear-gradient(135deg, rgba(124, 106, 255, 0.2), rgba(124, 106, 255, 0.08));
  color: var(--accent-light);
  border: 1px solid rgba(124, 106, 255, 0.15);
}

.toggle-icon.uidai {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.08));
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.15);
}

.toggle-icon.wbreg {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.08));
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.toggle-icon.banglarbhumi {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.08));
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.15);
}

.toggle-icon.examservices {
  background: linear-gradient(135deg, #FF9800, #F44336);
  color: white;
}

.toggle-icon.manabik {
  background: linear-gradient(135deg, #9c27b0, #E91E63);
  color: white;
}

.toggle-icon.emp {
  background: linear-gradient(135deg, #00BCD4, #3F51B5);
  color: white;
}

.toggle-icon.wbsedcl {
  background: linear-gradient(135deg, #FF5722, #FF9800);
  color: white;
}

.toggle-icon.auto-solve {
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.2), rgba(255, 107, 138, 0.08));
  color: var(--accent-secondary);
  border: 1px solid rgba(255, 107, 138, 0.15);
  font-size: 15px;
}

.toggle-icon.rupashree {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(8, 145, 178, 0.08));
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.15);
}

.toggle-icon.edistwb {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.2), rgba(100, 116, 139, 0.08));
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.toggle-icon.kanyashree {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.08));
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.15);
}

.toggle-icon.auto-refresh {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.08));
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.15);
  font-size: 14px;
}

.toggle-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Toggle Switch ── */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition);
}

.switch input:checked+.slider {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: transparent;
  box-shadow: 0 0 12px var(--accent-glow);
}

.switch input:checked+.slider::before {
  left: calc(100% - 16px);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ── Current Site Card ── */
.current-site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.site-url {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  word-break: break-all;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(124, 106, 255, 0.06);
  border-radius: var(--radius-xs);
  border: 1px solid rgba(124, 106, 255, 0.1);
}

.site-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-outline.active {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

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

/* ── Excluded Sites List ── */
.excluded-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 160px;
  overflow-y: auto;
}

.excluded-list::-webkit-scrollbar {
  width: 3px;
}

.excluded-list::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 10px;
}

.excluded-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.2s ease;
}

.excluded-item:last-child {
  border-bottom: none;
}

.excluded-item-url {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  word-break: break-all;
}

.excluded-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.excluded-item-remove:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
}

.empty-excluded {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 4px;
  text-align: center;
}

.empty-excluded p {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.empty-excluded span {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Footer ── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.btn-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  padding: 4px 0;
}

.btn-footer:hover {
  color: var(--accent-light);
}

.version {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ── Misc Animations ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toggle-card.disabled {
  opacity: 0.5;
}

.toggle-card.disabled .toggle-title {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

/* ── Auth Section ── */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 9px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab:hover {
  color: var(--text-secondary);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.auth-form.active {
  display: flex;
}

.auth-input {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-btn {
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 12px var(--accent-glow);
  margin-top: 4px;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

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

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--danger);
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  animation: fadeIn 0.2s ease;
}

/* ── User Card ── */
.user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.user-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

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

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.user-stat {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.user-stat-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-light);
}

.user-stat-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Pricing & Payments ── */
.plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.plan-card:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.plan-card.selected {
  background: rgba(124, 106, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-credits {
  font-size: 10px;
  color: var(--text-secondary);
}

.plan-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-light);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.plan-card.featured .plan-price {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border: none;
}

.user-card-actions {
  display: flex;
  gap: 6px;
}

.btn-user-action {
  flex: 1;
  padding: 7px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-user-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-user-action.btn-logout {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.2);
}

.btn-user-action.btn-logout:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: var(--danger);
}

/* ── Settings Lock Overlay ── */
.settings-locked {
  opacity: 0.3;
  pointer-events: none;
  filter: blur(1px);
}