@font-face {
  font-family: "Ubuntu Mono";
  src: url("../assets/Font/UbuntuMono-R.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Mono";
  src: url("../assets/Font/UbuntuMono-RI.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Mono";
  src: url("../assets/Font/UbuntuMono-B.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Mono";
  src: url("../assets/Font/UbuntuMono-BI.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  --app-font-main: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --app-bg: #f3f5f8;
  --app-bg-soft: #eef1f5;
  --app-surface: #ffffff;
  --app-surface-2: #f8fafc;
  --app-border: #d9e0e8;
  --app-text: #17212e;
  --app-muted: #5a6776;
  --app-shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
  --app-shadow-md: 0 14px 36px rgba(15, 23, 42, 0.1);
  --app-shadow-lg: 0 24px 54px rgba(15, 23, 42, 0.13);
}

[data-bs-theme="dark"] {
  --app-bg: #0c1016;
  --app-bg-soft: #121821;
  --app-surface: #161d27;
  --app-surface-2: #1c2430;
  --app-border: #283343;
  --app-text: #e7edf4;
  --app-muted: #97a4b5;
  --app-shadow-sm: 0 10px 22px rgba(2, 6, 12, 0.45);
  --app-shadow-md: 0 16px 40px rgba(2, 6, 12, 0.55);
  --app-shadow-lg: 0 26px 62px rgba(2, 6, 12, 0.65);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--app-font-main);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--app-text);
  background:
    radial-gradient(900px 420px at -8% -12%, color-mix(in srgb, var(--app-border) 28%, transparent), transparent 68%),
    radial-gradient(820px 360px at 108% 2%, color-mix(in srgb, var(--app-border) 22%, transparent), transparent 72%),
    linear-gradient(180deg, var(--app-bg-soft) 0%, var(--app-bg) 100%);
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: var(--app-font-main);
  line-height: 1.28;
  letter-spacing: 0.01em;
}

#detailName,
#long-description-title,
#how-it-works-title,
#features-title,
#privacy-summary-title,
#screenshots-title,
#faq-title,
#permissions-title {
  font-weight: 900;
}

p,
li,
.card-text,
.accordion-body,
.list-group-item {
  line-height: 1.65;
}

.btn,
.form-control,
.form-select,
input,
textarea,
select,
button {
  font-family: var(--app-font-main);
}

section,
article {
  scroll-margin-top: 6rem;
}

html,
body {
  overflow-x: hidden;
}

main {
  flex: 1;
}

.container {
  padding-left: clamp(0.9rem, 2.2vw, 1.5rem);
  padding-right: clamp(0.9rem, 2.2vw, 1.5rem);
}

header .navbar {
  background-color: color-mix(in srgb, var(--app-surface) 84%, transparent) !important;
  border-bottom-color: var(--app-border) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--app-shadow-sm);
}

.navbar-brand,
.nav-link {
  color: var(--app-text) !important;
}

.nav-link {
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  opacity: 1;
}

.navbar-brand {
  letter-spacing: 0.03em;
}

.header-buy-button {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.support-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid color-mix(in srgb, var(--bs-primary) 50%, var(--app-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bs-primary) 92%, var(--app-surface)) 0%,
    color-mix(in srgb, var(--bs-primary) 74%, var(--app-surface-2)) 100%
  );
  color: var(--bs-white) !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--bs-primary) 18%, transparent),
    0 10px 24px color-mix(in srgb, var(--bs-primary) 36%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.support-cta-btn:hover,
.support-cta-btn:focus-visible {
  color: var(--bs-white) !important;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--bs-primary) 30%, transparent),
    0 14px 30px color-mix(in srgb, var(--bs-primary) 45%, transparent);
  filter: saturate(1.08);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  position: relative;
}

.floating-theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1085;
  margin: 0 !important;
}

.theme-switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch-track {
  width: 3.9rem;
  height: 1.95rem;
  border-radius: 999px;
  display: block;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--app-border) 90%, transparent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--app-surface) 95%, transparent) 0%,
      color-mix(in srgb, var(--app-bg-soft) 95%, transparent) 100%
    );
  box-shadow: none;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.theme-switch-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.88rem;
  line-height: 1;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.theme-switch-sun {
  left: 0.48rem;
  color: #d18300;
}

.theme-switch-moon {
  right: 0.5rem;
  color: #8b8f98;
}

.theme-switch-thumb {
  position: absolute;
  top: 50%;
  left: 0.16rem;
  width: 1.58rem;
  height: 1.58rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bs-primary) 78%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--bs-primary) 68%, transparent);
  box-shadow: none;
  transition: left 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.theme-switch-thumb::before {
  content: "☀";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  line-height: 1;
  color: #fff4da;
}

.theme-switch-input:checked + .theme-switch-track {
  border-color: color-mix(in srgb, var(--app-border) 80%, var(--app-text));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--app-surface-2) 74%, #121212) 0%,
      color-mix(in srgb, var(--app-bg) 80%, #0f1116) 100%
    );
}

.theme-switch-input:checked + .theme-switch-track .theme-switch-thumb {
  left: calc(100% - 1.74rem);
  background: color-mix(in srgb, var(--bs-primary) 72%, #0a111f);
  border-color: color-mix(in srgb, var(--bs-primary) 72%, #0a111f);
}

.theme-switch-input:checked + .theme-switch-track .theme-switch-thumb::before {
  content: "☾";
  color: #f1f4ff;
}

.theme-switch-input:not(:checked) + .theme-switch-track .theme-switch-sun,
.theme-switch-input:checked + .theme-switch-track .theme-switch-moon {
  opacity: 0.92;
  transform: translateY(-50%) scale(1.02);
  filter: none;
}

.theme-switch-input:focus-visible + .theme-switch-track {
  outline: 2px solid color-mix(in srgb, var(--bs-primary) 55%, transparent);
  outline-offset: 2px;
}

.hero-section {
  position: relative;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--app-surface-2) 82%, transparent) 0%, color-mix(in srgb, var(--app-surface) 88%, transparent) 100%);
  border-bottom: 1px solid var(--app-border);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px 280px at 12% 0%, color-mix(in srgb, var(--app-border) 28%, transparent), transparent 70%);
}

.hero-illustration {
  max-width: 320px;
  filter: drop-shadow(var(--app-shadow-md));
}

.lead {
  line-height: 1.65;
  max-width: 62ch;
}

.content-prose {
  width: 100%;
  max-width: 760px;
}

.content-prose-wide {
  width: 100%;
  max-width: 820px;
}

.extension-card .card-title {
  font-size: 1.1rem;
  line-height: 1.35;
}

.card,
.list-group-item,
.form-control,
.form-select,
.alert {
  background-color: var(--app-surface);
  border-color: var(--app-border);
  color: var(--app-text);
}

.card {
  border-radius: 1rem;
  box-shadow: var(--app-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-body {
  padding: 1.15rem;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--app-shadow-md);
}

.form-control,
.form-select,
.btn {
  border-radius: 0.75rem;
}

.form-control:focus,
.form-select:focus {
  border-color: color-mix(in srgb, var(--bs-primary) 55%, var(--app-border));
  box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--bs-primary) 22%, transparent);
}

.btn-primary {
  box-shadow: 0 10px 20px color-mix(in srgb, var(--bs-primary) 25%, transparent);
}

.btn-outline-primary,
.btn-outline-secondary {
  border-color: var(--app-border);
  color: var(--app-text);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  box-shadow: var(--app-shadow-sm);
}

.text-secondary,
.text-muted,
.small.text-muted {
  color: var(--app-muted) !important;
}

.screenshot-thumb {
  border-radius: 0.8rem;
  border: 1px solid var(--app-border);
  box-shadow: var(--app-shadow-sm);
}

.screenshot-zoom-btn {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
}

.screenshot-modal-image {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.modal-content {
  background-color: var(--app-surface);
  border-color: var(--app-border);
}

#screenshotModal .modal-dialog {
  margin-left: auto;
  margin-right: auto;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--app-border);
  border-radius: 0.5rem;
}

footer {
  background-color: color-mix(in srgb, var(--app-surface) 88%, transparent);
  border-top-color: var(--app-border) !important;
}

.footer-brand-logo {
  height: 1.18em;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  align-self: center;
  flex: 0 0 auto;
  display: block;
}

.badge {
  letter-spacing: 0.01em;
}

#detailIcon {
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--app-text) 18%, transparent));
}

.extension-card .card-body .d-flex img,
#featuredExtensionsGrid .card-body .d-flex img {
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--app-text) 14%, transparent));
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: start;
}

.detail-header-main {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
}

.detail-header-content {
  min-width: 0;
}

.detail-header-actions {
  display: grid;
  gap: 0.5rem;
  width: min(15rem, 100%);
  justify-self: end;
  align-self: end;
}

.detail-header-actions .btn {
  width: 100%;
}

#extensionDetail .row.g-4 {
  align-items: flex-start;
}

#extensionDetail aside .btn {
  min-height: 2.75rem;
}

#detailScreenshots .col-sm-6 {
  display: flex;
}

#detailScreenshots .screenshot-zoom-btn {
  height: 100%;
}

.detail-gallery {
  display: grid;
  gap: 0.75rem;
}

.detail-gallery-main {
  border: 0;
  background: transparent;
  padding: 0;
  display: block;
  width: auto;
  max-width: 100%;
  cursor: zoom-in;
}

.detail-gallery-main-image {
  width: auto;
  max-width: 100%;
  max-height: 330px;
  object-fit: contain;
  border: 0;
  box-shadow: var(--app-shadow-md);
  border-radius: 0.9rem;
}

.detail-gallery-thumbs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.detail-gallery-thumb {
  border: 1px solid var(--app-border);
  border-radius: 0.8rem;
  background: var(--app-surface);
  box-shadow: var(--app-shadow-sm);
  padding: 0;
  width: 74px;
  min-width: 74px;
  height: 52px;
  overflow: hidden;
  opacity: 0.82;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.detail-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}

.screenshot-modal-image {
  border-radius: 0.9rem;
  box-shadow: var(--app-shadow-lg);
}

.detail-gallery-thumb:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.detail-gallery-thumb.active {
  opacity: 1;
  border-color: color-mix(in srgb, var(--bs-primary) 65%, var(--app-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bs-primary) 20%, transparent);
}

@media (min-width: 992px) {
  #extensionDetail aside {
    position: sticky;
    top: 5.5rem;
  }
}

.accordion-button,
.accordion-body,
.list-group-item,
.card-text,
p,
li {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  header .navbar {
    backdrop-filter: blur(8px);
  }

  .navbar-brand {
    font-size: 1rem;
  }

  #mainNav {
    padding-top: 0.5rem;
  }

  .navbar-nav {
    gap: 0.1rem;
  }

  .theme-switch:not(.floating-theme-toggle) {
    width: 100%;
    margin-top: 0.75rem !important;
  }

  footer .container {
    gap: 0.65rem !important;
  }

  #extensionDetail header {
    gap: 0.9rem !important;
  }

  .detail-header {
    grid-template-columns: 1fr;
  }

  .detail-header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-header-actions {
    justify-self: start;
    width: min(22rem, 100%);
  }

  #extensionDetail aside {
    margin-top: 2.25rem;
  }

  #extensionDetail aside .btn {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  header .navbar .container {
    justify-content: center;
    position: relative;
  }

  .navbar-brand {
    margin-right: 0;
    margin-left: 0;
    text-align: center;
  }

  .navbar-toggler {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  main.py-5,
  section.py-5 {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }

  .display-5 {
    font-size: clamp(1.65rem, 7vw, 2.2rem);
    line-height: 1.2;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-section .btn-lg {
    width: 100%;
    max-width: 100%;
  }

  .hero-illustration {
    max-width: 240px;
    margin-inline: auto;
  }

  .card {
    border-radius: 0.9rem;
  }

  .card-body {
    padding: 1rem;
  }

  #extensionsGrid .card-body .d-flex.align-items-center,
  #featuredExtensionsGrid .card-body .d-flex.align-items-center,
  .detail-header-main {
    justify-content: flex-start;
    text-align: left;
  }

  #detailName {
    font-size: 1.4rem;
    line-height: 1.25;
  }

  #extensionDetail .d-flex.flex-wrap.gap-2 {
    gap: 0.4rem !important;
  }

  #detailVersion,
  #detailUpdated,
  #detailStatus {
    white-space: normal;
    text-align: center;
  }

  #detailVersion,
  #detailUpdated {
    font-size: 0.78rem;
  }

  #detailPermissions {
    margin-bottom: 0;
  }

  #detailFeatures .list-group-item {
    padding: 0.7rem 0.85rem;
  }

  #detailScreenshots .col-sm-6 {
    width: 100%;
  }

  .detail-gallery-main-image {
    max-height: 240px;
  }

  .detail-gallery-thumbs {
    justify-content: flex-start;
  }

  .modal-dialog {
    margin: 0.75rem;
  }

  #screenshotModal .modal-dialog {
    width: min(96vw, 1140px);
    margin: 0.75rem auto;
  }

  .modal-header,
  .modal-body {
    padding: 0.9rem;
  }

  .footer-brand-logo {
    height: 1.05rem;
  }

  footer .container,
  footer .container small {
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 575.98px) {
  #extensionDetail {
    word-break: break-word;
  }

  #extensionDetail .badge {
    max-width: 100%;
  }

  #faqSection .accordion-button {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
  }

  #faqSection .accordion-body {
    padding: 0.8rem 0.9rem;
  }
}

@media (max-width: 737.98px) {
  #detailIcon {
    width: 56px;
    height: 56px;
    margin-inline: 0;
  }

  .detail-gallery {
    justify-items: start;
  }
}

@media (max-width: 430px) {
  #detailIcon {
    width: 56px;
    height: 56px;
    margin-inline: auto;
  }

  .detail-gallery {
    justify-items: center;
  }

  .navbar-nav {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  main,
  main h1,
  main h2,
  main h3,
  main p,
  main .lead,
  main .card-title,
  main .card-text,
  main .text-secondary,
  main .small,
  #extensionDetail header,
  #extensionDetail section,
  #extensionDetail aside,
  #extensionsGrid .card-body,
  #featuredExtensionsGrid .card-body {
    text-align: center;
  }

  #detailPermissions,
  #detailFeatures,
  #detailHowItWorks,
  #detailPrivacySummary {
    text-align: center;
    list-style-position: inside;
    padding-left: 0;
    max-width: 34rem;
    margin-inline: auto;
  }

  .detail-header-main .d-flex.flex-wrap.align-items-center.gap-2 {
    justify-content: center;
  }

  footer .container {
    justify-content: center !important;
    align-items: center;
    text-align: center;
  }

  .footer-brand-logo {
    margin-inline: auto;
  }
}

@media (min-width: 430.01px) {
  #screenshots-title,
  #detailScreenshots,
  .detail-gallery {
    text-align: left;
    justify-items: start;
  }
}

@media (min-width: 1200px) {
  .container {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }

  .display-5 {
    font-size: clamp(2.6rem, 3vw, 3.2rem);
  }

  .hero-section .container,
  main .container {
    max-width: 1160px;
  }
}

@media (min-width: 1536px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hero-section .container,
  main .container,
  footer .container,
  header .container {
    max-width: 1280px;
  }

  .card-body {
    padding: 1.35rem;
  }
}

@media (max-width: 575.98px) {
  .floating-theme-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}