/* ================================================
   CYBESIS STUDIOS - PREMIUM STOREFRONT
   Cyber-Industrial Design System
   ================================================ */

/* ================================================
   CSS CUSTOM PROPERTIES - CYBESIS PALETTE
   ================================================ */

:root {
  /* ============================================
     CYBESIS BRAND COLORS (Team Hours Tracker Palette)
     ============================================ */

  /* Background Layers - Darker Cyber-Industrial Theme */
  --bg-0: #050b12;                     /* Deepest void - base background */
  --bg-1: #081423;                     /* Primary dark blue-black */
  --bg-2: #0b1d2f;                     /* Blue-tinted dark */
  --panel: #0b1a2a;                    /* Panel background */
  --panel-2: #0f2438;                  /* Secondary panel */
  --line: rgba(120, 180, 210, 0.18);   /* Blue-tinted borders */

  /* Text Colors - Refined Palette */
  --text: #f5fbff;                     /* Primary text */
  --muted: #9ab3c6;                    /* Muted/secondary text */

  /* Accent Colors - Lighter Cyan */
  --accent: #57c7ff;                   /* Primary accent */
  --accent-2: #7fe2ff;                 /* Secondary accent */

  /* Status Colors */
  --good: #2bd4a6;                     /* Success green */
  --warn: #ffb74d;                     /* Warning amber */
  --bad: #ff5c7a;                      /* Error red */

  /* Glow Effect */
  --glow: rgba(87, 199, 255, 0.18);    /* Cyan glow */

  /* Legacy Cyan Scale (for Tailwind compatibility) */
  --color-cyan-50: #ecfeff;
  --color-cyan-100: #cffafe;
  --color-cyan-200: #a5f3fc;
  --color-cyan-300: #7fe2ff;
  --color-cyan-400: #57c7ff;
  --color-cyan-500: #06b6d4;
  --color-cyan-600: #0891b2;
  --color-cyan-700: #0e7490;
  --color-cyan-800: #155e75;
  --color-cyan-900: #164e63;
  --color-cyan-950: #083344;

  /* Background Layers (Mapped to new palette) */
  --ms-bg-solid: var(--bg-0);          /* Deep void - primary background */
  --ms-bg-card: var(--panel);          /* Panel background */
  --ms-bg-card-hover: rgba(87, 199, 255, 0.08); /* Card hover with cyan tint */
  --ms-bg-elevated: var(--panel-2);    /* Elevated surfaces */
  --ms-bg-acrylic: rgba(5, 11, 18, 0.96);  /* Acrylic material */

  /* Text Colors (Mapped to new palette) */
  --ms-text-primary: var(--text);      /* Primary text */
  --ms-text-secondary: var(--text);    /* Secondary text */
  --ms-text-tertiary: var(--muted);    /* Tertiary - muted */
  --ms-text-disabled: rgba(154, 179, 198, 0.5);   /* Disabled text */

  /* Accent Colors (Mapped to lighter cyan) */
  --ms-accent: var(--accent);          /* Primary accent #57c7ff */
  --ms-accent-dark: #06b6d4;           /* Darker pressed state */
  --ms-accent-darker: #0891b2;         /* Darkest pressed state */
  --ms-accent-light: var(--accent-2);  /* Light variant #7fe2ff */

  /* Stroke/Border Colors (Blue-tinted like tracker) */
  --ms-stroke-card: var(--line);       /* Blue-tinted border */
  --ms-stroke-surface: rgba(120, 180, 210, 0.1); /* Subtle border */
  --ms-stroke-divider: var(--line);    /* Dividers */
  --ms-stroke-focus: var(--accent);    /* Focus ring - cyan accent */

  /* Status Colors (Mapped to new palette) */
  --ms-success: var(--good);
  --ms-warning: var(--warn);
  --ms-error: var(--bad);
  --ms-info: var(--accent);

  /* Glow Effects (Cybesis Signature - using new glow) */
  --glow-cyan-sm: 0 0 10px var(--glow);
  --glow-cyan-md: 0 0 20px rgba(87, 199, 255, 0.25);
  --glow-cyan-lg: 0 0 30px rgba(87, 199, 255, 0.35), 0 0 60px var(--glow);

  /* ============================================
     TYPOGRAPHY - System Font Stack
     ============================================ */

  --ms-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  
  /* Type Ramp */
  --ms-type-caption: 0.75rem;          /* 12px */
  --ms-type-body: 0.875rem;            /* 14px */
  --ms-type-body-strong: 0.875rem;     /* 14px semibold */
  --ms-type-body-large: 1.125rem;      /* 18px */
  --ms-type-subtitle: 1.25rem;         /* 20px */
  --ms-type-title: 1.75rem;            /* 28px */
  --ms-type-title-large: 2.5rem;       /* 40px */
  --ms-type-display: 4.25rem;          /* 68px */
  
  /* Font Weights */
  --ms-weight-regular: 400;
  --ms-weight-semibold: 600;
  
  /* Line Heights */
  --ms-line-tight: 1.25;
  --ms-line-normal: 1.43;

  /* ============================================
     SPACING - 4px Grid
     ============================================ */
  --ms-space-2: 0.125rem;    /* 2px */
  --ms-space-4: 0.25rem;     /* 4px */
  --ms-space-8: 0.5rem;      /* 8px */
  --ms-space-12: 0.75rem;    /* 12px */
  --ms-space-16: 1rem;       /* 16px */
  --ms-space-20: 1.25rem;    /* 20px */
  --ms-space-24: 1.5rem;     /* 24px */
  --ms-space-32: 2rem;       /* 32px */
  --ms-space-40: 2.5rem;     /* 40px */
  --ms-space-48: 3rem;       /* 48px */

  /* ============================================
     CORNER RADIUS - Fluent Rounding
     ============================================ */
  --ms-radius-none: 0;
  --ms-radius-sm: 4px;
  --ms-radius-md: 8px;
  --ms-radius-lg: 12px;
  --ms-radius-xl: 16px;

  /* ============================================
     SHADOWS - Fluent Elevation (No Glow)
     ============================================ */
  --ms-shadow-2: 0 2px 4px rgba(0, 0, 0, 0.14);
  --ms-shadow-4: 0 4px 8px rgba(0, 0, 0, 0.14);
  --ms-shadow-8: 0 8px 16px rgba(0, 0, 0, 0.14);
  --ms-shadow-16: 0 16px 32px rgba(0, 0, 0, 0.14);
  --ms-shadow-64: 0 32px 64px rgba(0, 0, 0, 0.24);

  /* ============================================
     MOTION - Fluent Animation
     ============================================ */
  --ms-duration-fast: 83ms;
  --ms-duration-normal: 167ms;
  --ms-duration-slow: 250ms;
  --ms-duration-slower: 333ms;
  --ms-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ms-easing-accelerate: cubic-bezier(0.3, 0, 1, 1);
  --ms-easing-decelerate: cubic-bezier(0, 0, 0, 1);
}

/* ================================================
   BASE STYLES
   ================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ms-font-family);
  font-size: var(--ms-type-body);
  font-weight: var(--ms-weight-regular);
  line-height: var(--ms-line-normal);
  color: var(--ms-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  /* Radial gradient background system from Team Hours Tracker */
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(87, 199, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(127, 226, 255, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 40%, var(--bg-2) 100%);
}

/* Cyber Grid Pattern Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 200, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 200, 230, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.35;
  z-index: 0;
}

/* ================================================
   HEADER - Cybesis Studios Branding
   ================================================ */

/* Topbar with backdrop-blur from Team Hours Tracker */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky, 200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ms-space-12) var(--ms-space-48);
  /* Gradient background with blur from tracker */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(6, 16, 28, 0.9), rgba(6, 16, 28, 0.55));
  border-bottom: 1px solid var(--line);
  max-width: 100%;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--ms-space-12);
  text-decoration: none;
  color: var(--ms-text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
}

/* Brand Badge with Glowing Effect from Tracker */
.site-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(87, 199, 255, 0.22), rgba(127, 226, 255, 0.08)),
    linear-gradient(180deg, #0d2337, #07131f);
  border: 1px solid rgba(127, 226, 255, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 18px var(--glow);
  position: relative;
  color: var(--accent);
}

.site-logo-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 4px;
  border: 1px solid rgba(127, 226, 255, 0.35);
  transform: rotate(45deg);
  opacity: 0.9;
}

.site-logo-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-logo-text .highlight {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.header-tagline {
  display: none;
  font-size: var(--ms-type-caption);
  color: var(--ms-text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--ms-space-24);
}

.nav-link {
  position: relative;
  font-size: var(--ms-type-body);
  font-weight: var(--ms-weight-regular);
  color: var(--ms-text-tertiary);
  text-decoration: none;
  padding: var(--ms-space-8) 0;
  transition: color var(--ms-duration-normal) var(--ms-easing-standard);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ms-accent);
  transition: width var(--ms-duration-normal) var(--ms-easing-standard);
}

.nav-link:hover {
  color: var(--ms-text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--ms-accent);
}

.nav-link.active::after {
  width: 100%;
}

@media (min-width: 768px) {
  .header-tagline {
    display: block;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: var(--ms-space-12) var(--ms-space-16);
  }

  .site-logo-text {
    font-size: var(--ms-type-body);
  }

  .site-logo-icon {
    width: 32px;
    height: 32px;
  }

  .header-nav {
    gap: var(--ms-space-16);
  }

  .nav-link {
    font-size: var(--ms-type-caption);
  }
}

/* ================================================
   HERO SECTION - HIDDEN PER REQUIREMENTS
   ================================================ */

.hero-section {
  display: none !important;
}

.hero-title,
.hero-subtitle {
  display: none !important;
}

/* ================================================
   SECTION HEADER (Microsoft Store style)
   ================================================ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ms-space-32) var(--ms-space-48) var(--ms-space-16);
  max-width: 1600px;
  margin: 0 auto;
}

.section-title {
  font-size: var(--ms-type-subtitle);
  font-weight: var(--ms-weight-semibold);
  color: var(--ms-text-primary);
  display: flex;
  align-items: center;
  gap: var(--ms-space-8);
}

.section-title::after {
  content: '›';
  font-size: 1.25em;
  color: var(--ms-text-secondary);
  font-weight: var(--ms-weight-regular);
}

.section-title:hover {
  color: var(--ms-accent);
  cursor: pointer;
}

.section-title:hover::after {
  color: var(--ms-accent);
}

/* ================================================
   SCREENSAVER GRID
   ================================================ */

.screensaver-section {
  padding: 0 var(--ms-space-48) var(--ms-space-48);
}

.screensaver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .screensaver-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
  }
}

@media (min-width: 1200px) {
  .screensaver-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1600px) {
  .screensaver-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 600px) {
  .section-header,
  .screensaver-section {
    padding-left: var(--ms-space-16);
    padding-right: var(--ms-space-16);
  }
}

/* ================================================
   SCREENSAVER CARD (Cyber-Industrial Panel Style)
   ================================================ */

.screensaver-card {
  position: relative;
  /* Multi-layer gradient panel from tracker */
  background:
    linear-gradient(135deg, rgba(87, 199, 255, 0.06), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  /* Anchor tag reset - cards are now links */
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  /* Card internal padding for breathing room */
  padding: 12px;
}

/* Radial glow accent in top-right corner */
.screensaver-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at center, rgba(87, 199, 255, 0.18), transparent 60%);
  filter: blur(6px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.screensaver-card:hover {
  transform: translateY(-3px);
  border-color: rgba(87, 199, 255, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 20px rgba(87, 199, 255, 0.1);
}

.screensaver-card:hover .thumbnail {
  box-shadow: 0 0 16px rgba(87, 199, 255, 0.15);
}

.screensaver-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 14px;
}

/* Thumbnail with rounded corners and spacing */
.screensaver-card .thumbnail {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel-2);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(120, 180, 210, 0.1);
}

.screensaver-card .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ms-duration-slow) var(--ms-easing-standard);
}

.screensaver-card:hover .thumbnail img {
  transform: scale(1.05);
}

/* Content section with proper spacing */
.screensaver-card .content {
  padding: 14px 4px 4px;
  position: relative;
  z-index: 1;
}

.screensaver-card .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.screensaver-card .tagline {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.screensaver-card .card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* Star Rating Display */
.screensaver-card .rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.screensaver-card .rating-stars {
  color: var(--accent);
  letter-spacing: -2px;
}

.screensaver-card .price-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  padding: 0;
  border: none;
}

/* Pricing Display - Desktop & Mobile */
.screensaver-card .pricing-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 180, 210, 0.1);
}

.screensaver-card .price-free {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--good);
}

.screensaver-card .price-pro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.screensaver-card .price-pro-amount {
  color: var(--accent-2);
  font-weight: 600;
}

/* Desktop Card Layout */
.screensaver-card.card-desktop {
  display: block;
}

.screensaver-card.card-mobile {
  display: none;
}

/* Mobile Card Layout - Horizontal Style */
@media (max-width: 600px) {
  .screensaver-card.card-desktop {
    display: none;
  }

  .screensaver-card.card-mobile {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: flex-start;
    background:
      linear-gradient(135deg, rgba(87, 199, 255, 0.06), transparent 40%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
      var(--panel);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid var(--line);
  }

  .screensaver-card.card-mobile .thumbnail {
    aspect-ratio: 1 / 1;
    width: 88px;
    min-width: 88px;
    border-radius: 10px;
  }

  .screensaver-card.card-mobile .content {
    padding: 0;
    flex: 1;
  }

  .screensaver-card.card-mobile .title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: normal;
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }

  .screensaver-card.card-mobile .tagline {
    display: none;
  }

  .screensaver-card.card-mobile .pricing-container {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    border-top: none;
    padding-top: 0;
    margin-top: 8px;
  }
}

.screensaver-card .view-btn {
  display: none; /* Remove view button - clicking card opens details */
}

/* ================================================
   DETAIL PANEL OVERLAY
   ================================================ */

.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 11, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ms-duration-slow) var(--ms-easing-standard),
              visibility var(--ms-duration-slow) var(--ms-easing-standard);
}

.panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================================================
   DETAIL PANEL (Cyber-Industrial Panel Style)
   ================================================ */

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 101;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  /* Multi-layer panel background from tracker */
  background:
    linear-gradient(135deg, rgba(87, 199, 255, 0.04), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--bg-1);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform var(--ms-duration-slower) var(--ms-easing-decelerate);
  overflow-y: auto;
  overflow-x: hidden;
}

.detail-panel.active {
  transform: translateX(0);
}

@media (max-width: 768px) {
  .detail-panel {
    max-width: 100%;
  }
}

/* Panel Close Button - Tracker Style */
.panel-close {
  position: absolute;
  top: var(--ms-space-16);
  right: var(--ms-space-16);
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), #071524;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s ease;
}

.panel-close:hover {
  transform: translateY(-1px);
  border-color: rgba(87, 199, 255, 0.4);
  color: var(--text);
}

.panel-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Panel Banner */
.panel-banner {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ms-bg-card);
}

.panel-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Panel Content */
.panel-content {
  padding: var(--ms-space-24);
}

/* Panel Header */
.panel-header {
  margin-bottom: var(--ms-space-24);
}

.panel-title {
  font-size: var(--ms-type-title);
  font-weight: var(--ms-weight-semibold);
  line-height: var(--ms-line-tight);
  color: var(--ms-text-primary);
  margin-bottom: var(--ms-space-8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.panel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ms-space-8);
  font-size: var(--ms-type-body);
  color: var(--ms-text-secondary);
  margin-bottom: var(--ms-space-8);
}

.panel-meta .separator {
  color: var(--ms-text-tertiary);
}

.panel-developer {
  font-size: var(--ms-type-body);
  color: var(--ms-accent);
}

.panel-developer a {
  color: inherit;
  text-decoration: none;
}

.panel-developer a:hover {
  text-decoration: underline;
}

/* Panel Description */
.panel-description {
  margin: var(--ms-space-24) 0;
  padding: var(--ms-space-24) 0;
  border-top: 1px solid var(--ms-stroke-divider);
  border-bottom: 1px solid var(--ms-stroke-divider);
}

.panel-description p {
  font-size: var(--ms-type-body);
  line-height: 1.6;
  color: var(--ms-text-secondary);
}

/* Panel Technical Details */
.panel-technical {
  margin-bottom: var(--ms-space-24);
}

.panel-section-title {
  font-size: var(--ms-type-body);
  font-weight: var(--ms-weight-semibold);
  color: var(--ms-text-primary);
  margin-bottom: var(--ms-space-12);
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ms-space-16);
}

.technical-item {
  display: flex;
  flex-direction: column;
  gap: var(--ms-space-4);
}

.technical-label {
  font-size: var(--ms-type-caption);
  font-weight: var(--ms-weight-regular);
  color: var(--ms-text-tertiary);
}

.technical-value {
  font-size: var(--ms-type-body);
  font-weight: var(--ms-weight-regular);
  color: var(--ms-text-primary);
}

/* Panel Features */
.panel-features {
  margin-bottom: var(--ms-space-24);
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--ms-space-12);
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--ms-space-12);
  font-size: var(--ms-type-body);
  color: var(--ms-text-secondary);
  line-height: 1.5;
}

.features-list .check-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--ms-success);
  margin-top: 3px;
}

/* Panel Links */
.panel-links {
  margin-bottom: var(--ms-space-24);
  padding-bottom: var(--ms-space-24);
  border-bottom: 1px solid var(--line);
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-8);
}

/* Pill badges from tracker */
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  transition: 0.15s ease;
}

.link-pill:hover {
  border-color: rgba(87, 199, 255, 0.35);
  color: var(--text);
}

.link-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-pill svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

/* ================================================
   PURCHASE CARD (Cyber-Industrial Panel Style)
   ================================================ */

.purchase-card {
  /* Multi-layer gradient panel from tracker */
  background:
    linear-gradient(135deg, rgba(87, 199, 255, 0.06), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

/* Radial glow accent */
.purchase-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at center, rgba(87, 199, 255, 0.18), transparent 60%);
  filter: blur(6px);
  opacity: 0.6;
  pointer-events: none;
}

.purchase-header {
  margin-bottom: var(--ms-space-16);
  position: relative;
  z-index: 1;
}

.purchase-heading {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--ms-space-8);
}

.purchase-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-2);
  text-shadow: 0 0 12px var(--glow);
}

.purchase-features {
  list-style: none;
  margin-bottom: var(--ms-space-20);
  display: flex;
  flex-direction: column;
  gap: var(--ms-space-8);
  position: relative;
  z-index: 1;
}

.purchase-features li {
  display: flex;
  align-items: center;
  gap: var(--ms-space-8);
  font-size: var(--ms-type-body);
  color: var(--muted);
}

.purchase-features li::before {
  content: '•';
  color: var(--accent);
}

.purchase-actions {
  display: flex;
  flex-direction: column;
  gap: var(--ms-space-12);
  position: relative;
  z-index: 1;
}

/* ================================================
   BUTTONS (Team Hours Tracker Style)
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ms-space-8);
  font-family: var(--ms-font-family);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: 0.15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(87, 199, 255, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* Primary Button - "Good" variant from tracker */
.btn-primary {
  width: 100%;
  height: 48px;
  font-size: var(--ms-type-body);
  color: #dffdf5;
  border-color: rgba(43, 212, 166, 0.35);
  background: linear-gradient(135deg, rgba(43, 212, 166, 0.18), rgba(87, 199, 255, 0.05)), #071f22;
}

.btn-primary:hover {
  border-color: rgba(43, 212, 166, 0.6);
  box-shadow: 0 0 20px rgba(43, 212, 166, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button from tracker */
.btn-secondary {
  width: 100%;
  height: 40px;
  font-size: var(--ms-type-body);
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), #071524;
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: rgba(87, 199, 255, 0.4);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary:disabled:hover {
  background: transparent;
  border-color: var(--ms-stroke-card);
}

/* ================================================
   LOADING STATE
   ================================================ */

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: var(--ms-space-16);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--ms-stroke-card);
  border-top-color: var(--ms-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: var(--ms-type-body);
  color: var(--ms-text-secondary);
}

/* ================================================
   ERROR STATE
   ================================================ */

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: var(--ms-space-16);
  text-align: center;
  padding: var(--ms-space-24);
}

.error-icon {
  width: 48px;
  height: 48px;
  color: var(--ms-error);
}

.error-title {
  font-size: var(--ms-type-subtitle);
  font-weight: var(--ms-weight-semibold);
  color: var(--ms-text-primary);
}

.error-message {
  font-size: var(--ms-type-body);
  color: var(--ms-text-secondary);
  max-width: 400px;
}

.error-retry {
  margin-top: var(--ms-space-8);
}

/* ================================================
   SKELETON LOADING
   ================================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--ms-bg-card) 25%,
    var(--ms-bg-card-hover) 50%,
    var(--ms-bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--ms-radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: transparent;
  border: none;
  border-radius: var(--ms-radius-md);
  overflow: hidden;
}

.skeleton-thumbnail {
  aspect-ratio: 3 / 4;
  border-radius: var(--ms-radius-md);
}

.skeleton-content {
  padding: var(--ms-space-12) 0 0;
}

.skeleton-title {
  height: 18px;
  width: 85%;
  margin-bottom: var(--ms-space-8);
}

.skeleton-tagline {
  height: 14px;
  width: 50%;
}

/* ================================================
   FOOTER
   ================================================ */

.site-footer {
  margin-top: auto;
  padding: var(--ms-space-32) var(--ms-space-48);
  border-top: 1px solid var(--ms-stroke-divider);
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: var(--ms-type-body);
  color: var(--ms-text-secondary);
  margin-bottom: var(--ms-space-4);
}

.footer-brand span {
  color: var(--ms-text-primary);
}

.footer-tagline {
  font-size: var(--ms-type-caption);
  color: var(--ms-text-tertiary);
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 1000;
  padding: var(--ms-space-12) var(--ms-space-16);
  background: var(--ms-accent);
  color: #000000;
  font-weight: var(--ms-weight-semibold);
  text-decoration: none;
  border-radius: 0 0 var(--ms-radius-sm) 0;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible for all interactive elements */
:focus-visible {
  outline: 2px solid var(--ms-stroke-focus);
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

.visible {
  visibility: visible !important;
}

.invisible {
  visibility: hidden !important;
}

/* Glow Effects */
.glow-cyan {
  box-shadow: var(--glow-cyan-md);
}

.glow-cyan-lg {
  box-shadow: var(--glow-cyan-lg);
}

/* Elevation */
.elevation-1 {
  box-shadow: var(--ms-shadow-2);
}

.elevation-2 {
  box-shadow: var(--ms-shadow-4);
}

.elevation-3 {
  box-shadow: var(--ms-shadow-8);
}

/* Transitions */
.transition-smooth {
  transition: all var(--ms-duration-slow) var(--ms-easing-standard);
}

/* Hover Scale */
.hover-scale {
  transition: transform var(--ms-duration-normal) var(--ms-easing-standard);
}

.hover-scale:hover {
  transform: scale(1.03);
}

/* Glass Effect */
.glass-effect {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--ms-stroke-card);
}

/* Text Utilities */
.text-accent {
  color: var(--ms-accent);
}

.text-muted {
  color: var(--ms-text-tertiary);
}

.text-glow {
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

/* ================================================
   LOGO IMAGE STYLES
   ================================================ */

.site-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* ================================================
   PRODUCT DETAIL PAGE STYLES
   Multi-page PHP version - full-page product layout
   ================================================ */

.product-detail-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Back Navigation */
.product-nav {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all var(--ms-duration-normal) var(--ms-easing-standard);
}

.back-link:hover {
  color: var(--accent);
  background: rgba(87, 199, 255, 0.08);
}

.back-link svg {
  transition: transform var(--ms-duration-normal) var(--ms-easing-standard);
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* Product Banner */
.product-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  background: var(--bg-1);
}

.product-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Content */
.product-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Product Header */
.product-header {
  text-align: left;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.product-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.product-meta {
  display: flex;
  justify-content: left;
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.product-meta .separator {
  opacity: 0.5;
}

.product-developer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
}

.product-developer a:hover {
  text-decoration: underline;
}

/* Product Description */
.product-description {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

/* Product Section Titles */
.product-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* Product Technical Details */
.product-technical .technical-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.product-technical .technical-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--panel);
  border-radius: 10px;
  border: 1px solid var(--line);
}

.product-technical .technical-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-technical .technical-value {
  font-size: 0.9375rem;
  color: var(--text);
}

/* Product Features */
.product-features .features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.product-features .features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.product-features .features-list li svg {
  flex-shrink: 0;
  color: var(--good);
  margin-top: 2px;
}

/* Product Links */
.product-links .links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ================================================
   PURCHASE INFO BOX
   ================================================ */

.purchase-info-box {
  display: flex;
  gap: 16px;
  padding: 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(87, 199, 255, 0.08), rgba(87, 199, 255, 0.03));
  border: 1px solid rgba(87, 199, 255, 0.2);
  border-radius: 14px;
  border-left: 4px solid var(--accent);
}

.info-box-icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.info-box-content {
  flex: 1;
}

.info-box-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.info-box-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-box-list li {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.info-box-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.info-box-list li strong {
  color: var(--text);
  font-weight: 500;
}

/* ================================================
   DUAL PURCHASE BUTTONS
   ================================================ */

.purchase-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 20px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.btn-secondary svg {
  flex-shrink: 0;
}

/* Desktop: side by side buttons */
@media (min-width: 600px) {
  .purchase-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .purchase-actions .btn {
    flex: 1;
    min-width: 200px;
  }
}

/* ================================================
   404 ERROR PAGE STYLES
   ================================================ */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.error-page-content {
  text-align: center;
  max-width: 480px;
}

.error-icon-large {
  color: var(--muted);
  margin-bottom: 24px;
  opacity: 0.6;
}

.error-page-title {
  font-size: 5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 30px var(--glow);
}

.error-page-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.error-page-message {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.error-page-actions {
  display: flex;
  justify-content: center;
}

/* ================================================
   RESPONSIVE - PRODUCT DETAIL PAGE
   ================================================ */

@media (max-width: 768px) {
  .product-detail-page {
    padding: 24px 16px 48px;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-meta {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

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

  .product-links .links-row {
    flex-direction: column;
  }

  .product-links .link-pill {
    justify-content: center;
  }

  .purchase-info-box {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .info-box-icon {
    margin-top: 0;
  }

  .error-page-title {
    font-size: 4rem;
  }

  .error-page-subtitle {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .product-banner {
    border-radius: 10px;
    margin-bottom: 24px;
  }

  .product-content {
    gap: 24px;
  }

  .product-title {
    font-size: 1.375rem;
  }

  .purchase-info-box {
    padding: 14px;
  }

  .info-box-title {
    font-size: 0.9rem;
  }

  .info-box-list li {
    font-size: 0.8125rem;
  }

  .error-page-title {
    font-size: 3rem;
  }
}
