
:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #fff;
  --surface2: #f1f4fa;
  --border: #e0e6ef;
  --text: #142137;
  --muted: #56657b;
  --subtle: #7d8aa0;
  --accent: #525bd7;
  --shadow: 0 16px 36px #23365413;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #131d30;
  --surface2: #1b2940;
  --border: #2c3b52;
  --text: #f1f5fc;
  --muted: #a3b1c6;
  --subtle: #7586a2;
  --accent: #7c83ff;
  --shadow: 0 18px 46px #02061745;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #8dcaff;
  outline-offset: 3px;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1;
  width: min(100% - 48px, 1250px);
  margin-inline: auto;
}

/* HERO */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  margin-top: 10px;
  padding: 10px 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 92% 22%, #424c9f96, transparent 45%),
    linear-gradient(115deg, #191b4b, #20245d 54%, #242e6c);
  color: #fff;
  border: 1px solid #4751a94d;
  border-radius: 24px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#ffffff28 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 35%, #000);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 665px;
}

.hero h1 {
  margin: 19px 0 13px;
  font-size: clamp(30px, 3.35vw, 45px);
  font-weight: 780;
  line-height: 1.16;
  letter-spacing: -1.5px;
}

.hero h1 em {
  color: #b6bbff;
  font-style: normal;
}

.hero p {
  max-width: 515px;
  margin: 0;
  color: #d0d5f0;
  font-size: 14px;
  line-height: 1.7;
}

.hero-art {
  position: absolute;
  top: 0;
  right: 20px;
  width: 360px;
  height: 100%;
  pointer-events: none;
}

.art-circle {
  position: absolute;
  border: 1px solid #ffffff27;
  border-radius: 50%;
}

.art-circle.a {
  top: 24px;
  right: 20px;
  width: 255px;
  height: 255px;
}

.art-circle.b {
  top: 60px;
  right: 56px;
  width: 185px;
  height: 185px;
}

.art-card {
  position: absolute;
  width: 117px;
  height: 122px;
  padding: 18px;
  background: #ffffff14;
  border: 1px solid #ffffff4a;
  border-radius: 17px;
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 26px #090b2b38;
  transform: rotate(-10deg);
}

.art-card span {
  display: block;
  color: #c4f5f5;
  font-size: 39px;
  font-weight: 700;
  text-align: center;
}

.art-card i {
  display: block;
  width: 70%;
  height: 5px;
  margin: 9px auto;
  background: #ffffff59;
  border-radius: 10px;
}

.art-card i:last-child {
  width: 50%;
}

.art-card.first {
  top: 66px;
  right: 174px;
}

.art-card.second {
  top: 43px;
  right: 70px;
  transform: rotate(9deg);
}

.art-card.third {
  top: 146px;
  right: 106px;
  transform: rotate(-2deg);
}

/* TOOL CONTROLS */

.tools-section {
  padding: 26px 0 54px;
}

.tools-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tools-heading {
  margin: 0;
  font-size: 20px;
  font-weight: 780;
}

.view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 40px;
  min-height: 36px;
  padding: 8px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.view-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-button:hover {
  background: var(--surface2);
  color: var(--text);
}

.view-button.is-active {
  background: var(--accent);
  color: #fff;
}

/* CATEGORY FILTERS */

.category-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}

.category-button:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent);
}

.category-button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* TOOL CARDS */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 200px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 4px 12px #00000009;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.tool-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 145px;
  overflow: hidden;
  background-color: var(--card-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tool-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 14px 15px;
}

.tool-body > div {
  min-width: 0;
}

.tool-title {
  display: block;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
}

.tool-desc {
  display: block;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.3;
}

.tool-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  background: var(--surface2);
  color: var(--accent);
  border-radius: 8px;
  font-size: 19px;
}

/* MINI CARDS */

.tools-grid[data-view="mini"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.tools-grid[data-view="mini"] .tool-card {
  min-height: 0;
  border-radius: 13px;
}

.tools-grid[data-view="mini"] .tool-art {
  flex: none;
  min-height: 0;
  aspect-ratio: 5 / 3;
}

.tools-grid[data-view="mini"] .tool-body {
  min-height: 58px;
  gap: 6px;
  padding: 6px 8px;
}

.tools-grid[data-view="mini"] .tool-title {
  font-size: 12px;
  line-height: 1.1;
}

.tools-grid[data-view="mini"] .tool-desc {
  display: none;
}

.tools-grid[data-view="mini"] .tool-arrow {
  width: 23px;
  height: 23px;
  font-size: 15px;
}

/* LIST VIEW */

.tools-grid[data-view="list"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.tools-grid[data-view="list"] .tool-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 80px;
  border-radius: 12px;
}

.tools-grid[data-view="list"] .tool-card:hover {
  transform: translateX(3px);
}

.tools-grid[data-view="list"] .tool-art {
  flex: 0 0 140px;
  min-height: 0;
}

.tools-grid[data-view="list"] .tool-body {
  flex: 1;
  min-height: 0;
  padding: 12px 15px;
}

.tools-grid[data-view="list"] .tool-title {
  font-size: 14px;
}

.tools-grid[data-view="list"] .tool-desc {
  font-size: 11px;
}

/* EMPTY STATE & FOOTER */

.tools-empty {
  margin: 24px 0;
  padding: 24px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
}

.footer {
  position: relative;
  right: 15px;
  bottom: 10px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  width: auto;
  margin: 0;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
}

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

:fullscreen {
  background: var(--bg);
}

/* TABLET */

@media (max-width: 1050px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tools-grid[data-view="mini"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tools-grid[data-view="list"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art {
    right: -65px;
    opacity: .55;
  }

  .hero-content {
    max-width: 620px;
  }
}

/* MOBILE */

@media (max-width: 760px) {
  main {
    width: min(100% - 28px, 1250px);
  }

  .hero {
    min-height: 270px;
    padding: 32px 27px;
  }

  .hero-art {
    right: -90px;
    opacity: .16;
  }

  .tools-section {
    padding-top: 20px;
  }

  /* Kartlar: 1 column */

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tool-card {
    min-height: 205px;
  }

  .tool-art {
    min-height: 125px;
  }

  .tool-body {
    min-height: 76px;
    padding: 11px;
  }

  /* Mini Kartlar: 2 columns */

  .tools-grid[data-view="mini"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Liste: compact single column */

  .tools-grid[data-view="list"] {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .tools-grid[data-view="list"] .tool-card {
    min-height: 64px;
    border-radius: 9px;
  }

  .tools-grid[data-view="list"] .tool-art {
    flex: 0 0 105px;
    min-height: 0;
  }

  .tools-grid[data-view="list"] .tool-body {
    min-height: 0;
    gap: 8px;
    padding: 7px 11px;
  }

  .tools-grid[data-view="list"] .tool-title {
    font-size: 13px;
    line-height: 1.3;
  }

  .tools-grid[data-view="list"] .tool-desc {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.3;
  }

  .tools-grid[data-view="list"] .tool-arrow {
    width: 25px;
    height: 25px;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .tools-toolbar {
    gap: 8px;
  }

  .tools-heading {
    font-size: 17px;
  }

  .view-switcher {
    gap: 2px;
    padding: 3px;
  }

  .view-button {
    width: 36px;
    min-height: 34px;
    padding: 7px;
  }

  .view-button span {
    display: none;
  }

  .view-button svg {
    width: 18px;
    height: 18px;
  }

  .category-filters {
    flex-wrap: nowrap;
    gap: 6px;
    margin-inline: -14px;
    padding: 0 14px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .category-button {
    flex: none;
    min-height: 34px;
    padding: 7px 11px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 31px;
  }

  .hero p {
    font-size: 12px;
  }

  .tools-grid {
    gap: 9px;
  }

  .tool-card {
    min-height: 195px;
    border-radius: 12px;
  }

  .tool-art {
    min-height: 112px;
  }

  .tool-title {
    font-size: 11px;
  }

  .tool-desc {
    font-size: 10px;
  }

  .tool-arrow {
    width: 23px;
    height: 23px;
    font-size: 16px;
  }

  .tools-grid[data-view="mini"] {
    gap: 9px;
  }

  .tools-grid[data-view="mini"] .tool-title {
    font-size: 11px;
  }

  /* Preserve compact spacing in mobile list view */

  .tools-grid[data-view="list"] {
    gap: 5px;
  }

  .tools-grid[data-view="list"] .tool-card {
    min-height: 60px;
    border-radius: 9px;
  }

  .tools-grid[data-view="list"] .tool-art {
    flex-basis: 90px;
    min-height: 0;
  }

  .tools-grid[data-view="list"] .tool-body {
    min-height: 0;
    padding: 6px 9px;
  }

  .tools-grid[data-view="list"] .tool-title {
    font-size: 12px;
  }

  .tools-grid[data-view="list"] .tool-desc {
    font-size: 10px;
  }

  .tools-grid[data-view="list"] .tool-arrow {
    width: 22px;
    height: 22px;
  }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Landing settings: selected by the administrator. */
.app.landing-wide main{width:min(100% - 48px,1480px)}
.landing-center .hero-content{text-align:center}
.landing-center .hero-content p{margin-left:auto;margin-right:auto}
.landing-center .hero-art{opacity:.28}
.hero-art[hidden]{display:none!important}
.landing-tight .tools-grid{gap:12px}
.landing-tight .hero{padding-top:18px;padding-bottom:18px}
