/* ========================================
   プロンプト資産管理サービス - Digital Archive Theme
   ======================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;600;800&display=swap');

/* CSS変数定義 - Dark/Neon Theme */
:root {
  --primary-color: #06b6d4;
  /* Cyan 500 */
  --primary-glow: rgba(6, 182, 212, 0.4);
  --secondary-color: #8b5cf6;
  /* Violet 500 */
  --secondary-glow: rgba(139, 92, 246, 0.4);

  --bg-dark: #0f172a;
  /* Slate 900 */
  --bg-darker: #020617;
  /* Slate 950 */
  --bg-card: rgba(30, 41, 59, 0.7);
  /* Slate 800 with opacity */

  --text-main: #f1f5f9;
  /* Slate 100 */
  --text-muted: #94a3b8;
  /* Slate 400 */

  --border-color: #334155;
  /* Slate 700 */
  --border-glow: rgba(6, 182, 212, 0.3);

  --shadow-neon: 0 0 10px var(--primary-glow), 0 0 20px rgba(6, 182, 212, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* リセットとベース */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 20%);
  -webkit-font-smoothing: antialiased;
}

/* タイポグラフィ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'JetBrains Mono', monospace;
  /* Tech feel */
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

h1 {
  font-size: 3rem;
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  display: inline-block;
  color: var(--primary-color);
}

h3 {
  font-size: 1.25rem;
  color: var(--secondary-color);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

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

a:hover {
  color: var(--secondary-color);
  text-shadow: 0 0 8px var(--secondary-glow);
}

/* ========================================
   ヘッダー
   ======================================== */
header {
  background: rgba(15, 23, 42, 0.9);
  /* Glass effect */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ナビゲーション */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-item a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ハンバーガー */
.hamburger span {
  background-color: var(--text-main);
}

/* ========================================
   ヒーローセクション
   ======================================== */
.hero {
  position: relative;
  /* 画像パスは変更後のものを指定 */
  background: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.7)), url('images/hero-bg-v2.png');
  background-position: center;
  background-size: cover;
  padding: 10rem 2rem 8rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
}

.hero h1 {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #ffffff !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: #ffffff !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  /* Black border effect */
  text-shadow:
    3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
    0 0 20px rgba(0, 0, 0, 0.8);
  /* Drop shadow */
}

.hero p {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  color: #ffffff;
  text-shadow: 2px 2px 4px #000, 0 0 5px rgba(0, 0, 0, 0.8);
}

/* ========================================
   メインレイアウト
   ======================================== */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

/* ========================================
   コンポーネント: カード
   ======================================== */
.card,
.intro-section,
.sidebar-section,
.news-item {
  background: var(--bg-card);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 8px;
  /* 角を少しシャープに */
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* カードのホバーエフェクト（ネオンボーダー） */
.card::before,
.intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  opacity: 0;
  transition: var(--transition);
}

.card:hover,
.intro-section:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.15);
}

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

/* カードグリッド */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* ニュースリスト */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  padding: 1.25rem;
  border-left: 2px solid var(--secondary-color);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%);
}

.news-item:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
}

.news-item strong {
  color: var(--secondary-color);
  display: block;
  margin-bottom: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

/* ========================================
   サイドバー
   ======================================== */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-section h3 {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.sidebar-section li {
  margin-bottom: 0.5rem;
}

.sidebar-section a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.sidebar-section a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-color);
  border-color: rgba(255, 255, 255, 0.1);
  padding-left: 1.25rem;
  /* Slide effect */
}

/* ========================================
   フッター
   ======================================== */
footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 5rem 2rem 2rem;
  margin-top: 6rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4rem;
}

.footer-section h3 {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text-main);
}

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

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    margin-top: 0;
    margin-bottom: 4rem;
    grid-row: 1;
  }

  .main-content {
    grid-row: 2;
  }
}

/* モバイル対応補正 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .nav-menu {
    display: none;
    /* Hamburger support needed in JS, CSS hides it for now */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
  }
}

/* ========================================
   追加ユーティリティクラス（HTML整合性用）
   ======================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.main-content {
  background: var(--bg-card);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.page-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}


/* === Mobile fix v3 (auto-injected) === */
html, body { overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 768px) {
  /* ヒーローテキストがviewportからはみ出さないようにする */
  h1, h2, h3 {
    font-size: clamp(1.3rem, 5vw, 2.5rem) !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  p, li, td, th, span, a {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* 全要素の幅を100vw以内に */
  .container, main, section, article, header, footer, nav,
  [class*="container"], [class*="wrapper"], [class*="content"] {
    max-width: 100vw;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}
/* === End Mobile fix v3 === */
