/* ============================================
   FCPX Booster - Main Shared Styles
   ============================================ */

/* === MATERIAL ICONS FONT === */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url('../assets/MaterialIcons-Regular.ttf') format('truetype');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
}

/* === CSS RESET & NORMALIZATION === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* === CSS VARIABLES (DESIGN SYSTEM) === */
:root {
  /* Colors - Background */
  --bg-primary: #1f1f1f;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #333333;
  --bg-elevated: #3a3a3a;
  --bg-hover: #404040;

  /* Colors - Accent (Neutral theme) */
  --accent: #999999;
  --accent-hover: #aaaaaa;
  --accent-dim: #777777;

  /* Colors - Text */
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  /* Colors - Borders */
  --border-color: #404040;
  --border-focus: #666666;

  /* Colors - Semantic */
  --success: #4ade80;
  --error: #f87171;
  --warning: #fbbf24;

  /* Spacing Scale */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(102, 102, 102, 0.3);

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* === SHARED HEADER === */
.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-shrink: 0;
  height: var(--header-height);
}

/* Desktop header - visible by default */
.desktop-header {
  display: block;
}

/* Mobile header - hidden by default */
.mobile-header {
  display: none;
}

.header-content {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.header-logo:hover {
  opacity: 0.85;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-left: var(--spacing-xl);
}

.nav-link {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  padding: var(--spacing-xs) 0;
  border-radius: 0;
  transition: all var(--transition-fast);
  position: relative;
}

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

.nav-link.active {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.share-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
}

.header-share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-share-buttons .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.header-share-buttons .share-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.header-share-buttons .share-twitter:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.header-share-buttons .share-linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: #fff;
}

.header-share-buttons .share-facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.social-link {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.social-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Support/Coffee Button - Yellow gradient like Buy Me a Coffee */
.support-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: #1a1a1a;
  background: linear-gradient(135deg, #ffdd00, #ff9500);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.support-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
  color: #1a1a1a;
}

.support-btn .coffee-icon {
  font-size: 1.1rem;
}

/* === SHARED FOOTER === */
.site-footer {
  background: transparent;
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-top: auto;
  flex-shrink: 0;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.footer-link {
  color: #00D4FF;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #00E5FF;
}

.footer-content p {
  margin: 0;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

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

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* === MOBILE MENU === */
.mobile-tools-label {
  display: flex;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-left: auto;
  margin-right: var(--spacing-sm);
}

.coffee-btn-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ffdd00, #ff9500);
  border-radius: var(--radius-sm);
  color: #1a1a1a;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.coffee-btn-mobile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.coffee-btn-mobile .coffee-icon {
  font-size: 1.25rem;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.mobile-menu-btn .material-icons {
  font-size: 24px;
}

.mobile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.mobile-dropdown.active {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.mobile-nav-link:hover {
  background: var(--bg-hover);
}

.mobile-share-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.mobile-share-btn:last-child {
  border-bottom: none;
}

.mobile-share-btn:hover {
  background: var(--bg-hover);
}

.mobile-share-btn span {
  font-size: var(--text-base);
}

/* === LAYOUT UTILITIES === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.site-main {
  flex: 1;
  padding: var(--spacing-xl) var(--spacing-lg);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Hide desktop header */
  .desktop-header {
    display: none;
  }

  /* Show mobile header */
  .mobile-header {
    display: block;
  }

  .site-header {
    height: auto;
    min-height: var(--header-height);
    position: relative;
  }

  .header-content {
    flex-wrap: nowrap;
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-sm);
  }
}

@media (max-width: 640px) {
  :root {
    --text-5xl: 2rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 3rem;
  }

  .header-logo .logo-text {
    display: none;
  }

  .site-main {
    padding: var(--spacing-md);
  }
}
