/*{
    -webkit-appearance: none;
    -webkit-text-size-adjust: 100%;
}*/

html {
  background-color: #f4f4f7;
  font-size: 15px;
  color: black;
  font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "メイリオ",
    "Meiryo", sans-serif;
}

button {
  font-size: 15px;
}

a {
  color: black;
  text-decoration: none;
  display: block;
}

a:hover,
label:hover {
  background-color: lightgray;
}

.toggle-switch:hover {
  background-color: transparent;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (min-width: 1030px) {
  h1 {
    text-align: center;
    font-size: 22px;
    line-height: 45px;
  }

  #select_app {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 75%;
    text-align: center;
    padding: 10px;
    margin: 10px auto;
  }

  .app_container {
    margin: 15px;
  }

  .app_name {
    background-color: white;
    height: 125px;
    width: 125px;
    /*border: 1px solid lightgray;*/
    line-height: 125px;
    border-radius: 50px;
  }

  .app_name:hover {
    box-shadow: 2px 2px 5px dimgray;
  }

  .app_name a {
    border-radius: 48px;
  }

  #menu-container {
    position: absolute;
    z-index: 2;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    left: -280px;
    -webkit-transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #menu-container.show {
    left: 0;
  }

  #menu-cover {
    position: absolute;
    width: 100%;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #menu-cover.active {
    z-index: 1;
    height: 100%;
    opacity: 0.5;
  }

  .active {
    z-index: 1;
    height: 100%;
  }

  .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .menu-logo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
  }

  .menu-close-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
  }

  .menu-close-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  #menu-contents {
    padding: 12px 0;
  }

  .menu {
    margin: 4px 12px;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
  }

  .menu:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    box-sizing: border-box;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 10px;
  }

  .menu a:hover {
    color: #fff;
    background-color: transparent;
  }

  .menu-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    opacity: 0.8;
  }

  .menu-icon-svg svg {
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .menu-text {
    flex: 1;
  }

  .menu-active {
    background: rgba(255, 255, 255, 0.12);
    position: relative;
  }

  .menu-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #64b5f6;
    border-radius: 0 3px 3px 0;
  }

  .menu-active a {
    color: #fff;
  }

  .menu-active .menu-icon-svg {
    opacity: 1;
    color: #64b5f6;
  }

  .menu-active .menu-icon-svg svg {
    stroke: #64b5f6;
  }

  .menu-logout {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    margin-left: 12px;
    margin-right: 12px;
    border-radius: 0 0 10px 10px;
  }

  .menu-logout a {
    color: rgba(255, 120, 120, 0.9);
  }

  .menu-logout:hover {
    background: rgba(255, 100, 100, 0.1);
  }

  .menu-logout a:hover {
    color: #ff6b6b;
  }

  #live-header {
    display: flex;
    justify-content: space-between;
    margin: 0;
  }

  .menu-icon {
    position: relative;
    width: 125px;
    margin: 13px 10px;
    height: 19px;
    box-sizing: border-box;
    cursor: pointer;
  }

  .menu-icon div {
    position: absolute;
    left: 0;
    height: 2px;
    width: 25px;
    background-color: #444444;
    border-radius: 2px;
    display: inline-block;
    box-sizing: border-box;
    transition: all 0.3s ease;
  }

  .menu-icon div:nth-of-type(1) {
    top: 0;
  }

  .menu-icon div:nth-of-type(2) {
    top: 8px;
  }

  .menu-icon div:nth-of-type(3) {
    bottom: 0;
  }

  /* Host Badge in Header */
  .header-title-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .header-host-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    background: #d0d0d0;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    height:25px
  }

  .header-host-badge svg {
    flex-shrink: 0;
  }

  .profile-container {
    display: flex;
    flex-direction: row;
    width: 150px;
    justify-content: flex-end;
  }

  .member-icon {
    display: flex;
    align-items: center;
    margin-right: 5px;
  }

  .login-link {
    color: black;
    cursor: pointer;
    text-decoration: underline;
    font-size: 16px;
    font-weight: normal;
    height: 45px;
  }

  .login-link:hover {
    background-color: #f4f4f7;
    color: gray;
  }

  .mypage-link {
    color: black;
    font-size: 15px;
    font-weight: normal;
    height: 45px;
  }

  #contents-container {
    width: 1200px;
    margin: 0 auto;
    display: flex;
  }

  #contents-container-right {
    width: 400px;
    margin: 0 7px;
    background: #f4f4f7;
    border-radius: 16px;
    padding-bottom: 4px;
  }

  #space {
    height: 55px;
  }

  #file-list-container {
    width: 600px;
    margin: 0 auto;
  }

  #live-title {
    font-size: 19px;
    height: 40px;
    display: flex;
    justify-content: space-between;
    margin: 0 5px;
  }

  #live-title p {
    margin: 5px 10px;
    line-height: 35px;
  }

  #live-title p:nth-child(2) {
    text-align: center;
  }

  #live-title p:nth-child(3) {
    text-align: right;
  }

  .channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .channel-name {
    font-weight: 600;
    margin-top:5px;
  }

  .host-info {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    margin-top:5px;
  }

  .host-icon {
    width: 16px;
    height: 16px;
    color: #888;
  }

  .host-name {
    color: #666;
  }

  #live-action {
    height: 39px;
  }

  #leave-live,
  #end-screen-share,
  #ans-off,
  #unmute,
  #video-on {
    display: none;
  }

  #send-message {
    display: none;
    margin: 10px;
  }

  .message-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 4px 4px 14px;
    background: #f5f5f7;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }

  .message-input-wrapper:focus-within {
    background: #fff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  #message-content {
    flex: 1;
    height: 26px;
    font-size: 14px;
    border: none;
    background: transparent;
    outline: none;
    color: #333;
  }

  #message-content::placeholder {
    color: #999;
  }

  #message-submit {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #4b4b4b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  #message-submit:hover {
    background: #333;
    transform: scale(1.05);
  }

  #message-submit:active {
    transform: scale(0.95);
  }

  #message-submit svg {
    width: 15px;
    height: 15px;
    color: #fff;
    margin-left: -1px;
  }

  #channel-message {
    margin: 10px 15px;
    color: dimgray;
  }

  #channel-message-sp {
    display: none;
  }

  .channel-message-link {
    display: inline;
    text-decoration: underline;
  }

  #message-container {
    font-size: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    padding: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    box-sizing: border-box;
  }

  #message-container::-webkit-scrollbar {
    display: none;
  }

  #member-container {
    font-size: 14px;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    padding: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    box-sizing: border-box;
  }

  #member-container::-webkit-scrollbar {
    display: none;
  }

  #member-list p {
    margin: 5px;
  }

  #message-list p {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
  }

  #message-list p div:nth-of-type(1) {
    width: 75px;
    margin: 0 0 0 5px;
    word-break: break-all;
  }

  #message-list p div:nth-of-type(2) {
    width: calc(100% - 140px);
    margin: 0 0 0 5px;
  }

  #message-list p div:nth-of-type(3) {
    width: 55px;
    text-align: right;
    margin: 0 5px 0 0;
    color: dimgrey;
    font-size: 12px;
    line-height: 21px;
  }

  #message-member-title {
    width: calc(100% - 24px);
    margin: 0px 12px 0 12px;
    display: flex;
    justify-content: flex-start;
    background: #e8e8ec;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    position: relative;
  }

  #message-member-title div {
    width: calc(50% - 2px);
    text-align: center;
    height: 28px;
    line-height: 28px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    position: relative;
    z-index: 1;
  }

  #message-member-title div:hover {
    color: #333;
  }

  #message-member-title div.active {
    background: white;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  #live-menu-container {
    margin: 10px 10px 10px 10px;
    height: 50px;
  }

  #live-menu {
    justify-content: space-between;
    display: none;
    align-items: center;
  }

  #live-menu-audience {
    display: none;
  }

  .quality-selector {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .quality-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
  }

  .quality-options {
    display: flex;
    background: #f0f0f3;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
  }

  .quality-options input[type="radio"] {
    display: none;
  }

  .quality-options label {
    display: block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
  }

  .quality-options label:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
  }

  .quality-options input[type="radio"]:checked + label {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  #live-menu button {
    width: auto;
    height: auto;
  }

  /* 新しい配信ボタンスタイル */
  .broadcast-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 24px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .broadcast-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
  }

  .broadcast-btn span {
    line-height: 18px;
    vertical-align: middle;
  }

  .broadcast-btn.start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
  }

  .broadcast-btn.start:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }

  .broadcast-btn.start:active {
    transform: translateY(0);
  }

  .broadcast-btn.stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
  }

  .broadcast-btn.stop:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  }

  .broadcast-btn.stop:active {
    transform: translateY(0);
  }

  #broadcast-loading {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f0f0f3;
    border-radius: 24px;
    color: #666;
    font-size: 14px;
  }

  .loading-spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e5e5;
    border-top: 2px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  .video-player {
    margin: 10px auto;
    width: 800px;
    height: 450px;
    border-radius: 5px;
    background-color: white;
    position: relative;
  }

  video {
    border-radius: 5px;
  }

  /* ライブ視聴画面: 全画面ボタンのみ表示 */
  .live-audience video::-webkit-media-controls-play-button,
  .live-audience video::-webkit-media-controls-timeline,
  .live-audience video::-webkit-media-controls-current-time-display,
  .live-audience video::-webkit-media-controls-time-remaining-display,
  .live-audience video::-webkit-media-controls-mute-button,
  .live-audience video::-webkit-media-controls-volume-slider,
  .live-audience video::-webkit-media-controls-volume-control-container,
  .live-audience video::-webkit-media-controls-seek-back-button,
  .live-audience video::-webkit-media-controls-seek-forward-button,
  .live-audience video::-webkit-media-controls-rewind-button,
  .live-audience video::-webkit-media-controls-return-to-realtime-button,
  .live-audience video::-webkit-media-controls-toggle-closed-captions-button,
  .live-audience video::-webkit-media-controls-picture-in-picture-button,
  .live-audience video::-webkit-media-controls-overflow-button {
    display: none !important;
  }

  div[id^="agora-video-player"] {
    border-radius: 5px;
  }

  #start-menu-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  #start-menu-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -30px;
    width: 380px;
    padding: 10px 30px 10px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  }

  .start-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .start-menu:last-of-type {
    border-bottom: none;
  }

  .start-menu .menu-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
  }

  /* Toggle Switch */
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
  }

  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
  }

  .toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
  }

  .toggle-switch input:checked + .toggle-slider {
    background-color: #5c6bc0;
  }

  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
  }

  /* Radio Group */
  .radio-group {
    display: flex;
    gap: 4px;
    background: #f4f4f7;
    padding: 3px;
    border-radius: 8px;
  }

  .radio-group input {
    display: none;
  }

  .radio-group label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
  }

  .radio-group label:hover {
    background: #e8e8eb;
  }

  .radio-group input:checked + label {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 500;
  }

  /* Select */
  .start-menu-select select {
    height: 32px;
    padding: 4px 10px;
    border-radius: 6px;
    background-color: #f4f4f7;
    border: 1px solid #ddd;
    font-size: 13px;
    min-width: 160px;
    cursor: pointer;
    transition: border-color 0.2s;
  }

  .start-menu-select select:hover {
    border-color: #5c6bc0;
  }

  .start-menu-select select:focus {
    outline: none;
    border-color: #5c6bc0;
  }

  .config-container input {
    display: none;
  }

  .config-container label {
    display: block;
    padding: 2px 5px;
    width: 95px;
    height: 29px;
    line-height: 25px;
    text-align: center;
    box-sizing: border-box;
  }

  .config-container {
    position: absolute;
    z-index: 1;
    font-size: 14px;
    display: none;
    border-radius: 10px;
    background-color: #ebebeb;
  }

  .config-container label.hovered {
    background-color: lightgray;
  }

  .config-container input:checked + label {
    background-color: lightgray;
  }

  #prepare-live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    padding: 12px 28px;
    background-color: #5c6bc0;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
  }

  #prepare-live:hover {
    background-color: #3f51b5;
    transform: translateX(-50%) translateY(-1px);
  }

  #prepare-live:active {
    transform: translateX(-50%) translateY(0);
  }

  #prepare-live .btn-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
  }

  #start-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: fit-content;
    padding: 14px 32px;
    height: fit-content;
    margin: auto;
    border-radius: 8px;
    color: white;
    background-color: #5c6bc0;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
  }

  #start-view:hover {
    background-color: #3f51b5;
    transform: translateY(-1px);
  }

  #start-view:active {
    transform: translateY(0);
  }

  #start-view .play-icon {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid white;
  }

  #loading-container,
  #camera-loading-container,
  #end-loading-container {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: 120px;
    height: 100px;
    text-align: center;
  }

  .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3da6ff;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
  }

  .loading-text {
    color: #666;
    font-size: 14px;
  }

  #live-end-message,
  #live-wait-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    margin: auto;
    border-radius: 30px;
  }

  #message-member-container {
    display: flex;
    justify-content: space-between;
    background-color: white;
    width: calc(100% - 20px);
    height: 638px;
    margin: 8px 12px 12px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
  }

  .file-container {
    height: 153px;
    background-color: white;
    margin: 15px auto;
    border-radius: 20px;
    position: relative;
  }

  .thumbnail {
    width: 272px;
    height: 153px;
  }

  .file-container a {
    display: flex;
    border-radius: 20px;
  }

  .live-info p {
    margin: 21px 30px;
  }

  .thumbnail img {
    border-radius: 20px 0 0 20px;
  }

  .archive-menu-container {
    position: absolute;
    top: 20px;
    right: 16px;
  }

  .archive-menu {
    display: none;
    width: 80px;
    text-align: center;
    height: 30px;
    line-height: 30px;
    border: 1px solid dimgrey;
    border-radius: 2px;
    margin: 5px 0 0 0;
    background-color: white;
  }

  .archive-menu:hover {
    background-color: lightgrey;
  }

  .menu-button {
    cursor: pointer;
    width: 30px;
    margin: 0 0 0 auto;
  }

  .menu-button:hover {
    color: lightgrey;
  }

  .menu-button div {
    height: 8px;
    line-height: 8px;
    padding: 0 0 0 7px;
  }

  .user-info {
    display: flex;
    border-bottom: lightgray 1px solid;
  }

  .user-info div {
    height: 60px;
    line-height: 30px;
    background-color: white;
    padding: 15px 20px;
    box-sizing: border-box;
  }

  #user-info-container {
    width: 800px;
    margin: 20px auto;
    box-shadow: 0 0 8px 5px lightgray;
  }

  .user-info div:nth-of-type(1) {
    width: 250px;
  }

  .user-info div:nth-of-type(2) {
    width: 450px;
  }

  .user-info div:nth-of-type(3) {
    width: 100px;
  }

  .user-info a:hover {
    color: dimgrey;
    background-color: white;
  }

  /* ===== Signup Page Modern Styles ===== */
  .signup-page {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 40px 20px;
    box-sizing: border-box;
  }

  .signup-container {
    width: 100%;
    max-width: 560px;
  }

  .signup-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 56px 52px;
  }

  .signup-header {
    text-align: center;
    margin-bottom: 40px;
  }

  .signup-logo {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
  }

  .signup-subtitle {
    font-size: 15px;
    color: #666666;
    margin: 0;
    font-weight: 400;
  }

  .signup-form-modern {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
  }

  .form-group {
    margin-bottom: 24px;
  }

  .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
  }

  .form-group.half {
    flex: 1;
    margin-bottom: 0;
  }

  .signup-form-modern label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
  }

  .signup-form-modern label:hover {
    background-color: transparent;
  }

  .signup-form-modern input[type="text"],
  .signup-form-modern input[type="email"],
  .signup-form-modern input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    color: #1a1a1a;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
  }

  .signup-form-modern input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
  }

  .signup-form-modern input::placeholder {
    color: #999999;
  }

  .signup-form-modern .help-text {
    display: block;
    font-size: 12px;
    color: #888888;
    margin-top: 8px;
    line-height: 1.5;
    padding: 0;
  }

  .signup-form-modern .error-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
  }

  .signup-form-modern .error-list li {
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 4px;
  }

  .signup-btn {
    width: 100%;
    height: 52px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .signup-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .signup-btn:active {
    transform: translateY(0);
  }

  .signup-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
  }

  .signup-btn:disabled:hover {
    transform: none;
    box-shadow: none;
  }

  .signup-btn .btn-text {
    transition: opacity 0.2s ease;
  }

  .signup-btn .btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
  }

  .signup-btn.loading .btn-text {
    opacity: 0;
  }

  .signup-btn.loading .btn-loader {
    opacity: 1;
  }

  .signup-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eeeeee;
  }

  .signup-footer p {
    font-size: 14px;
    color: #666666;
    margin: 0;
  }

  .signup-footer a {
    display: inline;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .signup-footer a:hover {
    color: #666666;
    background: transparent;
    text-decoration: underline;
  }

  /* ===== Login Page Modern Styles ===== */
  .login-page {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 40px 20px;
    box-sizing: border-box;
  }

  .login-container {
    width: 100%;
    max-width: 440px;
  }

  .login-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 56px 52px;
  }

  .login-header {
    text-align: center;
    margin-bottom: 40px;
  }

  .login-logo {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
  }

  .login-subtitle {
    font-size: 15px;
    color: #666666;
    margin: 0;
    font-weight: 400;
  }

  .login-form-modern {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    text-align: left;
  }

  .login-form-modern .form-group {
    margin-bottom: 24px;
  }

  .login-form-modern label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
  }

  .login-form-modern label:hover {
    background-color: transparent;
  }

  .login-form-modern input[type="text"],
  .login-form-modern input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    color: #1a1a1a;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: normal;
  }

  .login-form-modern input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
  }

  .login-form-modern input::placeholder {
    color: #999999;
  }

  .login-form-modern .error-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
  }

  .login-form-modern .error-list li {
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 4px;
  }

  .form-errors {
    background: #fff5f5;
    border: 1px solid #ffebeb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
  }

  .form-errors .error-message {
    font-size: 13px;
    color: #dc3545;
    margin: 0;
  }

  .login-btn {
    width: 100%;
    height: 52px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .login-btn:active {
    transform: translateY(0);
  }

  .login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
  }

  .login-btn:disabled:hover {
    transform: none;
    box-shadow: none;
  }

  .login-btn .btn-text {
    transition: opacity 0.2s ease;
  }

  .login-btn .btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
  }

  .login-btn.loading .btn-text {
    opacity: 0;
  }

  .login-btn.loading .btn-loader {
    opacity: 1;
  }

  .login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eeeeee;
  }

  .login-footer p {
    font-size: 14px;
    color: #666666;
    margin: 0;
  }

  .login-footer a {
    display: inline;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .login-footer a:hover {
    color: #666666;
    background: transparent;
    text-decoration: underline;
  }

  /* ===== Logout Page Modern Styles ===== */
  .logout-page {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 40px 20px;
    box-sizing: border-box;
  }

  .logout-container {
    width: 100%;
    max-width: 400px;
  }

  .logout-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 56px 48px;
    text-align: center;
  }

  .logout-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
  }

  .logout-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
  }

  .logout-message {
    font-size: 15px;
    color: #666666;
    margin: 0 0 32px 0;
  }

  .logout-btn {
    display: inline-block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    text-decoration: none;
    box-sizing: border-box;
  }

  .logout-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff;
  }

  .logout-btn:active {
    transform: translateY(0);
  }

  /* Legacy signup form styles (kept for backward compatibility) */
  #signup-form:not(.signup-form-modern) {
    width: 640px;
    border: 1px solid #444444;
    padding: 21px;
    margin: 0 auto;
  }

  #signup-form:not(.signup-form-modern) span {
    font-size: 13px;
    color: gray;
    display: block;
    padding: 7px 20px;
  }

  #signup-form:not(.signup-form-modern) ul {
    font-size: 13px;
    color: gray;
    display: block;
    padding: 0 20px 7px 20px;
    margin: -17px 10px 0 10px;
    list-style: none;
  }

  #signup-form:not(.signup-form-modern) label {
    display: inline-block;
    width: 200px;
  }

  #signup-form:not(.signup-form-modern) label:hover {
    background-color: #ebebeb;
  }

  #signup-form:not(.signup-form-modern) p {
    margin: 10px;
  }

  #signup-form:not(.signup-form-modern) input {
    height: 20px;
    font-size: 15px;
  }

  #button-container {
    text-align: center;
    padding: 10px 0 0 0;
  }

  #id_email {
    width: 325px;
  }

  #ch-list {
    width: 600px;
    margin: 0 auto;
  }

  #ch-select-message {
    text-align: center;
    margin: 15px 0;
    display: flex;
    justify-content: space-around;
    height: 30px;
    line-height: 30px;
  }

  #add-ch,
  #register-ch {
    background-color: white;
    border-radius: 15px;
    font-size: 14px;
    height: 30px;
    line-height: 30px;
    padding: 0 15px;
    box-sizing: border-box;
    cursor: pointer;
  }

  .ch-container {
    width: 100%;
    height: 80px;
    margin: 3px 0;
    border-radius: 10px;
    background-color: white;
  }

  .ch-container a {
    display: flex;
    height: 100%;
    border-radius: 10px;
  }

  .ch-info-left,
  .ch-info-right {
    width: 50%;
  }

  .ch-info-elem {
    height: 50%;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    box-sizing: border-box;
  }

  .ch-name {
    font-size: 16px;
  }

  .ch-host {
    color: gray;
    font-size: 13px;
    margin: 0 15px;
  }

  #make-ch-container {
    width: 600px;
    margin: 0 auto;
    text-align: center;
  }

  #ch-ctrl {
    width: 800px;
    margin: 10px auto;
  }

  #ch-title {
    border-bottom: black 1px solid;
    font-size: 17px;
    height: 30px;
    text-align: center;
    display: flex;
    justify-content: space-between;
  }

  #ch-menu-container {
    display: flex;
    justify-content: space-between;
  }

  .ch-contents {
    padding: 15px 5px;
  }

  .ch-menu {
    width: 25%;
    height: 35px;
    line-height: 35px;
    text-align: center;
    box-sizing: border-box;
    margin: 0 15px;
  }

  .ch-menu.selected-menu,
  .ch-menu:hover {
    border-bottom: dimgray 2px solid;
  }

  .invite-ways,
  .member-container,
  .settings-container {
    padding: 5px 20px;
    margin: 10px 0;
    background-color: white;
    border-radius: 10px;
  }

  .invite-ways div {
    margin: 10px 0;
    height: 25px;
    line-height: 25px;
  }

  .invite-ways-info {
    font-size: 16px;
  }

  .invite-ways-messsage {
    font-size: 14px;
    color: dimgray;
  }

  .copy-button {
    box-sizing: border-box;
    display: inline-block;
    border: black 1px solid;
    font-size: 14px;
    border-radius: 3px;
    height: 25px;
    margin: 0 10px;
    padding: 0 5px;
    cursor: pointer;
  }

  .copy-button:hover {
    background-color: lightgray;
  }

  .copy-success {
    display: none;
    color: dimgray;
  }

  #invite-mail {
    height: 25px;
    box-sizing: border-box;
    width: 550px;
    font-size: 14px;
  }

  #invite-message {
    resize: none;
    box-sizing: border-box;
    width: 550px;
    height: 100%;
    font-size: 14px;
  }

  .invite-form-title {
    display: inline-block;
  }

  .invite-form {
    display: flex;
    justify-content: space-between;
  }

  #invite-message-form {
    height: 100px;
  }

  #send-button {
    box-sizing: border-box;
    display: inline-block;
    border: black 1px solid;
    font-size: 14px;
    border-radius: 3px;
    width: 50px;
    height: 25px;
    line-height: 25px;
    padding: 0 10px;
    cursor: pointer;
  }

  #send-button:hover,
  #add-submit:hover {
    background-color: lightgray;
  }

  #invite-submit {
    display: flex;
    justify-content: center;
  }

  #register-ch-form,
  #add-ch-form {
    display: none;
    border: dimgray 1px solid;
    border-radius: 5px;
    padding: 10px 15px;
    margin: 10px 0;
    justify-content: space-between;
    flex-wrap: wrap;
    text-align: center;
  }

  #ch-id {
    box-sizing: border-box;
    height: 25px;
    font-size: 14px;
    width: 250px;
  }

  #registered-message {
    padding: 5px 15px;
    margin: 10px 0;
    text-align: center;
  }

  #add-submit {
    border-radius: 2px;
    border: dimgray 1px solid;
    padding: 0 10px;
    cursor: pointer;
    display: inline-block;
    height: 25px;
    box-sizing: border-box;
  }

  #ch-ctrl-link:hover {
    text-decoration: underline;
  }

  .ch-form-elem {
    margin: 10px;
    display: flex;
    justify-content: space-between;
  }

  .ch-form-elem label:hover {
    background-color: #f4f4f7;
  }

  #ch-description,
  #id_description {
    box-sizing: border-box;
    resize: none;
    width: 400px;
    height: 50px;
  }

  #ch-name,
  #id_name {
    box-sizing: border-box;
    width: 400px;
    height: 25px;
  }

  #video-controler {
    background-color: white;
    height: 220px;
    border-radius: 5px;
  }

  #contents-container-left {
    width: 800px;
  }

  #ch-type-form {
    width: 400px;
    display: flex;
    justify-content: space-around;
  }

  #live-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    margin: 8px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
  }

  .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .stat-icon {
    width: 16px;
    height: 16px;
    color: #666;
    flex-shrink: 0;
  }

  .stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .stat-row {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .stat-label {
    font-size: 10px;
    color: #888;
    width: 10px;
  }

  .network-condition {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
  }

  .network-condition div {
    width: 3px;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.2s ease;
  }

  .network-condition div:nth-of-type(1) { height: 2px; }
  .network-condition div:nth-of-type(2) { height: 4px; }
  .network-condition div:nth-of-type(3) { height: 6px; }
  .network-condition div:nth-of-type(4) { height: 8px; }
  .network-condition div:nth-of-type(5) { height: 10px; }
  .network-condition div:nth-of-type(6) { height: 12px; }

  .remote-network-condition {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 10px;
  }

  .remote-network-condition div {
    width: 2px;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.2s ease;
  }

  .remote-network-condition div:nth-of-type(1) { height: 2px; }
  .remote-network-condition div:nth-of-type(2) { height: 3px; }
  .remote-network-condition div:nth-of-type(3) { height: 5px; }
  .remote-network-condition div:nth-of-type(4) { height: 6px; }
  .remote-network-condition div:nth-of-type(5) { height: 8px; }
  .remote-network-condition div:nth-of-type(6) { height: 10px; }

  .audio-level-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
  }

  .audio-level-indicator div {
    width: 3px;
    height: 100%;
    background-color: #d0d0d0;
    border-radius: 2px;
    transition: background-color 0.1s ease, transform 0.1s ease;
  }

  .remote-audiolevel-container {
    display: flex;
    align-items: center;
    margin: 0 4px;
  }

  .remote-audio-level-indicator {
    display: flex;
    align-items: center;
    gap: 1px;
    height: 14px;
  }

  .remote-audio-level-indicator div {
    width: 2px;
    height: 100%;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.1s ease;
  }

  .video-resolution {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: -0.5px;
  }

  .remote-video-resolution-container {
    display: flex;
    align-items: center;
  }

  .remote-video-resolution {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  }

  .member {
    display: none;
    justify-content: space-between;
    height: 30px;
    margin: 10px;
    line-height: 30px;
  }

  .member-name {
    margin: auto 10px;
  }

  div img {
    vertical-align: middle;
  }

  .video-resolution {
    line-height: 28px;
    font-size: 14px;
    margin: auto 7px;
    color: #4b4b4b;
  }

  .remote-video-resolution {
    font-size: 12px;
    margin: auto 4px;
    color: #4b4b4b;
  }

  .live-menu-button {
    width: 95px;
    height: 60px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
    background-color: rgb(239, 239, 239);
  }

  /* 新しいメディアトグルボタン */
  .media-toggle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f3;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .media-toggle-btn:hover {
    background-color: #e4e4e7;
    transform: scale(1.05);
  }

  .media-toggle-btn svg {
    width: 22px;
    height: 22px;
    color: #444;
  }

  .media-toggle-btn.muted,
  .media-toggle-btn.video-off {
    background-color: #fee2e2;
  }

  .media-toggle-btn.muted:hover,
  .media-toggle-btn.video-off:hover {
    background-color: #fecaca;
  }

  .media-toggle-btn.muted svg,
  .media-toggle-btn.video-off svg {
    color: #dc2626;
  }

  .media-toggle-btn svg .slash {
    stroke: #dc2626;
    stroke-width: 2.5;
  }

  /* アクティブな機能（雑音除去ON、画面共有中）*/
  .media-toggle-btn.active-feature {
    background-color: #dbeafe;
  }

  .media-toggle-btn.active-feature:hover {
    background-color: #bfdbfe;
  }

  .media-toggle-btn.active-feature svg {
    color: #2563eb;
  }

  .media-toggle-btn.active-feature svg .slash {
    stroke: #dc2626;
  }

  /* 設定ドロップダウングループ */
  .config-dropdown-group {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  /* 設定ドロップダウンボタン */
  .config-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: #f0f0f3;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
  }

  .config-dropdown-btn:hover {
    background-color: #e4e4e7;
  }

  .config-dropdown-btn svg {
    width: 18px;
    height: 18px;
    color: #444;
    flex-shrink: 0;
  }

  .config-dropdown-btn .dropdown-arrow {
    width: 14px;
    height: 14px;
    color: #888;
  }

  .config-dropdown-btn .config-label {
    font-size: 13px;
    color: #444;
    font-weight: 500;
  }

  /* 設定ドロップダウンメニュー */
  .config-dropdown-menu {
    position: absolute;
    z-index: 10;
    display: none;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 120px;
    margin-top: 4px;
  }

  .config-dropdown-menu input {
    display: none;
  }

  .config-dropdown-menu label {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    transition: background-color 0.15s;
  }

  .config-dropdown-menu label:hover {
    background-color: #f4f4f7;
  }

  .config-dropdown-menu input:checked + label {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
  }

  #change-facing {
    display: none;
  }

  .live-menu-icon {
    height: 30px;
    line-height: 30px;
  }

  .live-menu-string {
    height: 30px;
    line-height: 30px;
    font-size: 13px;
  }

  .select-config {
    height: 30px;
  }

  .delay-container {
    display: flex;
    line-height: 29px;
  }

  .delay {
    font-size: 12px;
    color: #4b4b4b;
    margin: auto 2px;
  }

  .member-info {
    display: flex;
  }

  .member-liveinfo {
    display: flex;
  }

  .chMember {
    display: flex;
    justify-content: left;
    font-size: 15px;
    height: 30px;
    width: 380px;
    margin: 10px 0;
    line-height: 30px;
  }

  .ch-member-name {
    margin: auto 15px;
    font-size: 16px;
  }

  #start-end-live {
    display: flex;
    align-items: center;
  }

  .ch-member {
    display: flex;
    align-items: center;
    line-height: 24px;
    width: 50px;
    font-size: 14px;
    justify-content: space-between;
  }

  #message-member-title span {
    margin: auto 8px;
  }

  .ch-info-string {
    height: 20px;
  }

  .ch-info-icon {
    height: 23px;
  }

  .ch-type {
    height: 20px;
    line-height: 21px;
  }

  .settings-container form {
    width: 700px;
    margin: 0px auto;
  }

  .settings-container {
    display: flex;
    justify-content: left;
  }

  .edit-ch-form-elem {
    margin: 20px;
    display: flex;
    justify-content: left;
    align-items: center;
  }

  .edit-ch-form-elem label {
    width: 145px;
  }

  .edit-ch-form-elem label:hover {
    background-color: white;
  }

  .submit-button {
    margin: 10px;
    text-align: center;
  }

  #id_type {
    height: 25px;
  }

  #id_record,
  #id_notice {
    width: 15px;
    height: 15px;
    margin-left: 0px;
  }

  .ch-link {
    font-size: 14px;
    width: 100px;
    line-height: 30px;
  }

  .ch-link a:hover {
    background-color: initial;
    color: dimgray;
  }

  #select-ch {
    display: flex;
    margin: 10px 5px;
    width: calc(100% - 10px);
    height: 31px;
    overflow-x: scroll;
    white-space: nowrap;
  }

  #select-ch::-webkit-scrollbar {
    display: none;
  }

  .ch-name-button {
    border-radius: 20px;
    border: lightgray 1px solid;
    margin: 0 3px;
    padding: 3px 12px;
    background-color: white;
  }

  .ch-name-button.selected-ch,
  .ch-name-button:hover {
    background-color: lightgray;
  }

  .app-menu {
    margin: 10px auto;
  }
}

@media (max-width: 1030px) {
  body {
    margin: 0;
  }

  h1 {
    text-align: center;
    font-size: 19px;
    margin: 5px auto;
    line-height: 30px;
  }

  ::-webkit-scrollbar {
    display: none;
    -webkit-appearance: none;
  }

  #select_app {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    text-align: center;
    margin: 20px auto;
  }

  .app_container {
    margin: 15px;
    width: 120px;
  }

  .app_name {
    background-color: white;
    box-shadow: 2px 2px 4px lightgray;
    height: 110px;
    width: 110px;
    /*border: 1px solid lightgray;*/
    line-height: 110px;
    border-radius: 35px;
    margin: 0 auto;
  }

  .app_name a {
    border-radius: 35px;
  }

  #menu-container {
    position: absolute;
    z-index: 2;
    width: 75%;
    max-width: 300px;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    left: -100%;
    -webkit-transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #menu-container.show {
    left: 0;
  }

  #menu-cover {
    position: absolute;
    width: 100%;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #menu-cover.active {
    z-index: 1;
    height: 100%;
    opacity: 0.5;
  }

  .active {
    z-index: 1;
    height: 100%;
  }

  .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .menu-logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
  }

  .menu-close-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
  }

  .menu-close-icon:hover,
  .menu-close-icon:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  #menu-contents {
    padding: 10px 0;
  }

  .menu {
    margin: 3px 10px;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
  }

  .menu:hover,
  .menu:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 10px;
  }

  .menu a:hover,
  .menu a:active {
    color: #fff;
    background-color: transparent;
  }

  .menu-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    opacity: 0.8;
  }

  .menu-icon-svg svg {
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .menu-text {
    flex: 1;
  }

  .menu-active {
    background: rgba(255, 255, 255, 0.12);
    position: relative;
  }

  .menu-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #64b5f6;
    border-radius: 0 3px 3px 0;
  }

  .menu-active a {
    color: #fff;
  }

  .menu-active .menu-icon-svg {
    opacity: 1;
    color: #64b5f6;
  }

  .menu-active .menu-icon-svg svg {
    stroke: #64b5f6;
  }

  .menu-logout {
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 0 0 10px 10px;
  }

  .menu-logout a {
    color: rgba(255, 120, 120, 0.9);
  }

  .menu-logout:hover,
  .menu-logout:active {
    background: rgba(255, 100, 100, 0.1);
  }

  .menu-logout a:hover,
  .menu-logout a:active {
    color: #ff6b6b;
  }

  #live-header {
    display: flex;
    justify-content: space-between;
  }

  .menu-icon {
    position: relative;
    width: 60px;
    margin: 5px 10px;
    height: 19px;
    box-sizing: border-box;
  }

  .menu-icon div {
    position: absolute;
    left: 0;
    height: 2px;
    width: 25px;
    background-color: #444444;
    border-radius: 2px;
    display: inline-block;
    box-sizing: border-box;
    transition: all 0.3s ease;
  }

  .menu-icon div:nth-of-type(1) {
    top: 0;
  }

  .menu-icon div:nth-of-type(2) {
    top: 8px;
  }

  .menu-icon div:nth-of-type(3) {
    bottom: 0;
  }

  /* Host Badge in Header - Mobile */
  .header-title-with-badge {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .header-host-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0px 6px;
    background: #d0d0d0;
    font-size: 8px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    height: 23px;
  }

  .header-host-badge svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
  }

  .profile-container {
    display: flex;
    flex-direction: row;
    width: 75px;
    margin-right: 5px;
    justify-content: flex-end;
  }

  .member-icon {
    display: flex;
    align-items: center;
  }

  .login-link {
    color: black;
    cursor: pointer;
    text-decoration: underline;
    font-size: 15px;
    font-weight: normal;
    height: 30px;
  }

  .login-link:hover {
    background-color: #f4f4f7;
    color: gray;
  }

  .mypage-link {
    color: black;
    font-size: 15px;
    font-weight: normal;
    height: 30px;
    overflow: hidden;
  }

  #contents-container {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    background-color: #f4f4f7;
  }

  #contents-container-right {
    background: #f4f4f7;
  }

  #file-list-container {
    width: 100%;
  }

  #live-title {
    height: 30px;
    display: flex;
    justify-content: space-between;
    margin: 5px 15px;
  }

  #live-title p {
    margin: 0;
    line-height: 40px;
    height: 38px;
    overflow: hidden;
  }

  .channel-info {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .channel-name {
    font-weight: 600;
    font-size: 14px;
  }

  .host-info {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #666;
    font-size: 12px;
    font-weight: 400;
  }

  .host-icon {
    width: 14px;
    height: 14px;
    color: #888;
  }

  .host-name {
    color: #666;
  }

  #leave-live,
  #end-screen-share,
  #ans-off,
  #unmute,
  #video-on {
    display: none;
  }

  #send-message {
    display: none;
    margin: 8px;
  }

  .message-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 3px 3px 3px 12px;
    background: #f5f5f7;
    border-radius: 18px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }

  .message-input-wrapper:focus-within {
    background: #fff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  }

  #message-content {
    flex: 1;
    min-width: 0;
    height: 24px;
    font-size: 14px;
    border: none;
    background: transparent;
    outline: none;
    color: #333;
  }

  #message-content::placeholder {
    color: #999;
  }

  #message-submit {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #4b4b4b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
  }

  #message-submit:hover {
    background: #333;
  }

  #message-submit:active {
    transform: scale(0.92);
  }

  #message-submit svg {
    width: 14px;
    height: 14px;
    color: #fff;
    margin-left: 1px;
  }

  #channel-message {
    display: none;
  }

  #channel-message-sp {
    margin: 10px 15px;
    font-size: 13px;
    color: dimgray;
  }

  .channel-message-link {
    display: inline;
    text-decoration: underline;
  }

  #message-container {
    font-size: 13px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  #member-container {
    font-size: 13px;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  #member-list p {
    margin: 5px 0;
  }

  #message-list p {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
  }

  #message-list p div:nth-of-type(1) {
    width: 70px;
    margin: 0 0 0 5px;
    font-size: 13px;
    word-break: break-all;
  }

  #message-list p div:nth-of-type(2) {
    width: calc(100% - 140px);
    margin: 0 0 0 5px;
    font-size: 13px;
  }

  #message-list p div:nth-of-type(3) {
    width: 55px;
    text-align: right;
    margin: 0 5px 0 0;
    color: dimgrey;
    font-size: 12px;
    line-height: 21px;
  }

  #message-member-title {
    display: flex;
    justify-content: flex-start;
    margin: 8px 8px 0 8px;
    background: #e8e8ec;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    position: relative;
  }

  #message-member-title div {
    width: calc(50% - 2px);
    text-align: center;
    height: 28px;
    line-height: 28px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    position: relative;
    z-index: 1;
  }

  #message-member-title div:hover {
    color: #333;
  }

  #message-member-title div.active {
    background: white;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  #live-menu-container {
    margin: 5px 5px;
    height: 50px;
  }

  #live-menu {
    justify-content: space-between;
    margin: 5px 5px;
    display: none;
    align-items: center;
    height: 50px;
  }

  #live-menu-audience {
    display: none;
  }

  .quality-selector {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .quality-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
  }

  .quality-options {
    display: flex;
    background: #f0f0f3;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
  }

  .quality-options input[type="radio"] {
    display: none;
  }

  .quality-options label {
    display: block;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
  }

  .quality-options label:hover {
    color: #333;
  }

  .quality-options input[type="radio"]:checked + label {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }

  #live-menu button {
    width: auto;
    height: auto;
    -webkit-appearance: none;
  }

  /* 新しい配信ボタンスタイル（モバイル） */
  .broadcast-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .broadcast-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    vertical-align: middle;
  }

  .broadcast-btn span {
    line-height: 16px;
    vertical-align: middle;
  }

  .broadcast-btn.start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
  }

  .broadcast-btn.start:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
  }

  .broadcast-btn.stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
  }

  .broadcast-btn.stop:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  }

  #broadcast-loading {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #f0f0f3;
    border-radius: 20px;
    color: #666;
    font-size: 12px;
  }

  .loading-spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid #e5e5e5;
    border-top: 2px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  .sp-none {
    display: none;
  }

  .video-player {
    margin: 5px auto;
    height: calc(900vw / 16);
    position: relative;
    border-radius: 5px;
    background-color: white;
  }

  /* ライブ視聴画面: 全画面ボタンのみ表示 */
  .live-audience video::-webkit-media-controls-play-button,
  .live-audience video::-webkit-media-controls-timeline,
  .live-audience video::-webkit-media-controls-current-time-display,
  .live-audience video::-webkit-media-controls-time-remaining-display,
  .live-audience video::-webkit-media-controls-mute-button,
  .live-audience video::-webkit-media-controls-volume-slider,
  .live-audience video::-webkit-media-controls-volume-control-container,
  .live-audience video::-webkit-media-controls-seek-back-button,
  .live-audience video::-webkit-media-controls-seek-forward-button,
  .live-audience video::-webkit-media-controls-rewind-button,
  .live-audience video::-webkit-media-controls-return-to-realtime-button,
  .live-audience video::-webkit-media-controls-toggle-closed-captions-button,
  .live-audience video::-webkit-media-controls-picture-in-picture-button,
  .live-audience video::-webkit-media-controls-overflow-button {
    display: none !important;
  }

  #video {
    width: 100%;
    height: 100%;
  }

  #start-menu-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  #start-menu-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -25px;
    width: 300px;
    max-height: 60%;
    overflow-y: auto;
    padding: 0 16px 0 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  }

  .start-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  .start-menu:last-of-type {
    border-bottom: none;
  }

  .start-menu .menu-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
  }

  /* Toggle Switch - Mobile */
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
  }

  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
  }

  .toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
  }

  .toggle-switch input:checked + .toggle-slider {
    background-color: #5c6bc0;
  }

  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
  }

  /* Radio Group - Mobile */
  .radio-group {
    display: flex;
    gap: 3px;
    background: #f4f4f7;
    padding: 2px;
    border-radius: 6px;
  }

  .radio-group input {
    display: none;
  }

  .radio-group label {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
  }

  .radio-group label:hover {
    background: #e8e8eb;
  }

  .radio-group input:checked + label {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 500;
  }

  /* Select - Mobile */
  #select-camera,
  #select-microphone {
    display: none;
  }

  .start-menu-select select {
    height: 30px;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: #f4f4f7;
    border: 1px solid #ddd;
    font-size: 12px;
    min-width: 140px;
    cursor: pointer;
    transition: border-color 0.2s;
  }

  .start-menu-select select:hover {
    border-color: #5c6bc0;
  }

  .start-menu-select select:focus {
    outline: none;
    border-color: #5c6bc0;
  }

  .config-container input {
    display: none;
  }

  .config-container label {
    display: block;
    padding: 2px 5px;
    width: 90px;
    height: 30px;
    line-height: 25px;
    text-align: center;
    box-sizing: border-box;
  }

  .config-container {
    position: absolute;
    z-index: 1;
    font-size: 14px;
    display: none;
    border-radius: 10px;
    background-color: #ebebeb;
  }

  .config-container input:checked + label {
    background-color: lightgray;
  }

  #prepare-live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 10px 24px;
    background-color: #5c6bc0;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.2s;
  }

  #prepare-live:hover {
    background-color: #3f51b5;
    transform: translateX(-50%) translateY(-1px);
  }

  #prepare-live:active {
    transform: translateX(-50%) translateY(0);
  }

  #prepare-live .btn-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
  }

  #start-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: fit-content;
    padding: 12px 28px;
    height: fit-content;
    margin: auto;
    border-radius: 8px;
    color: white;
    background-color: #5c6bc0;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
  }

  #start-view:hover {
    background-color: #3f51b5;
    transform: translateY(-1px);
  }

  #start-view:active {
    transform: translateY(0);
  }

  #start-view .play-icon {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid white;
  }

  #loading-container,
  #camera-loading-container,
  #end-loading-container {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: 120px;
    height: 100px;
    text-align: center;
  }

  .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3da6ff;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
  }

  .loading-text {
    color: #666;
    font-size: 14px;
  }

  #live-end-message,
  #live-wait-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    margin: auto;
    border-radius: 30px;
  }

  #message-member-container {
    display: flex;
    justify-content: space-between;
    margin: 8px 8px 8px 8px;
    background-color: white;
    height: calc(100vh - (900vw / 16) - 120px);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
  }

  .file-container {
    height: calc(405vw / 16);
    background-color: white;
    margin: 7px auto;
    position: relative;
    border-radius: 15px;
  }

  .thumbnail {
    width: 45%;
    height: calc(405vw / 16);
  }

  .thumbnail img {
    width: 100%;
    height: 100%;
    border-radius: 15px 0 0 15px;
  }

  .archive-menu-container {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .archive-menu {
    display: none;
    width: 80px;
    text-align: center;
    height: 30px;
    line-height: 30px;
    border: 1px solid dimgrey;
    border-radius: 2px;
    margin: 5px 0 0 0;
    background-color: white;
  }

  .archive-menu:hover {
    background-color: lightgrey;
  }

  .menu-button {
    cursor: pointer;
    width: 30px;
    margin: 0 0 0 auto;
  }

  .menu-button:hover {
    color: lightgrey;
  }

  .menu-button div {
    height: 7px;
    line-height: 7px;
    padding: 0 0 0 7px;
  }

  .file-container a {
    display: flex;
    border-radius: 15px;
  }

  .live-info {
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
    width: 55%;
  }

  .live-info p {
    padding: 0 25px;
    margin: 0;
    overflow: hidden;
    height: 23px;
    font-size: 13px;
    line-height: 23px;
  }

  #start-screen-share {
    display: none;
  }

  .user-info {
    display: flex;
    border-bottom: lightgray 1px solid;
  }

  .user-info div {
    height: 50px;
    line-height: 30px;
    background-color: white;
    padding: 10px 0 10px 15px;
    box-sizing: border-box;
  }

  #user-info-container {
    width: 100%;
    margin: 20px auto;
    box-shadow: 0 0 8px 5px lightgray;
    font-size: 14px;
  }

  .user-info div:nth-of-type(1) {
    width: 40%;
  }

  .user-info div:nth-of-type(2) {
    width: 60%;
  }

  .user-info div:nth-of-type(3) {
    width: 25%;
    display: none;
  }

  /* ===== Signup Page Mobile Styles ===== */
  .signup-page {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 20px 16px;
    box-sizing: border-box;
  }

  .signup-container {
    width: 100%;
    max-width: 100%;
  }

  .signup-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 32px 24px;
  }

  .signup-header {
    text-align: center;
    margin-bottom: 32px;
  }

  .signup-logo {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
  }

  .signup-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 0;
    font-weight: 400;
  }

  .signup-form-modern {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
  }

  .form-group.half {
    flex: 1;
    margin-bottom: 0;
  }

  .signup-form-modern label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
  }

  .signup-form-modern label:hover {
    background-color: transparent;
  }

  .signup-form-modern input[type="text"],
  .signup-form-modern input[type="email"],
  .signup-form-modern input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 16px;
    color: #1a1a1a;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
    -webkit-appearance: none;
  }

  .signup-form-modern input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
  }

  .signup-form-modern input::placeholder {
    color: #999999;
  }

  .signup-form-modern .help-text {
    display: block;
    font-size: 11px;
    color: #888888;
    margin-top: 8px;
    line-height: 1.5;
    padding: 0;
  }

  .signup-form-modern .error-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
  }

  .signup-form-modern .error-list li {
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 4px;
  }

  .signup-btn {
    width: 100%;
    height: 52px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .signup-btn:hover {
    background: #333333;
  }

  .signup-btn:active {
    background: #000000;
  }

  .signup-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
  }

  .signup-btn .btn-text {
    transition: opacity 0.2s ease;
  }

  .signup-btn .btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
  }

  .signup-btn.loading .btn-text {
    opacity: 0;
  }

  .signup-btn.loading .btn-loader {
    opacity: 1;
  }

  .signup-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
  }

  .signup-footer p {
    font-size: 14px;
    color: #666666;
    margin: 0;
  }

  .signup-footer a {
    display: inline;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .signup-footer a:hover {
    color: #666666;
    background: transparent;
    text-decoration: underline;
  }

  /* ===== Login Page Mobile Styles ===== */
  .login-page {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 20px 16px;
    box-sizing: border-box;
  }

  .login-container {
    width: 100%;
    max-width: 100%;
  }

  .login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 32px 24px;
  }

  .login-header {
    text-align: center;
    margin-bottom: 32px;
  }

  .login-logo {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
  }

  .login-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 0;
    font-weight: 400;
  }

  .login-form-modern {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    text-align: left;
  }

  .login-form-modern .form-group {
    margin-bottom: 20px;
  }

  .login-form-modern label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
  }

  .login-form-modern label:hover {
    background-color: transparent;
  }

  .login-form-modern input[type="text"],
  .login-form-modern input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 16px;
    color: #1a1a1a;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: normal;
    -webkit-appearance: none;
  }

  .login-form-modern input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
  }

  .login-form-modern input::placeholder {
    color: #999999;
  }

  .login-form-modern .error-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
  }

  .login-form-modern .error-list li {
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 4px;
  }

  .form-errors {
    background: #fff5f5;
    border: 1px solid #ffebeb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
  }

  .form-errors .error-message {
    font-size: 13px;
    color: #dc3545;
    margin: 0;
  }

  .login-btn {
    width: 100%;
    height: 52px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-btn:hover {
    background: #333333;
  }

  .login-btn:active {
    background: #000000;
  }

  .login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
  }

  .login-btn .btn-text {
    transition: opacity 0.2s ease;
  }

  .login-btn .btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
  }

  .login-btn.loading .btn-text {
    opacity: 0;
  }

  .login-btn.loading .btn-loader {
    opacity: 1;
  }

  .login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
  }

  .login-footer p {
    font-size: 14px;
    color: #666666;
    margin: 0;
  }

  .login-footer a {
    display: inline;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .login-footer a:hover {
    color: #666666;
    background: transparent;
    text-decoration: underline;
  }

  /* ===== Logout Page Mobile Styles ===== */
  .logout-page {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 50%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 20px 16px;
    box-sizing: border-box;
  }

  .logout-container {
    width: 100%;
    max-width: 100%;
  }

  .logout-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.06);
    padding: 40px 24px;
    text-align: center;
  }

  .logout-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
  }

  .logout-icon svg {
    width: 40px;
    height: 40px;
  }

  .logout-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
  }

  .logout-message {
    font-size: 14px;
    color: #666666;
    margin: 0 0 28px 0;
  }

  .logout-btn {
    display: inline-block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    text-decoration: none;
    box-sizing: border-box;
  }

  .logout-btn:hover {
    background: #333333;
    color: #ffffff;
  }

  .logout-btn:active {
    background: #000000;
  }

  /* Legacy signup form styles (kept for backward compatibility) */
  #signup-form:not(.signup-form-modern) {
    border: 1px solid #444444;
    padding: 10px;
    margin: 0 auto;
  }

  #signup-form:not(.signup-form-modern) span {
    font-size: 13px;
    color: gray;
    display: block;
    padding: 7px 20px;
  }

  #signup-form:not(.signup-form-modern) ul {
    font-size: 13px;
    color: gray;
    display: block;
    padding: 0 20px 7px 20px;
    margin: -17px 10px 0 10px;
    list-style: none;
  }

  #signup-form:not(.signup-form-modern) label {
    display: inline-block;
    width: 150px;
  }

  #signup-form:not(.signup-form-modern) p {
    margin: 10px;
  }

  #signup-form:not(.signup-form-modern) input {
    height: 22px;
    font-size: 15px;
  }

  #button-container {
    text-align: center;
    padding: 10px 0 0 0;
  }

  #id_email {
    width: 100%;
    max-width: 325px;
  }

  #ch-list {
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
  }

  #ch-select-message {
    text-align: center;
    margin: 5px 0;
    min-height: 60px;
    height: auto;
    line-height: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  #add-ch,
  #register-ch {
    background-color: white;
    border-radius: 15px;
    font-size: 14px;
    height: 30px;
    line-height: 30px;
    padding: 0 10px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    width: 160px;
  }

  .ch-container {
    width: 100%;
    height: 80px;
    margin: 3px 0;
    border-radius: 10px;
    background-color: white;
  }

  .ch-container a {
    display: flex;
    height: 100%;
    border-radius: 10px;
  }

  .ch-info-left {
    width: 50%;
  }

  .ch-info-right {
    width: 50%;
    font-size: 14px;
  }

  .ch-info-elem {
    height: 50%;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    box-sizing: border-box;
    line-height: 20px;
  }

  .ch-name {
    font-size: 16px;
    margin: 0 0 0 10px;
  }

  .ch-host {
    color: gray;
    font-size: 13px;
    margin: 0 0 0 25px;
  }

  #make-ch-container {
    width: 600px;
    margin: 0 auto;
    text-align: center;
  }

  #ch-ctrl-container {
    width: 100%;
  }

  #ch-ctrl {
    width: 100%;
    margin: 10px auto;
  }

  #ch-title {
    border-bottom: black 1px solid;
    font-size: 17px;
    height: 30px;
    text-align: center;
    display: flex;
    justify-content: space-between;
  }

  #ch-menu-container {
    display: flex;
    justify-content: space-between;
  }

  .ch-contents {
    padding: 10px 5px;
    font-size: 14px;
  }

  .ch-menu {
    width: 25%;
    height: 35px;
    line-height: 35px;
    text-align: center;
    box-sizing: border-box;
    margin: 0 5px;
  }

  .ch-menu.selected-menu,
  .ch-menu:hover {
    border-bottom: dimgray 2px solid;
  }

  .invite-ways,
  .member-container,
  .settings-container {
    padding: 5px 10px;
    margin: 10px 0;
    background-color: white;
    border-radius: 10px;
  }

  .invite-ways div {
    margin: 10px 0;

    line-height: 25px;
  }

  .invite-ways-info {
    font-size: 15px;
  }

  .invite-ways-messsage {
    font-size: 14px;
    color: dimgray;
  }

  .copy-button {
    box-sizing: border-box;
    display: inline-block;
    border: black 1px solid;
    font-size: 14px;
    border-radius: 3px;
    height: 25px;
    margin: 0 10px;
    padding: 0 5px;
    cursor: pointer;
  }

  .copy-button:hover {
    background-color: lightgray;
  }

  .copy-success {
    display: none;
    color: dimgray;
  }

  #invite-mail {
    height: 25px;
    box-sizing: border-box;
    width: 550px;
    font-size: 14px;
  }

  #invite-message {
    resize: none;
    box-sizing: border-box;
    width: 550px;
    height: 100px;
    font-size: 14px;
  }

  .invite-form-title {
    display: inline-block;
  }

  .invite-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #send-button {
    box-sizing: border-box;
    display: inline-block;
    border: black 1px solid;
    font-size: 14px;
    border-radius: 3px;
    width: 50px;
    height: 25px;
    line-height: 25px;
    padding: 0 10px;
    cursor: pointer;
  }

  #send-button:hover {
    background-color: lightgray;
  }

  #invite-submit {
    display: flex;
    justify-content: center;
  }

  #register-ch-form,
  #add-ch-form {
    display: none;
    border: dimgray 1px solid;
    border-radius: 5px;
    padding: 10px 15px;
    margin: 10px 0;
    justify-content: space-between;
    flex-wrap: wrap;
    text-align: center;
  }

  #ch-id {
    box-sizing: border-box;
    height: 25px;
    font-size: 14px;
    width: 250px;
  }

  #registered-message {
    padding: 5px 15px;
    margin: 10px 0;
    text-align: center;
  }

  #ch-ctrl-link:hover {
    text-decoration: underline;
  }

  .ch-form-elem {
    margin: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .ch-form-elem label:hover {
    background-color: #f4f4f7;
  }

  #ch-description {
    box-sizing: border-box;
    resize: none;
    width: 400px;
    height: 50px;
  }

  #ch-name {
    box-sizing: border-box;
    width: 400px;
    height: 25px;
  }

  #ch-type-form {
    width: 200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  #live-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    margin: 6px 8px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
  }

  .live-audience-video-controler {
    height: 130px;
  }

  .live-host-video-controler {
    height: 185px;
  }

  .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .stat-icon {
    width: 14px;
    height: 14px;
    color: #666;
    flex-shrink: 0;
  }

  .stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .stat-row {
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .stat-label {
    font-size: 9px;
    color: #888;
    width: 8px;
  }

  .network-condition {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 10px;
  }

  .network-condition div {
    width: 2px;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.2s ease;
  }

  .network-condition div:nth-of-type(1) { height: 2px; }
  .network-condition div:nth-of-type(2) { height: 3px; }
  .network-condition div:nth-of-type(3) { height: 5px; }
  .network-condition div:nth-of-type(4) { height: 6px; }
  .network-condition div:nth-of-type(5) { height: 8px; }
  .network-condition div:nth-of-type(6) { height: 10px; }

  .remote-network-condition {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 8px;
  }

  .remote-network-condition div {
    width: 2px;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.2s ease;
  }

  .remote-network-condition div:nth-of-type(1) { height: 2px; }
  .remote-network-condition div:nth-of-type(2) { height: 3px; }
  .remote-network-condition div:nth-of-type(3) { height: 4px; }
  .remote-network-condition div:nth-of-type(4) { height: 5px; }
  .remote-network-condition div:nth-of-type(5) { height: 7px; }
  .remote-network-condition div:nth-of-type(6) { height: 8px; }

  .audio-level-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 14px;
  }

  .audio-level-indicator div {
    width: 2px;
    height: 100%;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.1s ease;
  }

  .remote-audiolevel-container {
    display: flex;
    align-items: center;
    margin: 0 3px;
  }

  .remote-audio-level-indicator {
    display: flex;
    align-items: center;
    gap: 1px;
    height: 12px;
  }

  .remote-audio-level-indicator div {
    width: 2px;
    height: 100%;
    background-color: #d0d0d0;
    border-radius: 1px;
    transition: background-color 0.1s ease;
  }

  .video-resolution {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: -0.5px;
  }

  .remote-video-resolution-container {
    display: flex;
    align-items: center;
  }

  .remote-video-resolution {
    font-size: 10px;
    font-weight: 500;
    color: #666;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  }

  .member {
    display: none;
    justify-content: space-between;
    height: 30px;
    margin: 10px;
    line-height: 30px;
  }

  .member-name {
    margin: auto 10px;
  }

  div img {
    vertical-align: middle;
  }

  .live-menu-button {
    width: 90px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
    background-color: rgb(239, 239, 239);
  }

  /* 新しいメディアトグルボタン（モバイル） */
  .media-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f3;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }

  .media-toggle-btn:hover {
    background-color: #e4e4e7;
    transform: scale(1.05);
  }

  .media-toggle-btn svg {
    width: 20px;
    height: 20px;
    color: #444;
  }

  .media-toggle-btn.muted,
  .media-toggle-btn.video-off {
    background-color: #fee2e2;
  }

  .media-toggle-btn.muted:hover,
  .media-toggle-btn.video-off:hover {
    background-color: #fecaca;
  }

  .media-toggle-btn.muted svg,
  .media-toggle-btn.video-off svg {
    color: #dc2626;
  }

  .media-toggle-btn svg .slash {
    stroke: #dc2626;
    stroke-width: 2.5;
  }

  /* アクティブな機能（モバイル）*/
  .media-toggle-btn.active-feature {
    background-color: #dbeafe;
  }

  .media-toggle-btn.active-feature:hover {
    background-color: #bfdbfe;
  }

  .media-toggle-btn.active-feature svg {
    color: #2563eb;
  }

  .media-toggle-btn.active-feature svg .slash {
    stroke: #dc2626;
  }

  /* 設定ドロップダウングループ（モバイル） */
  .config-dropdown-group {
    display: none;
  }

  .live-menu-icon {
    height: 30px;
    line-height: 30px;
  }

  .live-menu-string {
    font-size: 13px;
    overflow: hidden;
    height: 20px;
  }

  .select-config {
    height: 30px;
  }

  .delay-container {
    display: flex;
    line-height: 29px;
  }

  .delay {
    font-size: 12px;
    color: #4b4b4b;
    margin: auto 2px;
  }

  .member-info {
    display: flex;
  }

  .member-liveinfo {
    display: flex;
  }

  #video-controler {
    background-color: white;
    border-radius: 5px;
  }

  .chMember {
    display: flex;
    justify-content: left;
    font-size: 15px;
    height: 30px;
    margin: 10px 0;
    line-height: 30px;
  }

  .ch-member-name {
    margin: auto 15px;
    font-size: 14px;
  }

  #start-end-live {
    display: flex;
    align-items: center;
  }

  .ch-member {
    display: flex;
    align-items: center;
    line-height: 20px;
    width: 50px;
    font-size: 14px;
    justify-content: space-between;
  }

  #message-member-title span {
    margin: auto 8px;
  }

  .ch-info-string {
    height: 20px;
  }

  .ch-info-icon {
    height: 23px;
  }

  .ch-type {
    height: 20px;
    line-height: 21px;
  }

  .settings-container form {
    width: 100%;
    margin: 0 auto;
  }

  .settings-container {
    display: flex;
    justify-content: left;
  }

  .edit-ch-form-elem {
    margin: 20px 10px;
    display: flex;
    justify-content: left;
    align-items: center;
  }

  .edit-ch-form-elem label {
    width: 135px;
  }

  .edit-ch-form-elem label:hover {
    background-color: white;
  }

  .submit-button {
    margin: 10px;
    text-align: center;
  }

  #id_type {
    height: 25px;
  }

  #id_record,
  #id_notice {
    width: 15px;
    height: 15px;
    margin-left: 0px;
  }

  .ch-link {
    font-size: 14px;
    width: 100px;
    line-height: 30px;
  }

  #id_description {
    box-sizing: border-box;
    resize: none;
    width: calc(100% - 135px);
    height: 50px;
  }

  #id_name {
    box-sizing: border-box;
    width: calc(100% - 135px);
    height: 25px;
  }

  .ch-link a:hover {
    background-color: initial;
    color: dimgray;
  }

  #select-ch {
    display: flex;
    margin: 10px 5px;
    width: calc(100% - 10px);
    height: 31px;
    overflow-x: scroll;
    white-space: nowrap;
  }

  #select-ch::-webkit-scrollbar {
    display: none;
  }

  .ch-name-button {
    border-radius: 20px;
    border: lightgray 1px solid;
    margin: 0 3px;
    padding: 3px 12px;
    background-color: white;
  }

  .ch-name-button.selected-ch,
  .ch-name-button:hover {
    background-color: lightgray;
  }

  .app-menu {
    margin: 10px auto;
  }
}


/* もっと見るボタン */
.load-more-btn {
  display: inline-block;
  padding: 12px 40px;
  margin: 20px auto;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #4a90d9;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(74, 144, 217, 0.3);
}

.load-more-btn:hover {
  background-color: #357abd;
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4);
  transform: translateY(-2px);
}

.load-more-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

#load-more-container {
  text-align: center;
  padding: 20px;
  clear: both;
}

/* ===========================================
   Archive List - New Card Design
   =========================================== */

/* 件数表示 */
.archive-count-container {
  padding: 8px 12px;
}

.archive-total-count {
  font-size: 14px;
  color: #e91e63;
  font-weight: 600;
}

/* グリッドコンテナ */
.archive-grid-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 8px;
  gap: 12px;
}

/* アーカイブカード */
.archive-card {
  width: calc(50% - 6px);
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.archive-card a {
  display: block;
  border-radius: 10px;
}

.archive-card a:hover {
  background-color: transparent;
}

/* サムネイルコンテナ */
.archive-thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #e0e0e0;
  overflow: hidden;
}

.archive-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.archive-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e0e0e0;
}

.archive-thumbnail-placeholder span {
  font-size: 32px;
  opacity: 0.5;
}

/* 再生時間バッジ */
.archive-duration-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
}

/* 配信者バッジ */
.archive-manager-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background-color: #e91e63;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* カード情報部分 */
.archive-card-info {
  padding: 10px;
}

.archive-channel-host-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  overflow: hidden;
}

.archive-channel-name {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.archive-separator {
  font-size: 12px;
  color: #999;
  margin: 0 4px;
  flex-shrink: 0;
}

.archive-host-name {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.archive-date {
  font-size: 10px;
  color: #888;
}

/* アーカイブカード上のメニュー位置調整 */
.archive-card .archive-menu-container {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.archive-card .menu-button {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 2px 4px;
}

.archive-card .menu-button div {
  height: 5px;
  line-height: 5px;
  padding: 0 2px;
  color: #333;
}

/* Desktop (min-width: 1030px) */
@media (min-width: 1030px) {
  .archive-grid-container {
    padding: 0 12px;
    gap: 14px;
  }

  .archive-card {
    width: calc(50% - 7px);
  }

  .archive-thumbnail-placeholder span {
    font-size: 40px;
  }

  .archive-duration-badge {
    font-size: 11px;
    padding: 3px 6px;
  }

  .archive-manager-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .archive-channel-name {
    font-size: 13px;
  }

  .archive-separator {
    font-size: 13px;
  }

  .archive-host-name {
    font-size: 13px;
  }

  .archive-date {
    font-size: 11px;
  }
}

/* ===========================================
   Channel Card - New Design (Audience Top)
   =========================================== */

/* PC版 (min-width: 1030px) */
@media (min-width: 1030px) {
  .channel-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .channel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }

  .channel-card a {
    display: block;
    border-radius: 16px;
  }

  .channel-card a:hover {
    background-color: transparent;
  }

  .channel-card-content {
    display: flex;
    align-items: center;
    padding: 16px;
  }

  /* ホストアバター */
  .host-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 14px;
    position: relative;
    flex-shrink: 0;
  }

  .host-avatar-live {
    border: 2px solid #e63946;
  }

  .host-avatar-image {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
  }

  .host-avatar-text {
    font-size: 22px;
    font-weight: 700;
    color: #999;
  }

  .live-indicator-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #e63946;
    border: 2px solid #fff;
  }

  /* チャンネル情報 */
  .channel-card-info {
    flex: 1;
    min-width: 0;
  }

  .channel-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
  }

  .channel-card-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .live-badge {
    display: flex;
    align-items: center;
    background-color: #e63946;
    padding: 3px 8px;
    border-radius: 4px;
    gap: 4px;
    flex-shrink: 0;
  }

  .live-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
  }

  .live-badge span {
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
  }

  .type-badge {
    display: flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .type-badge-live svg {
    color: #e63946;
  }

  .type-badge-rtc svg {
    color: #2196F3;
  }

  .channel-card-description {
    font-size: 13px;
    color: #666;
    line-height: 18px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .channel-card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
  }

  .host-name-container {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .host-name-container svg {
    color: #888;
  }

  .host-name-container span {
    font-size: 12px;
    color: #888;
  }

  .more-hosts {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
  }

  .channel-stats {
    display: flex;
    margin-top: 4px;
    gap: 12px;
  }

  .channel-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .channel-stat-item svg {
    color: #888;
  }

  .channel-stat-item span {
    font-size: 12px;
    color: #888;
  }

  /* 矢印 */
  .channel-card-arrow {
    flex-shrink: 0;
    margin-left: 8px;
  }

  .channel-card-arrow svg {
    color: #ccc;
  }

  /* チャンネル管理リンク（配信者側） */
  .channel-card {
    position: relative;
  }

  .channel-manage-link {
    position: absolute;
    right: 56px;
    bottom: 16px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    text-decoration: none;
    border-radius: 50%;
    background-color: #f0f0f0;
    transition: all 0.2s ease;
    z-index: 2;
    box-sizing: border-box;
  }

  .channel-manage-link:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
  }

  .channel-manage-link svg {
    width: 16px;
    height: 16px;
    color: #666;
    flex-shrink: 0;
  }

  .channel-manage-link:hover svg {
    color: #333;
  }
}

/* スマホ版 (max-width: 1030px) */
@media (max-width: 1030px) {
  .channel-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .channel-card:active {
    transform: scale(0.98);
  }

  .channel-card a {
    display: block;
    border-radius: 16px;
  }

  .channel-card a:hover,
  .channel-card a:active {
    background-color: transparent;
  }

  .channel-card-content {
    display: flex;
    align-items: center;
    padding: 14px;
  }

  /* ホストアバター */
  .host-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
  }

  .host-avatar-live {
    border: 2px solid #e63946;
  }

  .host-avatar-image {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
  }

  .host-avatar-text {
    font-size: 20px;
    font-weight: 700;
    color: #999;
  }

  .live-indicator-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e63946;
    border: 2px solid #fff;
  }

  /* チャンネル情報 */
  .channel-card-info {
    flex: 1;
    min-width: 0;
  }

  .channel-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .channel-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .live-badge {
    display: flex;
    align-items: center;
    background-color: #e63946;
    padding: 2px 6px;
    border-radius: 4px;
    gap: 3px;
    flex-shrink: 0;
  }

  .live-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #fff;
  }

  .live-badge span {
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
  }

  .type-badge {
    display: flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .type-badge svg {
    width: 14px;
    height: 14px;
  }

  .type-badge-live svg {
    color: #e63946;
  }

  .type-badge-rtc svg {
    color: #2196F3;
  }

  .channel-card-description {
    font-size: 12px;
    color: #666;
    line-height: 16px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .channel-card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
  }

  .host-name-container {
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .host-name-container svg {
    width: 12px;
    height: 12px;
    color: #888;
  }

  .host-name-container span {
    font-size: 11px;
    color: #888;
  }

  .more-hosts {
    font-size: 10px;
    color: #999;
    margin-left: 6px;
  }

  .channel-stats {
    display: flex;
    margin-top: 4px;
    gap: 10px;
  }

  .channel-stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .channel-stat-item svg {
    width: 12px;
    height: 12px;
    color: #888;
  }

  .channel-stat-item span {
    font-size: 11px;
    color: #888;
  }

  /* 矢印 */
  .channel-card-arrow {
    flex-shrink: 0;
    margin-left: 6px;
  }

  .channel-card-arrow svg {
    width: 20px;
    height: 20px;
    color: #ccc;
  }

  /* チャンネル管理リンク（配信者側） */
  .channel-card {
    position: relative;
  }

  .channel-manage-link {
    position: absolute;
    right: 46px;
    bottom: 14px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    text-decoration: none;
    border-radius: 50%;
    background-color: #f0f0f0;
    transition: all 0.2s ease;
    z-index: 2;
    box-sizing: border-box;
  }

  .channel-manage-link:hover,
  .channel-manage-link:active {
    background-color: #e0e0e0;
    transform: scale(1.05);
  }

  .channel-manage-link svg {
    width: 14px;
    height: 14px;
    color: #666;
    flex-shrink: 0;
  }

  .channel-manage-link:hover svg,
  .channel-manage-link:active svg {
    color: #333;
  }
}

/* ===========================================
   Add Channel Modal - Refined Design
   =========================================== */

/* 追加ボタン */
.add-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.add-channel-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.add-channel-btn:active {
  transform: translateY(0);
}

.add-channel-btn svg {
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* モーダルオーバーレイ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* モーダルコンテナ */
.modal-container {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

/* モーダルヘッダー */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f5;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f0f0f5;
  color: #333;
}

/* モーダルボディ */
.modal-body {
  padding: 20px 24px 24px;
  overflow: hidden;
}

.modal-description {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px;
  line-height: 1.5;
}

.modal-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-input-group:last-child {
  margin-bottom: 0;
}

.modal-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.modal-label:hover {
  background-color: transparent;
}

.modal-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #e8e8f0;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.modal-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-input::placeholder {
  color: #aaa;
}

/* モーダルフッター */
.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
  justify-content: flex-end;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-cancel {
  background: #f0f0f5;
  color: #666;
}

.modal-btn-cancel:hover {
  background: #e4e4eb;
  color: #444;
}

.modal-btn-submit {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.modal-btn-submit:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.modal-btn-submit svg {
  flex-shrink: 0;
}

/* モーダルコンテナ（大きいサイズ） */
.modal-container-lg {
  max-width: 480px;
}

/* テキストエリア */
.modal-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid #e8e8f0;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.2s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
  max-width: 100%;
}

.modal-textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-textarea::placeholder {
  color: #aaa;
}

/* 必須・任意マーク */
.required-mark {
  color: #e63946;
  font-weight: 600;
}

.optional-mark {
  color: #888;
  font-weight: 400;
  font-size: 12px;
}

/* チャンネルタイプセレクター */
.channel-type-selector {
  display: flex;
  gap: 12px;
}

.type-option {
  flex: 1;
  cursor: pointer;
}

.type-option:hover {
  background-color: transparent;
}

.type-option input {
  display: none;
}

.type-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border: 2px solid #e8e8f0;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.2s ease;
  text-align: center;
}

.type-option:hover .type-option-content {
  border-color: #d0d0e0;
  background: #f5f5fa;
}

.type-option input:checked + .type-option-content {
  border-color: #6366f1;
  background: #f0f0ff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.type-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.type-icon-rtc {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.type-icon-live {
  background: linear-gradient(135deg, #e63946 0%, #dc2626 100%);
  color: #fff;
}

.type-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.type-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.type-option-desc {
  font-size: 11px;
  color: #888;
}

/* Mobile adjustments */
@media (max-width: 1030px) {
  .add-channel-btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .add-channel-btn svg {
    vertical-align: middle;
    margin-bottom: 3px;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-container {
    max-width: 100%;
    margin: auto;
    border-radius: 16px;
    width: calc(100% - 32px);
  }

  .modal-container-lg {
    max-width: 100%;
    width: calc(100% - 32px);
  }

  .modal-header {
    padding: 16px 20px 14px;
  }

  .modal-title {
    font-size: 17px;
  }

  .modal-body {
    padding: 16px 20px 20px;
  }

  .modal-description {
    font-size: 13px;
  }

  .modal-input-group {
    width: 100%;
    box-sizing: border-box;
  }

  .modal-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    box-sizing: border-box;
  }

  .modal-textarea {
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
  }

  .modal-footer {
    padding: 16px 20px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .modal-btn {
    width: 100%;
    padding: 14px;
    box-sizing: border-box;
  }

  .modal-btn-cancel {
    order: 2;
  }

  .modal-btn-submit {
    order: 1;
  }

  /* チャンネルタイプセレクター（モバイル） */
  .channel-type-selector {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .type-option {
    width: 100%;
  }

  .type-option-content {
    flex-direction: row;
    padding: 14px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .type-option-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
    margin-right: 12px;
    flex-shrink: 0;
  }

  .type-option-text {
    align-items: flex-start;
  }
}
