:root {
  /* --- MAK3D Studio V4: Minimal Apple-Style --- */
  --color-bg: #0A0A0A;
  --color-card: #111111;
  --color-text: #F5F5F7;
  --color-text-dim: #86868B;
  --color-accent: #00E0FF;
  /* Minimal Cyan */
  --color-accent-rgb: 0, 224, 255;
  --color-border: rgba(255, 255, 255, 0.06);
  --glass-bg: rgba(10, 10, 10, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 20px rgba(0, 224, 255, 0.15);
  --cursor-glow: rgba(0, 224, 255, 0.2);

  /* Shared spacing & dimensions */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 72px;
  --max-width: 1200px;
  --border-radius: 16px;
  --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --font-accent: 'Montserrat', sans-serif;
}

[data-theme='light'] {
  --color-bg: #FFFFFF;
  --color-card: #F5F5F7;
  --color-text: #1D1D1F;
  --color-text-dim: #86868B;
  --color-accent: #0066FF;
  --color-accent-rgb: 0, 102, 255;
  --color-border: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 4px 24px rgba(0, 0, 0, 0.04);
  --cursor-glow: rgba(0, 102, 255, 0.1);
}

/* --- Global Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  cursor: none !important;
  /* Force hide everywhere */
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  transition: background-color 0.8s ease, color 0.8s ease;
  cursor: none !important;
}

/* Custom HUD Cursor (V4) */
.cursor-main {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.6;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--cursor-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

.cursor-nozzle {
  display: none;
}

.cursor-trail {
  display: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.03em;
  text-align: center;
}

h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 3rem;
  margin-bottom: 3rem;
}

.text-dim {
  color: var(--color-text-dim);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 120px 0;
}

/* Sticky Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.logo {
  font-family: var(--font-accent);
  font-size: 1.6rem;
  font-weight: 400;
  /* Mak is regular */
  text-transform: uppercase;
  color: var(--color-text);
  letter-spacing: -0.5px;
  display: flex !important;
  flex-direction: row;
  /* Single line */
  align-items: baseline;
  gap: 6px;
  line-height: 1;
  text-decoration: none;
}

.logo-accent {
  font-weight: 700;
  /* 3D is bold */
  background: linear-gradient(135deg, #00E0FF, #0066FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 224, 255, 0.4));
}

.logo-studio {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 2px;
  opacity: 0.6;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav-link {
  color: var(--color-text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 10px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Cart Counter Navbar badge */
.cart-badge {
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  position: absolute;
  top: -5px;
  right: -15px;
  box-shadow: 0 0 10px var(--color-accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  transition: var(--transition);
  cursor: none;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(var(--color-accent-rgb), 0.2);
}

.btn-outline {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-border);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: none;
  color: var(--color-text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Cards --- */
.card {
  background: var(--color-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--color-accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), var(--shadow_glow);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

  /* Site Layout */
  .container {
    padding: 0 15px;
  }

  .navbar {
    padding: 15px 20px;
  }

  .hero-title {
    font-size: 2.5rem !important;
  }

  .product-grid {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
    text-align: center;
  }

  /* Admin Layout */
  body {
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px;
    padding: 15px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--color-border);
  }

  .admin-sidebar .logo {
    margin-bottom: 10px !important;
    width: 100%;
    text-align: center;
  }

  .side-nav-link {
    padding: 8px 12px !important;
    font-size: 0.8rem;
    flex: 1 1 auto;
    text-align: center;
  }

  .admin-content {
    margin-left: 0 !important;
    padding: 20px !important;
  }

  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Tables */
  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Modals */
  .modal-card {
    padding: 20px !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  #email-detail-modal .modal-card>div:nth-child(2)>div:first-child {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    /* In a real scenario, use hamburger menu */
  }
}