:root {
  --bg-dark: #0a0e14;
  --bg-gradient: linear-gradient(135deg, #0a0f12, #111822, #182230);
  --primary: #ffffff;
  --secondary: #a3b8cc;
  --text-light: #e8eef2;
  --text-muted: #8aa1ba;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-logo: 'Outfit', 'Inter', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Fixed gradient background via pseudo-element instead of
   background-attachment:fixed (which disables GPU-accelerated scrolling) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(135deg, #0a0f12, #111822, #182230);
  pointer-events: none;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--primary);
  transform: scale(1.1);
}


/* Aurora / Mystical Blobs — GPU-friendly version
   Uses oversized radial gradients instead of blur() filters.
   The soft look comes from the gradient itself, NOT from a filter,
   so the browser doesn't need to re-blur on every frame. */
.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  opacity: 0.5;
}

.aurora-blob:nth-child(1) {
  top: -350px;
  left: -350px;
  background: radial-gradient(circle, rgba(0, 136, 255, 0.35) 0%, transparent 70%);
}

.aurora-blob:nth-child(2) {
  bottom: -350px;
  right: -350px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, transparent 70%);
}

/* Layout */
header {
  padding: 0.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(7, 7, 20, 0.85);
  will-change: transform;
  /* promotes to own layer, reduces repaint cost */
}

.logo {
  font-family: var(--font-logo);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  line-height: 1;
}

.logo img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  object-position: top center;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a:hover {
  text-shadow: 0 0 10px var(--primary);
}

.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero h1 {
  font-size: 5vw;
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 0 30px rgba(0, 136, 255, 0.6);
}

.hero p {
  font-size: 1.5rem;
  color: var(--text-muted);
  max-width: 800px;
  margin-bottom: 3rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--primary);
  border-radius: 50px;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  transition: var(--transition);
  /* backdrop-filter removed for performance */
}

.btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 30px var(--primary);
  transform: translateY(-3px);
}

.btn-secondary {
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(163, 184, 204, 0.3);
}

.btn-secondary:hover {
  background: var(--secondary);
  box-shadow: 0 0 30px var(--secondary);
}

.actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Sections */
section {
  padding: 6rem 5%;
  position: relative;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 3rem;
  text-align: center;
  background: linear-gradient(135deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Grid layout for cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Glass Cards */
.card {
  background: rgba(14, 19, 27, 0.75);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  /* backdrop-filter removed — it was causing GPU compositing storms
     when combined with animated background elements */
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.2);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.card:hover::before {
  opacity: 1;
}

.card img,
.card svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
  border-radius: 12px;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-muted);
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.card-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

/* MyTools App Grid specific */
.app-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.app-card {
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  min-height: 280px;
}

.app-card svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
  transition: var(--transition);
}

.app-card:hover svg {
  transform: scale(1.1);
}

.tag {
  background: rgba(163, 184, 204, 0.15);
  color: #e8eef2;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid rgba(163, 184, 204, 0.4);
}

.app-card-btn {
  display: inline-block;
  padding: 0.5rem 1.4rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.app-card-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

/* App Detail Modal */
.app-modal-content {
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.app-modal-content::-webkit-scrollbar {
  width: 6px;
}

.app-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.app-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.app-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.app-modal-icon {
  margin-bottom: 1.5rem;
}

.app-modal-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
}

.app-modal-icon svg {
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
}

.app-modal-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.app-modal-short {
  color: var(--primary);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.app-modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.app-modal-filetypes {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.app-modal-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.app-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.app-modal-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.app-modal-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 5px 20px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 5rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 4%;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  nav a {
    font-size: 0.9rem;
  }

  .logo {
    font-size: 1.6rem;
  }

  .logo img {
    width: 48px;
    height: 48px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .hero p {
    font-size: 1.1rem;
  }

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

  .store-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #codacoin-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  section {
    padding: 4rem 4%;
  }

  .section-title {
    font-size: 2rem;
  }
}

.image-preview {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
}

/* Store Tabs */
.store-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.store-tab {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65rem 2.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  /* backdrop-filter removed for performance */
}

.store-tab:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-light);
}

.store-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
}

/* Review Cards */
.review-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  /* backdrop-filter removed for performance */
  transition: var(--transition);
}

.review-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.review-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 136, 255, 0.4), rgba(0, 240, 255, 0.3));
  border: 1px solid rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-grow: 1;
}

.review-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-light);
}

.review-stars {
  color: #fbbf24;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.review-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.review-message {
  color: var(--secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Store Preview Tiles */
.shop-preview-tile {
  position: relative;
  width: 260px;
  height: 300px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.shop-preview-tile:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
}

.shop-preview-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
  border-radius: 0;
  margin: 0;
}

.shop-preview-tile:hover img {
  transform: scale(1.07);
}

.shop-preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
}

.shop-preview-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.shop-preview-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  /* backdrop-filter removed for performance */
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Store Preview Grid */
.store-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.item-modal-container {
  background: var(--bg-dark);
  border: 1px solid var(--glass-border);
  width: 900px;
  max-width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary) transparent;
}

.item-modal-container::-webkit-scrollbar {
  width: 8px;
}

.item-modal-container::-webkit-scrollbar-track {
  background: transparent;
}

.item-modal-container::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

.item-modal-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

.item-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .item-modal-grid {
    grid-template-columns: 1fr;
  }

  .item-modal-container {
    width: 100%;
    max-width: calc(100vw - 2rem);
    max-height: 85vh;
    padding: 1.25rem;
    overflow-x: visible;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  #codacoin-btns {
    justify-content: center;
  }

  .modal-overlay {
    padding: 1rem;
    align-items: flex-start;
    overflow-y: auto;
  }

  .item-modal-grid {
    gap: 1.25rem;
  }

  .item-gallery img#itemMainImage {
    height: 220px;
  }
}

.item-gallery img#itemMainImage {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
}

.item-thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.item-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.item-thumbnails img:hover {
  border-color: var(--primary);
}

.item-details h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.item-price {
  font-size: 1.5rem;
  color: var(--secondary);
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.item-desc {
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.item-tags .tag {
  background: rgba(163, 184, 204, 0.15);
  color: #e8eef2;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(163, 184, 204, 0.4);
}