/* =========================================
   RESET
========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family: Inter, Arial, sans-serif;

  background: #f5f7fb;

  color: #172033;

  min-height: 100vh;

  overflow-x: hidden;
}

/* =========================================
   VARIABLES
========================================= */

:root {
  --primary: #5b5df0;

  --primary-dark: #4648d9;

  --secondary: #8b5cf6;

  --text: #172033;

  --muted: #6b7280;

  --border: #e6e8ef;

  --card: #ffffff;
}

/* =========================================
   BACKGROUND
========================================= */

.background-orb {
  position: fixed;

  border-radius: 50%;

  filter: blur(80px);

  opacity: 0.18;

  pointer-events: none;

  z-index: -1;
}

.orb-1 {
  width: 400px;

  height: 400px;

  background: var(--primary);

  top: -150px;

  left: -150px;
}

.orb-2 {
  width: 500px;

  height: 500px;

  background: var(--secondary);

  bottom: -250px;

  right: -200px;
}

/* =========================================
   CONTAINER
========================================= */

.container {
  width: min(1200px, 92%);

  margin: auto;
}

/* =========================================
   HEADER
========================================= */

.header {
  background: rgba(255, 255, 255, 0.8);

  backdrop-filter: blur(15px);

  border-bottom: 1px solid var(--border);
}

.header-container {
  min-height: 80px;

  display: flex;

  align-items: center;

  justify-content: space-between;
}

.logo {
  display: flex;

  align-items: center;

  gap: 14px;
}

.logo-icon {
  width: 48px;

  height: 48px;

  display: grid;

  place-items: center;

  font-size: 28px;

  border-radius: 14px;

  color: white;

  background: linear-gradient(135deg, var(--primary), var(--secondary));

  box-shadow: 0 10px 25px rgba(91, 93, 240, 0.25);
}

.logo h1 {
  margin: 0;

  font-size: 18px;
}

.logo p {
  margin: 3px 0 0;

  color: var(--muted);

  font-size: 13px;
}

.simulation-count {
  padding: 10px 16px;

  border-radius: 100px;

  background: #eef0ff;

  color: var(--primary);

  font-size: 14px;

  font-weight: 600;
}

.simulation-count span {
  font-size: 18px;
}

/* =========================================
   HERO
========================================= */

.hero {
  padding: 80px 0 50px;

  text-align: center;
}

.hero-badge {
  display: inline-block;

  padding: 8px 14px;

  border-radius: 100px;

  background: #ececff;

  color: var(--primary);

  font-size: 11px;

  font-weight: 700;

  letter-spacing: 1px;
}

.hero h2 {
  margin: 20px 0 15px;

  font-size: clamp(38px, 6vw, 68px);

  line-height: 1.05;
}

.hero h2 span {
  display: block;

  background: linear-gradient(135deg, var(--primary), var(--secondary));

  -webkit-background-clip: text;

  color: transparent;
}

.hero p {
  max-width: 600px;

  margin: auto;

  color: var(--muted);

  font-size: 17px;

  line-height: 1.7;
}

/* =========================================
   SEARCH
========================================= */

.search-container {
  width: min(650px, 100%);

  margin: 40px auto 0;

  position: relative;
}

.search-icon {
  position: absolute;

  left: 20px;

  top: 50%;

  transform: translateY(-50%);
}

.search-container input {
  width: 100%;

  border: 1px solid var(--border);

  border-radius: 18px;

  padding: 18px 20px 18px 55px;

  font-size: 16px;

  outline: none;

  background: white;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);

  transition: 0.2s;
}

.search-container input:focus {
  border-color: var(--primary);

  box-shadow: 0 15px 40px rgba(91, 93, 240, 0.12);
}

/* =========================================
   SECTIONS
========================================= */

.categories-section,
.simulations-section {
  margin: 30px 0 60px;
}

.section-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 25px;
}

.section-header h3 {
  margin: 0;

  font-size: 24px;
}

.section-header p {
  margin: 6px 0 0;

  color: var(--muted);
}

/* =========================================
   CATEGORY BUTTONS
========================================= */

.category-list {
  display: flex;

  flex-wrap: wrap;

  gap: 12px;
}

.category-button {
  border: 1px solid var(--border);

  background: white;

  padding: 12px 18px;

  border-radius: 14px;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 8px;

  color: var(--text);

  transition: 0.2s;
}

.category-button:hover {
  transform: translateY(-2px);

  border-color: var(--primary);
}

.category-button.active {
  background: var(--primary);

  color: white;

  border-color: var(--primary);
}

.category-icon {
  font-size: 18px;
}

/* =========================================
   SORT
========================================= */

#sortSelect {
  padding: 10px 14px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: white;

  outline: none;
}

/* =========================================
   SIMULATION GRID
========================================= */

.simulation-grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));

  gap: 24px;
}

/* =========================================
   CARD
========================================= */

.simulation-card {
  background: var(--card);

  border: 1px solid var(--border);

  border-radius: 22px;

  overflow: hidden;

  transition: 0.25s;

  display: flex;

  flex-direction: column;
}

.simulation-card:hover {
  transform: translateY(-7px);

  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.simulation-image {
  height: 180px;

  position: relative;

  overflow: hidden;

  background: #eef0f7;
}

.simulation-image img {
  width: 100%;

  height: 100%;

  object-fit: cover;

  transition: 0.4s;
}

.simulation-card:hover .simulation-image img {
  transform: scale(1.06);
}

.default-thumbnail {
  width: 100%;

  height: 100%;

  display: grid;

  place-items: center;

  background: linear-gradient(135deg, #e9e9ff, #f4edff);
}

.default-thumbnail span {
  font-size: 70px;
}

.simulation-type {
  position: absolute;

  top: 14px;

  right: 14px;

  padding: 6px 10px;

  border-radius: 8px;

  background: rgba(255, 255, 255, 0.9);

  font-size: 11px;

  font-weight: 700;
}

/* =========================================
   CARD CONTENT
========================================= */

.simulation-content {
  padding: 22px;

  display: flex;

  flex-direction: column;

  flex: 1;
}

.simulation-category {
  color: var(--primary);

  font-size: 13px;

  font-weight: 600;
}

.simulation-content h3 {
  margin: 12px 0 10px;

  font-size: 20px;
}

.simulation-content p {
  margin: 0;

  color: var(--muted);

  line-height: 1.6;

  font-size: 14px;
}

/* =========================================
   TAGS
========================================= */

.simulation-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  margin: 20px 0;
}

.simulation-tags span {
  padding: 5px 9px;

  border-radius: 6px;

  background: #f1f2f7;

  color: #687083;

  font-size: 11px;
}

/* =========================================
   BUTTON
========================================= */

.launch-button {
  margin-top: auto;

  width: 100%;

  border: none;

  border-radius: 12px;

  padding: 13px 18px;

  cursor: pointer;

  display: flex;

  justify-content: space-between;

  align-items: center;

  color: white;

  font-weight: 600;

  background: linear-gradient(135deg, var(--primary), var(--secondary));

  transition: 0.2s;
}

.launch-button:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 20px rgba(91, 93, 240, 0.25);
}

.arrow {
  font-size: 20px;
}

/* =========================================
   EMPTY STATE
========================================= */

.empty-state {
  text-align: center;

  padding: 70px 20px;
}

.empty-icon {
  font-size: 60px;
}

.empty-state h3 {
  margin-bottom: 5px;
}

.empty-state p {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 700px) {
  .header-container {
    min-height: 70px;
  }

  .simulation-count {
    display: none;
  }

  .hero {
    padding: 60px 0 30px;
  }

  .section-header {
    align-items: flex-start;

    flex-direction: column;
  }

  #sortSelect {
    width: 100%;
  }
}
