  .navbar {
    background-color: #343a40;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
  }
  .navbar-brand {
    color: white;
    text-decoration: none;
    font-size: 1.4em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .navbar-brand:hover {
    color: #f8f9fa;
  }
  .navbar-nav {
    display: flex;
    align-items: center;
    gap: 15px; /* 20pxから15pxに縮小 */
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap; /* 折り返さない */
  }

  .nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 6px 12px; /* パディングを縮小 */
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px; /* アイコンとテキストの間隔を縮小 */
    font-size: 0.9em; /* フォントサイズを少し小さく */
    white-space: nowrap; /* テキストを折り返さない */
  }
  .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
  }
  .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
  }
  .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
  }
  .user-email {
    display: none;
  }
  .btn-nav {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9em;
  }
  .btn-login {
    background-color: #007bff;
    color: white;
  }
  .btn-login:hover {
    background-color: #0056b3;
  }
  .btn-logout {
    background-color: #6c757d;
    color: white;
  }
  .btn-logout:hover {
    background-color: #545b62;
  }
  .btn-account {
    background-color: #28a745;
    color: white;
  }
  .btn-account:hover {
    background-color: #218838;
  }
  .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
  }
  @media (max-width: 768px) {
    .navbar-container {
      flex-wrap: wrap;
    }
    .navbar-nav {
      display: none;
      width: 100%;
      flex-direction: column;
      gap: 10px;
      padding-top: 15px;
    }
    .navbar-nav.show {
      display: flex;
    }
    .mobile-menu-toggle {
      display: block;
    }
    .user-email {
      display: none !important;
    }
  }
  @media (min-width: 1200px) {
    .navbar-container {
      max-width: 1400px; /* 幅を広げる */
    }
  }

  /* 中画面用の調整 */
  @media (max-width: 1199px) and (min-width: 992px) {
    .nav-link {
      padding: 5px 8px;
      font-size: 0.85em;
    }
    .navbar-nav {
      gap: 10px;
    }
    /* アイコンを非表示にして省スペース化 */
    .nav-link span:first-child {
      display: none;
    }
  }

  /* タブレット用 */
  @media (max-width: 991px) and (min-width: 769px) {
    .navbar-nav {
      gap: 8px;
    }
    .nav-link {
      padding: 5px 8px;
      font-size: 0.8em;
    }
    .nav-link span:first-child {
      display: none;
    }
    .user-email {
      display: none !important;
    }
  }
  /* Button Styles matching navbar.html usage */
  .btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none;
    cursor: pointer;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
  }

  .btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
  }

  .btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
  }

  .btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
  }

  .btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
  }

  .btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
  }

  .btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
  }

  /* Toggle Switch for Platform Selection */
  .platform-toggle {
    display: inline-flex;
    position: relative;
    background-color: #e9ecef;
    border-radius: 30px;
    padding: 3px; /* Reduced padding */
    user-select: none;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    min-width: 140px; /* Reduced width */
    margin-bottom: 15px; /* Ensure spacing below */
  }

  /* Hide radio inputs */
  .platform-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  /* Labels sit on top */
  .platform-toggle label {
    flex: 1;
    text-align: center;
    z-index: 2;
    cursor: pointer;
    padding: 6px 12px; /* Reduced padding */
    font-size: 0.9em; /* Slightly smaller font */
    font-weight: 600;
    transition: color 0.3s ease;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
  }

  /* The sliding background element */
  .toggle-shape {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    z-index: 1;
    transition: background-color 0.3s ease;
  }

  /* The white pill slider */
  .toggle-shape::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px); /* Half width minus padding */
    background-color: white;
    border-radius: 25px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }

  /* --- Logic for Twitch (First Option) --- */
  /* When Twitch is checked */
  .platform-toggle input[value="twitch"]:checked ~ .toggle-shape {
    background-color: #9146ff; /* Twitch Purple */
  }
  
  .platform-toggle input[value="twitch"]:checked ~ .toggle-shape::before {
    transform: translateX(0);
  }

  /* Text colors when Twitch is checked */
  .platform-toggle input[value="twitch"]:checked ~ label[for="platform-twitch"] {
    color: #9146ff;
  }
  .platform-toggle input[value="twitch"]:checked ~ label[for="platform-youtube"] {
    color: white;
  }

  /* --- Logic for YouTube (Second Option) --- */
  /* When YouTube is checked */
  .platform-toggle input[value="youtube"]:checked ~ .toggle-shape {
    background-color: #ff0000; /* YouTube Red */
  }

  .platform-toggle input[value="youtube"]:checked ~ .toggle-shape::before {
    transform: translateX(100%); /* Move to the right */
  }

  /* Text colors when YouTube is checked */
  .platform-toggle input[value="youtube"]:checked ~ label[for="platform-youtube"] {
    color: #ff0000;
  }
  .platform-toggle input[value="youtube"]:checked ~ label[for="platform-twitch"] {
    color: white;
  }
  
  /* Hover effects */
  .platform-toggle label:hover {
    opacity: 0.8;
  }
