/* ========================================
   RateMuch Design System
   Apple Books-inspired, monochrome + accent
   ======================================== */

:root {
  /* Colors - Light Mode */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F2F2F7;
  --color-bg-tertiary: #E5E5EA;
  --color-label-primary: #000000;
  --color-label-secondary: #3C3C43;
  --color-label-tertiary: #8E8E93;
  --color-label-quaternary: #C7C7CC;
  --color-separator: rgba(60, 60, 67, 0.12);
  --color-separator-opaque: #E5E5EA;
  --color-accent: #3996EF;
  --color-destructive: #FF3B30;
  --color-success: #34C759;
  --color-warning: #FF9500;
  --color-star: #FF9500;

  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-blur: blur(20px);
  --glass-border: rgba(60, 60, 67, 0.12);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --font-family-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;

  /* Type Scale */
  --text-large-title: 36px;
  --text-title1: 24px;
  --text-title2: 20px;
  --text-title3: 17px;
  --text-body: 16px;
  --text-callout: 14px;
  --text-footnote: 12px;
  --text-caption: 11px;

  /* Font Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --content-max-width: 680px;
  --header-height: 52px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-primary: #000000;
    --color-bg-secondary: #1C1C1E;
    --color-bg-tertiary: #2C2C2E;
    --color-label-primary: #FFFFFF;
    --color-label-secondary: #EBEBF5;
    --color-label-tertiary: #8E8E93;
    --color-label-quaternary: #636366;
    --color-separator: rgba(84, 84, 88, 0.65);
    --color-separator-opaque: #38383A;
    --color-accent: #3996EF;

    --glass-bg: rgba(28, 28, 30, 0.8);
    --glass-border: rgba(84, 84, 88, 0.65);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.5);
  }
}

/* ========================================
   Base Icon Sizing (Lucide)
   ======================================== */
[data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
  display: inline-block;
  vertical-align: middle;
}

/* ========================================
   Star Rating Component
   ======================================== */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.star-rating .star-slot {
  display: inline-block;
  cursor: default;
  transition: transform var(--transition-fast);
}
.star-rating .star-slot .star {
  display: block;
  width: 22px;
  height: 22px;
}
.star-rating.interactive .star-slot {
  cursor: pointer;
}
.star-rating.interactive .star-slot:hover {
  transform: scale(1.15);
}
.star-rating.star-rating-sm .star-slot .star {
  width: 14px;
  height: 14px;
}
.star-rating.star-rating-lg .star-slot .star {
  width: 28px;
  height: 28px;
}

/* ========================================
   Shimmer / Skeleton Placeholders
   ======================================== */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg,
    var(--color-bg-tertiary) 25%,
    var(--color-bg-secondary) 50%,
    var(--color-bg-tertiary) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-sm);
}
.shimmer-circle {
  border-radius: var(--radius-pill);
}
.shimmer-text {
  height: 14px;
  margin-bottom: var(--space-sm);
}
.shimmer-feed {
  padding-top: var(--space-xl);
}
.shimmer-card {
  display: flex;
  border-radius: var(--radius-lg);
  background: var(--color-bg-primary);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-height: 160px;
  margin-bottom: var(--space-lg);
}
.shimmer-card .shimmer-img {
  width: 40%;
  min-width: 120px;
  min-height: 160px;
  flex-shrink: 0;
  border-radius: 0;
}
.shimmer-card .shimmer-desc {
  width: 60%;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
