body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      background-color: #121212;
      color: #ffffff;
    }

h1 img {
  width:auto;
  height:64px;
  display:block;
}

    /* ==== サイドバー固定 ==== */
    .sidebar {
      width: 220px;
      height: 100vh;
      background-color: #1a1a1a;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 100;
    }

.side-nav {
  display: flex;
  flex-direction: column;
  margin-top: 64px;
  gap: 2px; /* ← 隙間 */
}

.side-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1e1e1e;
  color: #ccc;
  text-decoration: none;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.side-nav a:hover,
.side-nav a.active {
  background-color: #2a2a2a;
  color: #fff;
}

.side-nav a .arrow {
  font-size: 1rem;
  color: inherit;
}

.sidebar-footer {
  margin-top: auto; /* ナビの下にピッタリ */
  padding-top: 2rem;
  font-size: 0.75rem;
  color: #888;
  line-height: 1.4;
}

.sidebar-footer a {
  color: #888;
  text-decoration: none;
  margin: 0 0.3rem;
  transition: color 0.2s ease;
padding-left:1rem;
}

.sidebar-footer a:hover {
  color: #e50914; /* ワンポイントの赤色 */
}


    /* ==== ヘッダー ==== */
    header {
      background-color: #1e1e1e;
      height: 64px;
      padding: 0 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 200;
    }

    header h1 {
      font-size: 1.5rem;
      color: #e50914;
    }

    .header-right {
      display: flex;
      align-items: center;
    }

    .header-right a {
      text-decoration: none;
      margin-left: 1rem;
      font-weight: bold;
    }

    .btn-outline {
      color: #ffffff;
      border: 2px solid #e50914;
      padding: 0.4rem 1rem;
      border-radius: 9999px;
      transition: background-color 0.3s, color 0.3s;
    }

    .btn-outline:hover {
      background-color: #e50914;
      color: #fff;
    }

    .btn-gradient {
      background: linear-gradient(90deg, #e50914, #ff6347);
      color: #fff;
      padding: 0.4rem 1rem;
      border-radius: 9999px;
      margin-left: 0.5rem;
      transition: opacity 0.3s;
    }

    .btn-gradient:hover {
      opacity: 0.85;
    }

.user-dropdown {
  position: relative;
  margin-left: 1.5rem;
}

.user-name-btn {
  all: unset;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #ffffff;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.user-name-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-name-btn::after {
  content: "▾";
  font-size: 0.75rem;
  color: #bbb;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: none;
  flex-direction: column;
  min-width: 160px;
  z-index: 1000;
  overflow: hidden;
}

.dropdown-menu a {
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #ffffff;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
/*  background-color: #2c2c2c;*/
  color: #e50914;
}

.dropdown-menu.show {
  display: flex;
}

    /* ==== メインエリア ==== */
    main {
      padding-left: 220px; /* サイドバー幅と合わせる */
    }

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* 常に16:9を維持 */
  overflow: hidden;
  display: flex;
  align-items: flex-end; /* 下寄せ */
  justify-content: center;
}

/*
.hero.screenshot {
  aspect-ratio: auto;
  height: 50vh;
}
*/


.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position:top;
}

.overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60%; /* 下から60%をグラデーションに */
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  text-align: center;
  color: #fff;
  max-width: 800px;
}

.hero-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.hero-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid #fff;
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s;
}

.hero-btn:hover {
  background: rgba(255,255,255,0.3);
}

/*
    .hero h2 {
      font-size: 2.5rem;
      color: #fff;
      background-color: rgba(0, 0, 0, 0.6);
      padding: 1rem 2rem;
      border-radius: 0.5rem;
    }
*/

    .main-content {
      padding: 2rem;
    }

    .section-title {
      margin: 2rem 0;
      font-size: 1.5rem;
      border-left: 4px solid #e50914;
      padding-left:1rem;
    }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px)); /* 最大幅を制限 */
  justify-content: left; /* 1枚でも中央寄せ */
  gap: 1rem;
}


    .video-card {
      background-color: #1e1e1e;
      border-radius: 0.5rem;
      overflow: hidden;
      transition: transform 0.2s;
    }

    .video-card:hover {
      transform: scale(1.02);
    }

.video-thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* 常に16:9を維持 */
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover; /* はみ出した分はトリミング */
  display: block;
}

    .video-info {
      padding: 0.75rem;
    }

    .video-info h3 {
      font-size: 1rem;
      margin: 0 0 0.25rem;
    }

    .video-info p {
      font-size: 0.875rem;
      color: #aaa;
      margin: 0;
    }

    footer {
      background-color: #1e1e1e;
      text-align: center;
      padding: 1rem;
      font-size: 0.875rem;
      color: #666;
    }

/* ==== ハンバーガーボタン ==== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* 初期状態は非表示 */
.mobile-auth-links {
  display: none;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
}


/* ==== スマホ用 ==== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -80%; /* 初期は隠す */
    width: 80%;
    height: 100vh;
    background-color: #1a1a1a;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .sidebar.open {
    left: 0;
  }

  main {
    padding-left: 0; /* サイドバー分を削除 */
  }

  .menu-toggle {
    display: block;
  }

  .header-right {
    gap: 0.5rem;
  }

  /* 右上ボタンを非表示 */
  .header-right a {
    display: none !important;
  }

  .mobile-auth-links {
    display: flex;
  }

  .mobile-auth-links .btn-outline,
  .mobile-auth-links .btn-gradient {
    font-size: 14px;       /* 少し大きめでタップしやすく */
    padding: 0.5rem 0.8rem; /* 上下は狭め、左右は少し余裕 */
    margin-left: 0;         /* 左右マージンは不要 */
    border-radius: 8px;     /* 丸すぎず自然に */
    white-space: nowrap;     /* 改行させない */
    text-align: center;      /* 中央揃え */
  }

  /* ボタンの間隔は gap で制御 */
  .mobile-auth-links {
    gap: 0.5rem;
  }
}


/* スライド時のオーバーレイ背景 */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

.sidebar-overlay.show {
  display: block;
}