/* ProcreateTools - Global Styles */
:root {
  --primary: #7f13ec;
  --primary-dark: #6610c2;
  --bg-dark: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border-color: #2a2a2a;
  --success: #22c55e;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo img { width: 36px; height: 36px; border-radius: 8px; }
.logo span { color: var(--primary); }

.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav a:hover { color: var(--text-primary); }

.header-cta {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}
.header-cta:hover { background: var(--primary-dark); }

/* Mobile Nav */
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .nav, .header-cta { display: none; }
  .mobile-menu-btn { display: block; }
}

/* Hero Section */
.hero {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(127, 19, 236, 0.1) 0%, transparent 100%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

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

.btn-appstore {
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.btn-appstore:hover { background: #1a1a1a; }
.btn-appstore svg { width: 24px; height: 24px; }
.btn-appstore-text { text-align: left; }
.btn-appstore-text small { font-size: 0.7rem; opacity: 0.8; display: block; }
.btn-appstore-text strong { font-size: 1.1rem; }

/* Section */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Grid */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Category Card */
.category-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}
.category-card-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card-img svg { width: 48px; height: 48px; opacity: 0.5; }
.category-card-content { padding: 20px; }
.category-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.category-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Product Card */
.product-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}
.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}
.product-card-img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  position: relative;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.product-card-badge.free { background: var(--success); }
.product-card-content { padding: 16px; }
.product-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.product-card-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.product-card-btn {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}
.product-card-btn:hover { background: var(--primary-dark); }

/* Product Page */
.product-hero {
  padding: 40px 0 60px;
}
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) { .product-grid { grid-template-columns: 1fr; } }

.product-image {
  aspect-ratio: 1;
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}
.product-description {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}
.product-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}
.product-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.product-meta-item svg { width: 20px; height: 20px; color: var(--primary); }

/* Content Sections */
.content-section { margin-top: 48px; }
.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.content-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.content-section li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}
.content-section li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { opacity: 0.5; }

/* Related Products */
.related-products { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--border-color); }

/* Blog */
.blog-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}
.blog-card:hover { border-color: var(--primary); }
.blog-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
}
.blog-card-content { padding: 20px; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: 0.9rem; color: var(--text-secondary); }
.blog-card-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }

/* Blog Post */
.blog-post { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.blog-post h1 { font-size: 2.5rem; margin-bottom: 24px; line-height: 1.3; }
.blog-post-meta { color: var(--text-secondary); margin-bottom: 40px; }
.blog-post-content { line-height: 1.8; }
.blog-post-content h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.blog-post-content p { margin-bottom: 20px; color: var(--text-secondary); }
.blog-post-content ul, .blog-post-content ol { margin: 20px 0; padding-left: 24px; color: var(--text-secondary); }
.blog-post-content li { margin-bottom: 8px; }
.blog-post-content a { color: var(--primary); text-decoration: underline; }

/* SEO Text */
.seo-text {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  margin-top: 60px;
}
.seo-text h2 { font-size: 1.25rem; margin-bottom: 16px; }
.seo-text p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand p { color: var(--text-secondary); margin-top: 16px; font-size: 0.9rem; max-width: 300px; }
.footer-links h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 480px) { .footer-bottom { flex-direction: column; gap: 12px; text-align: center; } }

/* Utility */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* Page Hero (Category/Product pages) */
.page-hero {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-color);
}
.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.page-hero p {
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
}

/* Static Pages */
.static-page { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.static-page h1 { font-size: 2.5rem; margin-bottom: 32px; }
.static-page h2 { font-size: 1.5rem; margin: 32px 0 16px; }
.static-page p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }
.static-page ul { margin: 16px 0; padding-left: 24px; color: var(--text-secondary); }
.static-page li { margin-bottom: 8px; }

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.error-page h1 { font-size: 6rem; font-weight: 800; color: var(--primary); }
.error-page h2 { font-size: 1.5rem; margin: 16px 0; }
.error-page p { color: var(--text-secondary); margin-bottom: 32px; }
