@charset "UTF-8";

/* body
--------------------------- */
body {
  background: url("/images/back_001.webp") no-repeat top center #fff;
  background-size: contain;
  margin: 0;
  padding: 0;
  color: #666;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Noto Sans JP", sans-serif;
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  filter: blur(2px);
  pointer-events: none;
}

/* Ensure page content layers above animated canvas */
header,
main,
footer,
.container {
  position: relative;
  z-index: 2;
}

/* header
--------------------------- */
header {
  padding: 10px;
  text-align: center;
}

/* nav
--------------------------- */
nav {
  max-width: 640px;
  margin: 0 auto 20px;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 20px;
}

footer {
  background-color: #28a745;
  padding: 10px;
  text-align: center;
}

footer small {
  color: #fff;
  line-height: 1.5em;
  font-size: 12px;
}

/* index.php
--------------------------- */
.mainImg {
  max-width: 560px;
  margin: 0 auto 40px;
}

.mainImg img {
  width: 100%;
  height: auto;
}

.index main {
  max-width: 640px;
  margin: 0 auto;
}

.index h1,
.register h1,
.login h1 {
  text-align: center;
  font-size: 24px;
  margin: 20px auto;
  font-family: "Noto Serif JP", serif;
  line-height: 1.5em;
}

.index h2 {
  text-align: center;
  font-size: 20px;
  margin: 0 auto 20px;
  font-family: "Noto Serif JP", serif;
  line-height: 1.5em;
  border-top: 1px solid #666;
  padding-top: 10px;
}

.index main p {
  font-size: 16px;
  line-height: 1.8em;
}

.index main .memberS {
  text-align: center;
  margin: 30px 0;
}

.index main .memberSS {
  text-align: center;
  margin: 0 0 60px;
}

.index main .memberSS span {
  font-size: 12px;
}

.index .about {
  margin: 0 auto 60px;
  max-width: 640px;
}

.index .about ul {
  margin: 0 auto 60px;
  max-width: 640px;
}

.index .about li {
  font-size: 16px;
  line-height: 1.5em;
  border-top: 1px dotted #666;
  padding: 10px 0;
  margin: 0;
}

.index .about ul li a {
  color: #666;
}

/* edit_links.php
--------------------------- */
.container {
  max-width: 100%;
  margin: 2em auto;
  padding: 1em;
}
form label {
  display: block;
  margin-top: 1em;
}
input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 0.5em;
  margin-top: 0.2em;
}
button {
  margin-top: 1em;
  padding: 0.5em 1em;
}
ul {
  list-style: none;
  padding-left: 0;
}
li {
  margin-bottom: 1em;
  text-align: left;
}

/* エラーページ用スタイル
--------------------------- */
.error-page {
  background-color: #f8f9fa;
}

.error-page .container {
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  color: #dc3545;
  margin-bottom: 1.5rem;
}

.error-message {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.error-message p {
  color: #6c757d;
  margin: 0;
  font-size: 1.1rem;
}

.error-page a {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease-in-out;
}

.error-page a:hover {
  background-color: #0056b3;
  text-decoration: none;
}

.error-page a:first-of-type {
  background-color: #dc3545;
}

.error-page a:first-of-type:hover {
  background-color: #c82333;
}

/* プロフィールページ
--------------------------- */

.success-message {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.success-message.show {
  opacity: 1;
  transform: translateY(0);
}

.success-message i {
  color: #28a745;
  font-size: 16px;
}

.success-message.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

/* リンク編集ページ
--------------------------- */

/* 編集フォーム */
#editFormDiv {
  display: none;
  background-color: #f8f9fa;
  padding: 15px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin-bottom: 20px;
}

#editFormDiv .form-field {
  margin-bottom: 15px;
}

#editFormDiv label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

#editFormDiv input[type="text"],
#editFormDiv input[type="url"],
#editFormDiv select {
  width: 100%;
  max-width: 500px;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

#editFormDiv input:focus,
#editFormDiv select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#editFormDiv .btn-primary {
  padding: 8px 16px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
}

#editFormDiv .btn-secondary {
  padding: 8px 16px;
  border: 1px solid #ccc;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
}

/* リンク一覧 */
#linkList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#linkList li {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

#linkList li:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drag-handle {
  cursor: move;
  color: #666;
  font-size: 16px;
  user-select: none;
}

.link-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-actions {
  margin-left: auto;
}

.link-actions a {
  color: #007bff;
  text-decoration: none;
  margin: 0 5px;
}

.link-actions a:hover {
  text-decoration: underline;
}

/* 順番保存ボタン */
.save-order-btn {
  margin-top: 15px;
  padding: 8px 16px;
  border: 1px solid #28a745;
  background: #28a745;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

.save-order-btn:hover {
  background: #218838;
}

/* エラーメッセージ */
.error-message {
  color: #dc3545;
  margin: 10px 0;
  font-size: 12px;
}

/* ユーティリティクラス */
.hidden {
  display: none;
}

/* 退会ページ
--------------------------- */

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.required {
  color: #e74c3c;
}

.form-group textarea {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-help {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

/* max 599
--------------------------- */
@media (max-width: 599px) {
  .container {
    padding: 1rem;
    font-size: 14px;
  }
}

/* max 640
--------------------------- */
@media (max-width: 640px) {
  header {
    background-color: rgb(40, 167, 69, 0.5);
    padding: 10px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
  }

  nav {
    margin: 0;
    text-align: right;
  }

  /* ハンバーガーメニュー用スタイル */

  @media (max-width: 640px) {
    header nav button#menuToggle {
      display: inline-block;
      background: none;
      border: none;
      padding: 0;
      margin: 0;
      cursor: pointer;
      position: relative;
      width: 2em;
      height: 2em;
    }

    /* ハンバーガーアイコン（三本線） */
    #menuToggle::before,
    #menuToggle::after {
      content: "";
      position: absolute;
      left: 0.3em;
      width: 1.4em;
      height: 0.2em;
      background: #fff;
      transition: all 0.3s ease;
    }

    #menuToggle::before {
      top: 0.4em;
    }

    #menuToggle::after {
      top: 1.2em;
    }

    #menuToggle span {
      position: absolute;
      left: 0.3em;
      top: 0.8em;
      width: 1.4em;
      height: 0.2em;
      background: #fff;
      transition: all 0.3s ease;
    }

    /* 開いた状態（×アイコン） */
    #menuToggle[aria-expanded="true"]::before {
      transform: rotate(45deg);
      top: 0.8em;
    }

    #menuToggle[aria-expanded="true"]::after {
      transform: rotate(-45deg);
      top: 0.8em;
    }

    #menuToggle[aria-expanded="true"] span {
      opacity: 0;
      transform: scale(0);
    }

    header nav ul {
      display: none;
    }
    header nav ul.open {
      display: block;
    }
  }

  @media (min-width: 641px) {
    header nav button#menuToggle {
      display: none;
    }
  }

  .index main {
    margin: 100px auto 0;
  }

  .bottomNav {
    display: none;
  }

  header nav button#menuToggle {
    display: inline-block;
    background: none;
    padding: 0.4em 0.6em;
    margin-bottom: 0.5em;
  }

  header nav ul {
    display: none;
  }

  header nav .open {
    display: block;
  }

  header nav .open li {
    border-bottom: 1px solid #fff;
  }

  header nav .open li .save-order-btn {
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
  }
}

/* min 641px
--------------------------- */
@media (min-width: 641px) {
  header nav button#menuToggle {
    display: none;
  }
}

/* タブレット向け（600px〜1023px） */
@media (min-width: 600px) and (max-width: 1023px) {
  .container {
    padding: 2rem;
    font-size: 16px;
  }
}

/* max 1024
--------------------------- */
/* PC向け（1024px以上） */
@media (min-width: 1024px) {
  .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    font-size: 18px;
  }
}

/* login.php
--------------------------- */
.login main {
  max-width: 640px;
  margin: 0 auto;
}

.login main p {
  font-size: 16px;
  line-height: 1.8em;
}

.login main input,
.register main input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e3f2fd;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  height: 54px;
}

.login main input:focus,
.register main input:focus {
  outline: none;
  border-color: #28a745;
}

.password-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-toggle button {
  margin-top: 0;
  padding: 1em;
  border: 1px solid #28a745;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #28a745;
  border-radius: 5px;
  width: 54px;
  height: 54px;
}

.password-toggle button.password-toggle-button {
  width: 54px;
  height: 54px;
}

.password-toggle button:hover {
  color: #28a745;
  border-color: #28a745;
}

.top-50-auto-0 {
  margin: 50px auto 0;
  display: block;
}

.login-links {
  margin: 20px 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.login-links li {
  font-size: 14px;
  line-height: 1.5em;
}

.login-links li a {
  
}

/* ソーシャルログイン
--------------------------- */
.social-login {
  margin: 20px 0;
  text-align: center;
}

.social-login-title {
  margin: 15px 0;
  color: #666;
  font-size: 14px;
}

.social-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.social-login-btn i {
  font-size: 18px;
}

.facebook-btn {
  background-color: #1877f2;
  color: #fff;
}

.facebook-btn:hover {
  background-color: #166fe5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

.x-btn {
  background-color: #000;
  color: #fff;
}

.x-btn:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.edit_links .error-message {
  color: red;
  margin: 1em 0;
  padding: 1em;
  border: 1px solid red;
  background-color: #ffe6e6;
}

.edit_links .success-message {
  color: green;
  margin: 1em 0;
  padding: 1em;
  border: 1px solid green;
  background-color: #e6ffe6;
}

.edit_links h2 {
  cursor: pointer;
  user-select: none;
}

.edit_links h2 i {
  margin-left: 8px;
  transition: transform 0.5s ease;
}

.edit_links h2 i.fa-chevron-down {
  transform: rotate(0deg);
}

.edit_links h2 i.fa-chevron-up {
  transform: rotate(180deg);
}

.edit_links #youtubeSettingsForm {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
}

.edit_links #youtubeSettingsForm form {
  padding: 1em;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.edit_links #youtubeSettingsForm form input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.edit_links #youtubeSettingsForm form small {
  display: block;
  margin-top: 5px;
  color: #666;
}

.edit_links .new-link {
  margin: 1em 0;
  text-align: center;
}

.edit_links .new-link a {
  margin-top: 15px;
  padding: 8px 16px;
  border: 1px solid #28a745;
  background: #28a745;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

.edit_links .new-link a:hover {
  background: #218838;
}

@media (max-width: 640px) {
  .social-login-buttons {
    max-width: 100%;
  }
}