/* ============================================
   Used PC Hub - Tech Renewal Design
   コンセプト: 再生・循環・新しい命を吹き込む
   ============================================ */

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

:root {
  /* Color Palette - Tech Renewal */
  --primary: #0d7377;
  --primary-light: #14a3a8;
  --secondary: #14ffec;
  --accent: #32e0c4;
  --accent-glow: rgba(50, 224, 196, 0.3);
  
  /* Dark Theme */
  --bg-dark: #0a1a2e;
  --bg-surface: #122a42;
  --bg-card: #1a3a5c;
  --bg-elevated: #234b6e;
  
  /* Text Colors */
  --text-primary: #e8f4f8;
  --text-secondary: #a3c4d4;
  --text-muted: #6b8fa8;
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0a1a2e 0%, #0d7377 100%);
  --gradient-card: linear-gradient(145deg, #1a3a5c 0%, #122a42 100%);
  --gradient-accent: linear-gradient(135deg, #14ffec 0%, #32e0c4 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(20, 255, 236, 0.15) 0%, transparent 70%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(20, 255, 236, 0.2);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Typography */
  --font-primary: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  overflow-x: hidden;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

/* ============================================
   Navigation
   ============================================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 26, 46, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(20, 255, 236, 0.1);
  transition: var(--transition);
}

.main-nav.scrolled {
  background: rgba(10, 26, 46, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  align-items: center;
}

.nav-menu a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--secondary);
  background: rgba(20, 255, 236, 0.1);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 1001;
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--secondary);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 26, 46, 0.7) 0%,
    rgba(10, 26, 46, 0.4) 50%,
    rgba(10, 26, 46, 0.9) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: var(--space-lg) var(--space-md);
}

.hero-title {
  margin-bottom: var(--space-md);
}

.title-main {
  display: block;
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  color: #ffffff;
  text-shadow: 
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000,
    0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.title-sub {
  display: block;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--secondary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Amazon Banner */
.amazon-banner {
  margin: var(--space-md) auto;
  max-width: 400px;
}

.amazon-banner a {
  display: block;
  background: linear-gradient(135deg, #ff9900 0%, #ff7700 100%);
  color: #000;
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.amazon-banner a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: #000;
}

/* ============================================
   Section Base
   ============================================ */
.section {
  padding: var(--space-xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: var(--space-md) auto 0;
}

/* ============================================
   Overview / Stats Section
   ============================================ */
.overview-section {
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

.overview-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: var(--gradient-glow);
  pointer-events: none;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.overview-card {
  background: var(--gradient-card);
  border: 1px solid rgba(20, 255, 236, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: var(--transition);
}

.overview-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(20, 255, 236, 0.3);
}

.overview-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(20, 255, 236, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   Categories / Topics Grid
   ============================================ */
.categories-section {
  background: var(--bg-dark);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
}

.topic-card {
  background: var(--gradient-card);
  border: 1px solid rgba(20, 255, 236, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent);
}

.topic-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.topic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.topic-card:hover .topic-image img {
  transform: scale(1.05);
}

.topic-content {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topic-title {
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.topic-title a {
  color: inherit;
}

.topic-title a:hover {
  color: var(--secondary);
}

.topic-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: var(--space-sm);
}

.topic-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.topic-link::after {
  content: '→';
  transition: var(--transition);
}

.topic-link:hover::after {
  transform: translateX(5px);
}

/* ============================================
   News Section
   ============================================ */
.news-section {
  background: var(--bg-surface);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.news-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 255, 236, 0.05);
  transition: var(--transition);
}

.news-item:hover {
  border-color: rgba(20, 255, 236, 0.2);
  background: var(--bg-elevated);
}

.news-date {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.9rem;
}

.news-content {
  flex: 1;
}

.news-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.news-title a {
  color: inherit;
}

.news-title a:hover {
  color: var(--secondary);
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  background: var(--gradient-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.cta-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--bg-dark);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  color: var(--bg-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

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

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--bg-surface);
  border-top: 1px solid rgba(20, 255, 236, 0.1);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h4 {
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-xs);
}

.footer-section ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-section ul a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(20, 255, 236, 0.1);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Page Layout (Subpages)
   ============================================ */
.page-header {
  background: var(--gradient-hero);
  padding: calc(80px + var(--space-lg)) 0 var(--space-lg);
  text-align: center;
}

.page-title {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--secondary);
}

.page-content {
  background: var(--bg-dark);
  padding: var(--space-lg) 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.main-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(20, 255, 236, 0.1);
}

.main-content h2 {
  color: var(--secondary);
  border-bottom: 2px solid rgba(20, 255, 236, 0.2);
  padding-bottom: var(--space-xs);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.main-content h2:first-child {
  margin-top: 0;
}

.main-content h3 {
  color: var(--accent);
  margin-top: var(--space-md);
}

.main-content ul, .main-content ol {
  margin-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.main-content li {
  margin-bottom: var(--space-xs);
}

.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

.main-content th,
.main-content td {
  padding: var(--space-sm);
  border: 1px solid rgba(20, 255, 236, 0.1);
  text-align: left;
}

.main-content th {
  background: var(--bg-card);
  color: var(--secondary);
  font-weight: 600;
}

.main-content td {
  color: var(--text-secondary);
}

.main-content tr:hover td {
  background: rgba(20, 255, 236, 0.05);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sidebar-widget {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(20, 255, 236, 0.1);
}

.sidebar-widget h3 {
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(20, 255, 236, 0.2);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget ul li {
  margin-bottom: var(--space-xs);
}

.sidebar-widget ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid rgba(20, 255, 236, 0.05);
  transition: var(--transition);
}

.sidebar-widget ul a:hover {
  color: var(--secondary);
  padding-left: 10px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 100px var(--space-md) var(--space-md);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    gap: 0;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu a {
    padding: var(--space-sm);
    border-bottom: 1px solid rgba(20, 255, 236, 0.1);
    width: 100%;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-stats {
    gap: var(--space-md);
  }
  
  .stat-item {
    flex: 1 1 120px;
  }
  
  .news-item {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .news-date {
    width: auto;
    text-align: left;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: auto;
    padding: 120px 0 var(--space-lg);
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .stat-item {
    width: 100%;
    max-width: 200px;
  }
  
  .topics-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .main-content {
    padding: var(--space-md);
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Glow Effect */
.glow {
  box-shadow: var(--shadow-glow);
}
