/* ==========================================================================
   Spac2 Design Center - UI Design System & Styling
   Path: /design/css/design.css
   ========================================================================== */

:root {
  --primary: #f43f5e;
  --primary-rgb: 244, 63, 94;
  --primary-glow: rgba(244, 63, 94, 0.4);
  
  --secondary: #f59e0b;
  --secondary-glow: rgba(245, 158, 11, 0.35);

  --accent-violet: #8b5cf6;

  --bg-dark: #09080e;
  --bg-gradient: radial-gradient(circle at 50% 15%, #1c101a 0%, #0c0810 65%, #050407 100%);
  --bg-capsule: rgba(28, 18, 26, 0.84);
  --border-capsule: rgba(255, 255, 255, 0.12);
  --border-card: rgba(255, 255, 255, 0.1);

  --text-main: #ffffff;
  --text-muted: #b3a7b5;
  --text-dim: #7a6e7c;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Chromatic Fluid Design Canvas */
.design-canvas-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Ambient Glow Layer */
.ambient-glow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.26;
}

.glow-rose {
  top: 10%;
  left: 20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #f43f5e 0%, transparent 70%);
}

.glow-amber {
  top: 42%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
}

.glow-violet {
  bottom: 5%;
  left: 35%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

/* ==========================================================================
   1. Top Floating Header Capsule
   ========================================================================== */
.design-top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 8px 16px;
}

.header-capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-capsule);
  border: 1px solid var(--border-capsule);
  border-radius: 9999px;
  padding: 8px 14px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform-origin: center top;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              box-shadow 0.25s ease;
}

.header-capsule.header-scrolling-compact {
  transform: scale(0.97) translateY(-2px);
  background: rgba(22, 14, 20, 0.94);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.75);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  outline: none;
}

.header-icon-btn:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fb7185;
  transform: scale(1.06);
}

.header-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.brand-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand-name {
  color: #ffffff;
}

.brand-divider {
  color: var(--text-dim);
  font-size: 12px;
}

.brand-module {
  color: #fb7185;
}

/* ==========================================================================
   2. Main Layout Container
   ========================================================================== */
.design-hub-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px 60px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   3. 3D Cover Flow Showcase
   ========================================================================== */
.coverflow-hero-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 16px;
  perspective: 1200px;
  user-select: none;
}

.coverflow-stage-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(28, 18, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.stage-nav-arrow:hover {
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  border-color: #f43f5e;
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
}

.stage-nav-arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.arrow-left {
  left: 20px;
}

.arrow-right {
  right: 20px;
}

/* 3D Track & Cards */
.coverflow-cards-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.coverflow-card-item {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 28px;
  overflow: hidden;
  background: #1c1420;
  border: 2px solid var(--border-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
              opacity 0.45s ease,
              filter 0.45s ease,
              border-color 0.35s ease,
              box-shadow 0.35s ease;
  will-change: transform, opacity, filter;
  -webkit-box-reflect: below 8px linear-gradient(to bottom, transparent 65%, rgba(0, 0, 0, 0.4));
}

.coverflow-card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.coverflow-card-item.active {
  border-color: #f43f5e;
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.55), 0 20px 50px rgba(0, 0, 0, 0.7);
  z-index: 30;
}

.coverflow-card-item:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.3);
  filter: brightness(1.1);
}

/* Hero Details */
.hero-design-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 24px;
  gap: 10px;
  max-width: 620px;
  min-height: 120px;
}

.hero-design-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.2;
}

.hero-design-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-design-action {
  margin-top: 6px;
}

.hero-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 36px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(244, 63, 94, 0.45);
  transition: var(--transition);
}

.hero-launch-btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 32px rgba(244, 63, 94, 0.65);
}

/* ==========================================================================
   4. Search Omnibar
   ========================================================================== */
.design-search-section {
  width: 100%;
  max-width: 640px;
  margin-top: 32px;
}

.design-search-pill {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.design-search-icon {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  pointer-events: none;
}

.design-search-input {
  width: 100%;
  height: 48px;
  background: rgba(28, 18, 26, 0.78);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  padding: 0 46px 0 48px;
  color: #ffffff;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.design-search-input:focus {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25), 0 8px 24px rgba(0, 0, 0, 0.5);
  background: rgba(36, 22, 34, 0.92);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.search-clear-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ==========================================================================
   5. Category Filter Tabs
   ========================================================================== */
.design-filter-section {
  margin-top: 24px;
  width: 100%;
  max-width: 720px;
}

.design-filter-pills-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.filter-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.filter-pill-btn.active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(245, 158, 11, 0.25));
  border-color: #f43f5e;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

.count-badge {
  font-size: 11.5px;
  opacity: 0.75;
}

/* ==========================================================================
   6. Bottom Design Gallery Grid
   ========================================================================== */
.design-gallery-section {
  width: 100%;
  max-width: 1120px;
  margin-top: 36px;
}

.design-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px 16px;
  width: 100%;
}

.design-tile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 14px 10px;
  border-radius: 22px;
  background: rgba(28, 18, 26, 0.5);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.design-tile-card:hover {
  background: rgba(38, 24, 36, 0.85);
  border-color: rgba(244, 63, 94, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.design-tile-card.spotlight-active {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.12);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
}

.design-tile-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #1c1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  margin-bottom: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.design-tile-card:hover .design-tile-icon-box {
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.4);
  border-color: rgba(244, 63, 94, 0.5);
}

.design-tile-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.design-tile-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 125px;
}

.design-tile-get-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  height: 26px;
  border-radius: 9999px;
  background: #2e1e2c;
  color: #fb7185;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  transition: all 0.2s ease;
}

.design-tile-card:hover .design-tile-get-btn {
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.5);
}

/* Empty Box */
.design-empty-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.design-empty-box p {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.design-empty-box span {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.design-minimal-footer {
  width: 100%;
  max-width: 1080px;
  margin: 40px auto 0 auto;
  padding: 24px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   8. Responsive Media Queries
   ========================================================================== */
@media (max-width: 768px) {
  .coverflow-stage-wrapper {
    height: 240px;
  }

  .coverflow-card-item {
    width: 180px;
    height: 180px;
    border-radius: 24px;
  }

  .hero-design-title {
    font-size: 24px;
  }

  .hero-design-desc {
    font-size: 13.5px;
  }

  .design-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px 10px;
  }

  .design-tile-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
  }

  .stage-nav-arrow {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .coverflow-stage-wrapper {
    height: 210px;
  }

  .coverflow-card-item {
    width: 155px;
    height: 155px;
    border-radius: 20px;
  }

  .arrow-left {
    left: 8px;
  }

  .arrow-right {
    right: 8px;
  }

  .hero-launch-btn {
    padding: 10px 28px;
    font-size: 14px;
  }

  .design-minimal-footer {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .footer-links {
    justify-content: center;
  }
}
