/* ============================================
   exdev.net - Dark Casino Design System
   ============================================ */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #f59e0b;
  --accent-secondary: #10b981;
  --accent-danger: #ef4444;
  --accent-blue: #3b82f6;
  --border: #2d3748;
  --border-light: #374151;
  --gradient-primary: linear-gradient(135deg, #f59e0b, #ef4444);
  --gradient-dark: linear-gradient(135deg, #0a0e17, #1a2332);
  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --font-display: 'Orbitron', 'Noto Sans JP', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-jp);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-jp);
  font-weight: 700;
  line-height: 1.4;
}

h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-secondary);
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.logo-icon {
  font-size: 1.8rem;
}

.logo-text {
  color: var(--text-primary);
}

.logo-accent {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 6rem 2rem;
  background: var(--gradient-dark);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.1), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1), transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.hero-visual {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
  animation: float 3s ease-in-out infinite;
}

.dice {
  font-size: 3rem;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========== Sections ========== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ========== Post Cards ========== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.1);
}

.post-card-inner {
  padding: 1.5rem;
}

.post-card-category {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge:hover {
  background: var(--accent);
  color: #fff;
}

.post-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.post-card-title a {
  color: var(--text-primary);
}

.post-card-title a:hover {
  color: var(--accent);
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.post-card-meta time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.read-more {
  color: var(--accent);
  font-weight: 500;
}

.read-more:hover {
  color: var(--accent-secondary);
}

/* ========== Categories ========== */
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 0 2rem;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: var(--transition);
}

.category-chip:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.category-icon {
  font-size: 1.2rem;
}

.category-count {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ========== Category Grid ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.category-card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-card h2 {
  color: var(--text-primary);
  font-size: 1.3rem;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== Page Header ========== */
.page-header {
  background: var(--gradient-dark);
  padding: 4rem 2rem;
  text-align: center;
}

.page-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 900;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ========== Single Post ========== */
.post-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-header-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-title {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.post-description {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== TOC ========== */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc ul li {
  margin-bottom: 0.5rem;
}

.toc ul li a {
  color: var(--text-secondary);
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.toc ul li a:hover {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

/* ========== Post Content ========== */
.post-content {
  font-size: 1.05rem;
  line-height: 2;
}

.post-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content strong {
  color: var(--accent);
  font-weight: 700;
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-card);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
}

.post-content blockquote p {
  margin: 0;
  color: var(--text-secondary);
}

.post-content code {
  background: var(--bg-card);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.post-content th,
.post-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content th {
  background: var(--bg-card);
  font-weight: 700;
}

/* ========== Post Footer ========== */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.share-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition);
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== Related Posts ========== */
.related-posts {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
}

.page-link {
  padding: 0.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition);
}

.page-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links h3,
.footer-categories h3 {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links ul,
.footer-categories ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li,
.footer-categories ul li {
  margin-bottom: 0.5rem;
}

.footer-links ul li a,
.footer-categories ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links ul li a:hover,
.footer-categories ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .mobile-menu.active {
    display: block;
  }

  .hero {
    padding: 4rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .post-article {
    padding: 2rem 1rem;
  }

  .post-title {
    font-size: 1.8rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-visual {
    display: none;
  }

  .post-card-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeInUp 0.5s ease-out both;
}

/* ========== Utility ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }