/* ------------------------------
   Base
------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
    sans-serif;
  line-height: 1.7;
  color: #f5f5f5;
  background-color: #0f1115;
}

/* ------------------------------
   Layout
------------------------------ */

.site-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ------------------------------
   Hero header
------------------------------ */

.hero-header {
  background: radial-gradient(circle at top left, #3b82f6, #0f172a 55%);
  color: #f9fafb;
  padding: 2.5rem 1.5rem 2.75rem;
  margin: 0 -1.25rem 2rem;
  text-align: center;
}

.hero-header h1[class="bazzite-os-guide" i] {
  font-size: clamp(2.4rem, 4vw, 3rem);
  letter-spacing: 0.08em;
  text-transform: none; /* ← これで入力通りに表示される */
}

/* ============================
   ▼ PC（デフォルト）
   ============================ */
.bazzite-nav {
  width: 100%;
  background: #1e2a38;
  padding: 12px 0;
  margin-bottom: 25px;
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

.bazzite-nav ul {
  list-style: none;
  display: flex;
  gap: 35px;
  margin: 0;
  padding: 0;
}

.bazzite-nav a {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.bazzite-nav a:hover {
  color: #4db8ff;
}

/* ハンバーガーアイコン（PCでは非表示） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
}

/* ============================
   ▼ スマホ（768px 以下）
   ============================ */
@media (max-width: 768px) {
  .bazzite-nav ul {
    display: none; /* 初期状態は非表示 */
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 15px 0;
  }

  .hamburger {
    display: flex; /* スマホで表示 */
  }

  .nav-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
  }

  /* メニュー展開時 */
  .bazzite-nav ul.active {
    display: flex;
  }
}

/* ============================
   ▼ 小型スマホ（480px 以下）
   ============================ */
@media (max-width: 480px) {
  .bazzite-nav a {
    font-size: 0.95rem;
    padding: 12px 0;
  }
}

/* PC：リンクの間に ｜ を入れる */
.bazzite-nav ul li:not(:last-child)::after {
  content: "｜";
  color: #ffffff;
  margin-left: 10px;
}

/* スマホ：縦並びなので ｜ を消す & 間隔を広げる */
@media (max-width: 768px) {
  .bazzite-nav ul li::after {
    content: "";
  }

  .bazzite-nav ul li {
    margin: 8px 0;
  }
}

/* ------------------------------
   Article
------------------------------ */
.banner-row {
  display: flex;
  justify-content: center;
  gap: 20px; /* スマホ用の基本間隔 */
  margin: 30px 0;
  flex-wrap: wrap;
}

.banner-row a {
  flex: 1 1 300px;
  text-align: center;
}

/* PC（幅900px以上）で間隔を広げる */
@media (min-width: 900px) {
  .banner-row {
    gap: 40px; /* ← PC で広めの間隔 */
  }
}

.bazzite-article {
  background-color: #111827;
  border-radius: 1rem;
  padding: 2rem 1.5rem 2.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.bazzite-article > h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.4;
}

.bazzite-article p {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #e5e7eb;
}

strong {
  font-weight: 700;
  color: #fbbf24;
}

/* ================================
   Code Block（縦幅広め・スマホ対応）
================================ */

.code-block {
  position: relative;
  background: #1b1b1f;
  color: #e5e7eb;

  padding: 42px 20px 22px;
  border-radius: 10px;
  margin: 26px 0;

  overflow-x: auto;
  white-space: nowrap; /* ← PCでは横スクロール */

  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: Consolas, Menlo, monospace;
  font-size: 0.92rem;

  width: 100%;
  max-width: 480px;
  box-sizing: border-box;

  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

/* ================================
   スマホ（幅599px以下）
================================ */
@media (max-width: 599px) {
  .code-block {
    max-width: 100%;
    padding: 38px 16px 18px;

    /* ← スマホでは折り返しを許可して縮小させる */
    white-space: normal;
  }

  .code-block code,
  .code-block pre {
    white-space: pre-wrap; /* ← コードを自然に折り返す */
  }

  .copy-btn-wrapper {
    top: 6px;
    right: 10px;
  }
}

/* ================================
   コピー ボタン
================================ */
.copy-btn-wrapper {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
}

.copy-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #d1d5db;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}


/* ------------------------------
   Headings
------------------------------ */

h2 {
  margin: 2.25rem 0 1rem;
  font-size: 1.25rem;
  border-left: 4px solid #3b82f6;
  padding-left: 0.6rem;
  color: #f9fafb;
}

h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.05rem;
  color: #e5e7eb;
}

/* ------------------------------
   Horizontal rule
------------------------------ */

hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin: 2rem 0;
}

/* ------------------------------
   Links
------------------------------ */

a {
  color: #60a5fa;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #93c5fd;
  opacity: 0.9;
}

/* ------------------------------
   Lists
------------------------------ */

ul,
ol {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
}

li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

/* ------------------------------
   Feature block with image
------------------------------ */

.features-with-image {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.features-text {
  flex: 1 1 60%;
}

.features-image {
  flex: 0 0 260px;
  max-width: 260px;
}

.features-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

/* ------------------------------
   Tables
------------------------------ */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.5rem;
  font-size: 0.93rem;
  background-color: #020617;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.spec-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.6);
  vertical-align: top;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  width: 26%;
  background: linear-gradient(90deg, #0f172a, #020617);
  font-weight: 600;
  color: #bfdbfe;
}

/* ------------------------------
   Install banner
------------------------------ */

.install-banner {
  display: inline-block;
  margin: 2rem auto 0;
  padding: 0.9rem 1.6rem;
  font-size: 1.05rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  color: #0b1120;
  text-align: center;
  border: none;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

a:hover .install-banner {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.6);
  filter: brightness(1.05);
}

/* ------------------------------
   Footer
------------------------------ */

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(75, 85, 99, 0.7);
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}

footer p {
  margin: 0.2rem 0;
}

/* ------------------------------
   Responsive
------------------------------ */

@media (max-width: 900px) {
  .site-wrapper {
    padding: 0 1rem 2.5rem;
  }

  .hero-header {
    margin: 0 -1rem 1.75rem;
    padding-inline: 1.25rem;
  }

  .bazzite-article {
    padding-inline: 1.25rem;
  }

  .features-with-image {
    gap: 1.25rem;
  }

  .features-image {
    flex-basis: 220px;
    max-width: 220px;
  }
}

@media (max-width: 720px) {
  .features-with-image {
    flex-direction: column;
  }

  .features-image {
    flex: 1 1 auto;
    max-width: 100%;
    order: 2; /* 画像を下に固定したい場合は 2、上にしたい場合は 0 */
  }

  .features-text {
    order: 1;
  }

  .bazzite-article {
    padding: 1.5rem 1.1rem 2rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .spec-table td:first-child {
    width: 32%;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .hero-header {
    padding: 2rem 1rem 2.25rem;
  }

  .bazzite-article > h1 {
    font-size: 1.3rem;
  }

  .install-banner {
    width: 100%;
    box-sizing: border-box;
  }
}

