:root {
  color-scheme: dark;
  --bg-main: #18191C;
  --bg-card: #222327;
  --bg-card-hover: #292B30;
  --text-primary: #FFFFFF;
  --text-secondary: #9BA1A6;
  --border: #2E3035;
  --accent: #F43F87;
  --accent-hover: #FF5C91;
  --switch-off: #3E4148;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html, body {
  width: 310px;
  min-width: 310px;
  max-width: 310px;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  user-select: none;
}

.popup-container {
  padding: 14px;
}

/* Header */
.popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: rgba(244, 63, 135, 0.12);
  border: 1px solid rgba(244, 63, 135, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin: 2px 0 0;
}

/* Views */
.view {
  display: none;
  animation: fadeIn 0.15s ease-out;
}

.view.active {
  display: block;
}

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

/* Toggle Card */
.toggle-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 14px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
}

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

.toggle-icon {
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.toggle-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.card-divider {
  height: 1px;
  background-color: var(--border);
  margin: 0 -14px;
}

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

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--switch-off);
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch input:checked + .slider {
  background-color: var(--accent);
}

.switch input:checked + .slider::before {
  transform: translateX(16px);
}

/* Settings Button on Main View */
.settings-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.settings-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: #3C3E44;
}

.settings-btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gear-icon {
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
}

.chevron-icon {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
}

/* Settings Nav Header */
.settings-nav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.back-btn:hover {
  background-color: var(--bg-card-hover);
}

.back-btn svg {
  width: 15px;
  height: 15px;
}

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

/* Footer: Made by WitrFaruk + Buy me a coffee */
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.made-by-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.made-by-link:hover {
  color: var(--text-primary);
}

.heart-icon {
  font-size: 11px;
}

.coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  background-color: #FFDD00;
  color: #000000;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
}

.coffee-btn:hover {
  background-color: #F5D300;
  transform: translateY(-1px);
}

.coffee-btn svg {
  width: 14px;
  height: 14px;
}
