/* サイラックス技表スタイルシート */
:root {
    --key-color: #8de41b;
    --sub-color: #354057;
    --base-text-color: #191412;
    --item-bg-color: #c9ad2c;
    --base-bg-color: #323232;
    --highlight-color: #fdff00;
    --dark-accent: #1e1e1e;
    --light-accent: #e9e9e9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--base-bg-color);
    color: var(--base-text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    );
}

header {
    background-color: var(--sub-color);
    color: var(--key-color);
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--key-color);
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%),
        repeating-linear-gradient(
            45deg,
            rgba(141, 228, 27, 0.1),
            rgba(141, 228, 27, 0.1) 10px,
            rgba(141, 228, 27, 0.2) 10px,
            rgba(141, 228, 27, 0.2) 20px
        );
    z-index: 0;
}

header h1, header h2 {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header h2 {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--light-accent);
}
.breadcrumb-nav {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin: 0 0.5rem;
    color: var(--key-color);
}

.breadcrumb-link {
    color: var(--key-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--item-bg-color);
    text-decoration: underline;
}

.current-page {
    color: var(--light-accent);
}

nav {
    background-color: var(--sub-color);
    padding: 1rem;
    border-bottom: 3px solid var(--key-color);
    /* position: sticky; */
    top: 0;
    z-index: 100;
}

nav h2 {
    color: var(--key-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

nav ul {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

nav ul li {
    margin: 0.5rem;
}

nav ul li a {
    color: var(--light-accent);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--key-color);
    transition: all 0.3s ease;
    display: inline-block;
}

nav ul li a:hover {
    background-color: var(--key-color);
    color: var(--sub-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.move-category {
    margin-bottom: 3rem;
}

.move-category h2 {
    color: var(--key-color);
    font-size: 2rem;
    border-bottom: 2px solid var(--key-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.move-category h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background-color: var(--item-bg-color);
}
.move-item {
    margin-bottom: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--key-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.move-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.move-item h3 {
    background-color: var(--sub-color);
    color: var(--key-color);
    padding: 0.8rem 1rem;
    font-size: 1.5rem;
    position: relative;
    border-bottom: 2px solid var(--key-color);
}

.move-item h3::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 0;
    border-color: var(--key-color) transparent transparent transparent;
    bottom: -10px;
    left: 20px;
}

.move-details {
    display: flex;
    flex-direction: column;
    background-color: var(--item-bg-color);
    padding: 1rem;
}

.move-info {
    padding: 1rem;
    color: var(--base-text-color);
    font-weight: 500;
}

.move-info p {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.info-label {
    font-weight: bold;
    min-width: 120px;
    margin-right: 1rem;
    color: var(--sub-color);
}

figure {
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

img.sneak {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

figure:hover img.sneak {
    transform: scale(1.03);
}

figcaption {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light-accent);
    padding: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* キャラクター紹介セクションのスタイル */
.character-intro {
    margin-bottom: 3rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--key-color);
    position: relative;
}

.character-intro h2 {
    color: var(--key-color);
    font-size: 2rem;
    border-bottom: 2px solid var(--key-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.character-intro h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background-color: var(--item-bg-color);
}
.content-image {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content-image figcaption {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light-accent);
    padding: 0.5rem;
    text-align: center;
}

.subtitle {
    color: var(--item-bg-color);
    font-size: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--key-color);
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0 4px 4px 0;
}

.character-description {
    line-height: 1.8;
    color: var(--light-accent);
}

.character-description p {
    margin-bottom: 1rem;
}

.character-description a {
    color: var(--key-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--key-color);
    transition: all 0.3s ease;
}

.character-description a:hover {
    color: var(--item-bg-color);
    border-bottom-style: solid;
}

/* フッター著作権部分のスタイル */
footer.copy {
    background-color: var(--sub-color);
    color: var(--light-accent);
    padding: 1.5rem;
    border-top: 3px solid var(--key-color);
    position: relative;
    overflow: hidden;
}

footer.copy::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 100%),
        repeating-linear-gradient(
            45deg,
            rgba(141, 228, 27, 0.05),
            rgba(141, 228, 27, 0.05) 10px,
            rgba(141, 228, 27, 0.1) 10px,
            rgba(141, 228, 27, 0.1) 20px
        );
    z-index: 0;
}

footer.copy > div {
    position: relative;
    z-index: 1;
}

.contact-info {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(141, 228, 27, 0.3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.contact-info a {
    color: var(--key-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.contact-info a:hover {
    color: var(--item-bg-color);
    text-decoration: underline;
}

.contact-info a img {
    margin-right: 0.3rem;
    filter: drop-shadow(0 0 2px var(--key-color));
}

.usage-terms {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(141, 228, 27, 0.3);
}

.usage-terms p {
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.copyright a.push0 {
    color: var(--key-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--key-color);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.copyright a.push0:hover {
    background-color: var(--key-color);
    color: var(--sub-color);
    transform: translateY(-2px);
    box-shadow: 0 0 10px var(--key-color);
}

.copyright a.push0 img {
    margin-right: 0.5rem;
    filter: drop-shadow(0 0 2px var(--key-color));
}

/* 更新時間とSNSボタンのスタイル */
.time {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 0.6rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    border-left: 3px solid var(--key-color);
    color: var(--light-accent);
    font-size: 0.9rem;
    position: relative;
    max-width: fit-content;
}

.time::before {
    content: "◇";
    color: var(--key-color);
    margin-right: 0.5rem;
}

.time time {
    font-weight: bold;
    color: var(--key-color);
    margin: 0 0.3rem;
}

/* SNSボタン */
.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(53, 64, 87, 0.2);
    border-radius: 5px;
    border: 1px dashed var(--key-color);
}

.twitter-share-button,
.fb-share-button {
    position: relative;
    z-index: 1;
}

/* Facebookボタン周りの調整 */
.fb-share-button span {
    vertical-align: middle !important;
}

/* SNSボタンのホバーエフェクト */
.share-buttons:hover {
    background-color: rgba(53, 64, 87, 0.3);
    box-shadow: 0 0 10px rgba(141, 228, 27, 0.3);
    transition: all 0.3s ease;
}

/* おすすめセクションのスタイル */
#recommendations {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--key-color);
    position: relative;
    overflow: hidden;
}

#recommendations::before {
    content: "おすすめ記事";
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--sub-color);
    color: var(--key-color);
    padding: 0.3rem 1rem;
    font-weight: bold;
    border-bottom-right-radius: 8px;
    border-right: 2px solid var(--key-color);
    border-bottom: 2px solid var(--key-color);
    z-index: 1;
}

#recommendations::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%),
        repeating-linear-gradient(
            45deg,
            rgba(141, 228, 27, 0.05),
            rgba(141, 228, 27, 0.05) 10px,
            rgba(141, 228, 27, 0.1) 10px,
            rgba(141, 228, 27, 0.1) 20px
        );
    z-index: 0;
    pointer-events: none;
}

#recommendations a.push0 {
    display: flex;
    flex-direction: column;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: var(--item-bg-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--base-text-color);
    font-weight: bold;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#recommendations a.push0:first-child {
    margin-top: 2rem;
}

#recommendations a.push0:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    background-color: #d4b82f;
}

#recommendations a.push0 img.sneak {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    transition: transform 0.5s ease;
}

#recommendations a.push0:hover img.sneak {
    transform: scale(1.03);
}

#recommendations a.push0::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background-color: var(--key-color);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    transition: all 0.3s ease;
}

#recommendations a.push0:hover::after {
    width: 40px;
    height: 40px;
}

@media (min-width: 768px) {
    .move-details {
        flex-direction: row;
    }

    figure {
        flex: 0 0 60%;
    }

    .move-info {
        flex: 0 0 40%;
    }

    .contact-info {
        display: flex;
        justify-content: center;
    }

    .usage-terms {
        max-width: 800px;
        margin: 0 auto 1.5rem;
    }

    .character-intro {
        padding: 2rem;
    }

    .share-buttons {
        justify-content: center;
    }

    .time {
        margin-left: auto;
        margin-right: auto;
    }

    #recommendations {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 1rem;
    }

    #recommendations a.push0 {
        flex: 0 0 calc(33.333% - 1rem);
        margin: 0;
        margin-top: 2rem;
    }

    #recommendations br {
        display: none;
    }
}

footer {
    background-color: var(--sub-color);
    color: var(--light-accent);
    text-align: center;
    padding: 1rem;
    border-top: 3px solid var(--key-color);
    margin-top: 2rem;
}

/* スマホ表示の最適化 */
@media screen and (max-width: 768px) {
  body {
    padding: 0;
  }

  main {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .move-details {
    padding: 0.5rem;
  }

  .move-info {
    padding: 0.5rem;
  }

  .info-label {
    min-width: 100px;
    margin-right: 0.5rem;
  }

  #toc ul {
    gap: 0.5rem;
  }

  #toc ul li {
    margin: 0.25rem;
  }

  nav {
    padding: 0.5rem;
  }

  .character-intro {
    padding: 1rem;
  }

  header, footer {
    padding: 1rem 0.5rem;
  }

  .breadcrumb-nav {
    padding: 0.3rem 0.5rem;
  }

  /* 画像の最適化 */
  figure {
    margin: 0 -0.5rem;
    width: calc(100% + 1rem);
  }

  figcaption {
    font-size: 0.8rem;
  }
}

/* スマホ表示のさらなる最適化 - 余白を最小限に */
@media screen and (max-width: 768px) {
  body {
    padding: 0;
    margin: 0;
    width: 100vw;
    overflow-x: hidden;
  }

  main {
    padding: 0.5rem;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }

  .move-category {
    margin-bottom: 1.5rem;
  }

  .move-item {
    margin-bottom: 1rem;
    border-radius: 4px;
  }

  /* 左右の余白を完全に削除 */
  .move-details,
  .character-intro,
  .breadcrumb-nav,
  #recommendations,
  header,
  footer,
  footer.copy,
  nav {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    width: 100%;
    box-sizing: border-box;
  }

  /* 画像をコンテナからはみ出さないようにする */
  figure {
    margin: 0;
    width: 100%;
    border-radius: 0;
  }

  /* テキスト要素の左右余白を最小限に */
  .move-info p {
    margin-left: 0;
    margin-right: 0;
  }

  /* 目次の調整 */
  #toc ul {
    padding: 0.2rem;
  }

  #toc ul li a {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
  }

  /* 余白のさらなる最適化 */
  .breadcrumb {
    padding: 0.2rem;
  }

  .character-description {
    padding: 0 0.2rem;
  }

  /* コンテンツを画面幅いっぱいに広げる */
  .container,
  .content,
  .wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
}

/* 特に小さい画面用のさらなる調整 */
@media screen and (max-width: 480px) {
  .info-label {
    min-width: 80px;
    margin-right: 0.3rem;
  }

  .move-item h3 {
    padding: 0.5rem;
  }

  .move-details {
    padding: 0.3rem;
  }

  .move-info {
    padding: 0.3rem;
  }
}

/* 目次に戻るボタン */
.back-to-toc {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--sub-color);
    border-top: 1px solid var(--key-color);
}

.toc-button {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--key-color);
    color: var(--sub-color);
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toc-button::after {
    content: "↑";
    position: absolute;
    right: 1rem;
    font-size: 1.2rem;
    animation: bounce 1s infinite alternate;
}

.toc-button:hover {
    background-color: #a0ff20;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.toc-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-4px);
    }
}

@media screen and (max-width: 768px) {
    .back-to-toc {
        padding: 0.3rem;
    }

    .toc-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .toc-button::after {
        font-size: 1rem;
        right: 0.8rem;
    }
}
