/* =========================
   GLOBAL FOUNDATION
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
}

body {
  background: #020617;
  color: #e2e8f0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* =========================
   SCROLLBAR POLISH
========================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* =========================
   MOBILE MENU
========================= */
.mobile-menu-panel {
  transform: translateX(100%);
  transition: transform 0.28s ease;
  will-change: transform;
}

.mobile-menu-panel.active {
  transform: translateX(0);
}

.mobile-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================
   AUTH MODAL
========================= */
.auth-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-card {
  transform: translateY(18px) scale(0.98);
  transition: transform 0.25s ease;
  will-change: transform;
}

.auth-modal.active .auth-modal-card {
  transform: translateY(0) scale(1);
}

/* =========================
   CATEGORY CARD IMAGE FIT
   DESIGN GUIDE:
   1. Best artwork ratio: 1:1
   2. Recommended editor size: 8 cm x 8 cm
   3. Better export quality: 12 cm x 12 cm
========================= */
.category-art {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

.category-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.group:hover .category-art img {
  transform: scale(1.05);
}

/* =========================
   TEXT CLAMP
========================= */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* =========================
   ACCESSIBILITY / INPUTS
========================= */
input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
}

/* =========================
   SMALL DEVICE IMPROVEMENTS
========================= */
@media (max-width: 480px) {
  .auth-modal-card {
    border-radius: 1.5rem;
  }
}

/* =========================
   REDUCE MOTION SUPPORT
========================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mobile-menu-panel,
  .mobile-overlay,
  .auth-modal,
  .auth-modal-card,
  .category-art img {
    transition: none !important;
  }
}