/* ============================================================
   AI Art Guide - Design System
   Theme: Dark × Kawaii
   Domain: ai-art.syasta-lu.com
   ============================================================ */

/* ============ Google Fonts ============ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============ CSS Variables ============ */
:root {
  /* Base Colors */
  --bg-primary: #0d0d1a;
  --bg-secondary: #13132b;
  --bg-card: #1a1a35;
  --bg-card-hover: #222245;
  --bg-glass: rgba(26, 26, 53, 0.7);
  --bg-glass-hover: rgba(34, 34, 69, 0.8);

  /* Accent Colors */
  --accent-pink: #ff6b9d;
  --accent-pink-light: #ff8fb8;
  --accent-purple: #c084fc;
  --accent-purple-light: #d4a5ff;
  --accent-blue: #60a5fa;
  --accent-gradient: linear-gradient(135deg, #ff6b9d, #c084fc);
  --accent-gradient-hover: linear-gradient(135deg, #ff8fb8, #d4a5ff);
  --accent-gradient-soft: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(192, 132, 252, 0.15));

  /* Text Colors */
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b8d;
  --text-accent: #ff6b9d;

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(255, 107, 157, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-pink: 0 0 20px rgba(255, 107, 157, 0.15);
  --shadow-glow-purple: 0 0 20px rgba(192, 132, 252, 0.15);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Font */
  --font-primary: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --font-display: 'Outfit', 'Noto Sans JP', sans-serif;

  /* Spacing */
  --header-height: 64px;
  --content-max-width: 1200px;
  --content-padding: 24px;

  /* R18 */
  --r18-accent: #ff4757;
  --r18-bg: #1a0a0a;
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-pink);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ============ Background Decoration ============ */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(255, 107, 157, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(192, 132, 252, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(96, 165, 250, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-padding);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .logo-icon {
  font-size: 1.3rem;
  -webkit-text-fill-color: initial;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  background: var(--accent-gradient-soft);
}

.site-nav .nav-r18 {
  color: var(--r18-accent);
  border: 1px solid rgba(255, 71, 87, 0.3);
  margin-left: 8px;
}

.site-nav .nav-r18:hover {
  background: rgba(255, 71, 87, 0.1);
  color: #ff6b7a;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ============ Hero Section ============ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + 40px) var(--content-padding) 60px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(255, 107, 157, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(192, 132, 252, 0.08) 0%, transparent 60%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient-soft);
  border: 1px solid var(--border-accent);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-pink);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #e8e8f0 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sparkle decorations */
.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-pink);
  animation: sparkle-float 6s ease-in-out infinite;
  opacity: 0.4;
}

.sparkle:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 30%; right: 20%; animation-delay: 1s; background: var(--accent-purple); }
.sparkle:nth-child(3) { bottom: 30%; left: 25%; animation-delay: 2s; }
.sparkle:nth-child(4) { top: 40%; right: 30%; animation-delay: 3s; background: var(--accent-blue); }
.sparkle:nth-child(5) { bottom: 20%; right: 15%; animation-delay: 4s; background: var(--accent-purple); }

@keyframes sparkle-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-20px) scale(1.5); opacity: 0.8; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-primary);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-glow-pink);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 107, 157, 0.25);
  color: white;
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  color: var(--text-primary);
}

/* ============ Section ============ */
.section {
  position: relative;
  padding: 80px var(--content-padding);
  z-index: 1;
}

.section-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============ Cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow-pink);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.card-image-placeholder {
  width: 100%;
  height: 200px;
  background: var(--accent-gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.card-body {
  padding: 24px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--accent-purple);
  background: rgba(192, 132, 252, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-title a {
  color: var(--text-primary);
}

.card-title a:hover {
  color: var(--accent-pink);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-arrow {
  color: var(--accent-pink);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.card:hover .card-arrow {
  transform: translateX(4px);
}

/* ============ Article Page ============ */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 40px) var(--content-padding) 80px;
  position: relative;
  z-index: 1;
}

.article-header {
  margin-bottom: 48px;
  text-align: center;
}

.article-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-pink);
  background: rgba(255, 107, 157, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.article-body {
  font-size: 1rem;
  line-height: 2;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-accent);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--accent-purple-light);
}

.article-body p {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.article-body ul, .article-body ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--accent-pink-light);
  font-weight: 600;
}

/* Code blocks */
.article-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.article-body code {
  background: rgba(192, 132, 252, 0.1);
  color: var(--accent-purple-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', 'Consolas', monospace;
}

.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Info boxes */
.info-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  backdrop-filter: blur(10px);
}

.info-box.tip {
  border-color: rgba(96, 165, 250, 0.3);
}

.info-box.warning {
  border-color: rgba(255, 187, 51, 0.3);
}

.info-box.important {
  border-color: rgba(255, 107, 157, 0.3);
}

.info-box-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.article-body th {
  background: var(--bg-secondary);
  color: var(--accent-pink-light);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-accent);
}

.article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.article-body tr:hover td {
  background: rgba(255, 107, 157, 0.03);
}

/* ============ Category Filter ============ */
.category-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-gradient-soft);
  border-color: var(--border-accent);
  color: var(--accent-pink);
}

/* ============ R18 Gate ============ */
.r18-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--content-padding);
  background: var(--r18-bg);
}

.r18-gate-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: var(--radius-xl);
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 71, 87, 0.05);
}

.r18-gate-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.r18-gate-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--r18-accent);
  margin-bottom: 16px;
}

.r18-gate-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.r18-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-r18-enter {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
}

.btn-r18-enter:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 71, 87, 0.3);
}

.btn-r18-back {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
}

.btn-r18-back:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ============ Footer ============ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-color);
  padding: 48px var(--content-padding);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent-pink);
}

.footer-copy {
  color: var(--text-muted);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  :root {
    --content-padding: 16px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 16px;
    width: 100%;
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .article-body h2 {
    font-size: 1.3rem;
  }

  .hero {
    min-height: 60vh;
  }

  .section {
    padding: 48px var(--content-padding);
  }

  .r18-gate-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* ============ Animations ============ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
