@font-face {
  font-family: "Archivo Black";
  src: url("/fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --panel: rgba(18, 18, 20, 0.96);
  --panel-border: rgba(255, 255, 255, 0.1);
  --search-bg: rgba(20, 20, 22, 0.78);
  --search-border: rgba(255, 255, 255, 0.16);
  --button-bg: rgba(20, 20, 22, 0.62);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #0b0b0d;
  color: var(--text);
}

.home-page {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0b0b0d;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: background-image 500ms ease;
}

.background-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

.home-content {
  position: relative;
  z-index: 2;
  width: min(760px, 80vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-20px);
}

.brand {
  margin: 0 0 30px;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(52px, 7vw, 86px);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.3);
}

.search-form {
  width: 100%;
}

.search-box {
  width: 100%;
  height: 62px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-radius: 31px;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.search-box:focus-within {
  background: rgba(20, 20, 22, 0.88);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.3);
}

.search-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin-right: 14px;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.8;
  fill: none;
}

.search-box input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.background-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
}

.background-button {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: var(--button-bg);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.background-button:hover {
  background: rgba(25, 25, 27, 0.82);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.background-button:active {
  transform: scale(0.95);
}

.pencil-icon {
  width: 18px;
  height: 18px;
}

.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.panel-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.background-panel {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  width: min(390px, calc(100vw - 28px));
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transform: translateX(calc(100% + 30px));
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.background-panel.open {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.panel-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.3px;
}

.panel-header p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.close-panel-button {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 160ms ease;
}

.close-panel-button:hover {
  background: rgba(255, 255, 255, 0.13);
}

.close-panel-button svg {
  width: 16px;
  height: 16px;
}

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

.background-item {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #151517;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.background-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.background-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease;
}

.background-item:hover img {
  transform: scale(1.04);
}

.background-item.selected {
  border-color: rgba(255, 255, 255, 0.75);
}

.background-item.selected::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 13px;
}

.background-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 30px 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.background-loading[hidden] {
  display: none !important;
}

.loading-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.background-error {
  padding: 30px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.about-body {
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background: #0b0b0d;
  color: #ffffff;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.about-container {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.about-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.about-brand {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1.8px;
  line-height: 1;
  color: #ffffff;
}

.about-version {
  flex-shrink: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.about-section {
  padding: 34px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.about-heading {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.about-description {
  max-width: 680px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

.about-specs-grid {
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.025);
}

.spec-row + .spec-row {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.spec-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.spec-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.about-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 160ms ease;
}

.about-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-footer {
  padding-top: 28px;
}

.about-copyright {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
}

.about-copyright .about-link {
  color: rgba(255, 255, 255, 0.55);
}

/* ========================================
   ABOUT PAGE — MOBILE
   ======================================== */

@media (max-width: 600px) {
  .about-container {
    width: calc(100% - 32px);
    padding: 40px 0 28px;
  }

  .about-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 22px;
  }

  .about-brand {
    font-size: 36px;
  }

  .about-section {
    padding: 28px 0;
  }

  .about-heading {
    font-size: 19px;
  }

  .about-description {
    font-size: 14px;
    line-height: 1.65;
  }

  .spec-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 13px 14px;
  }

  .spec-value {
    overflow-wrap: anywhere;
  }
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(18, 18, 20, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.search-suggestion-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.45);
}

.search-suggestion-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .home-content {
    width: calc(100% - 40px);
  }

  .brand {
    font-size: 54px;
  }

  .search-box {
    height: 56px;
    padding: 0 20px;
  }

  .background-panel {
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }
}
