/* SYSTEM用バウンス(グレー→ピンク) */
#system .title-bounce {
    animation: textBounceGrey 5s ease-in-out infinite;
}

#system .title-bounce:nth-child(1) { animation-delay: 0s; }
#system .title-bounce:nth-child(2) { animation-delay: 0.4s; }
#system .title-bounce:nth-child(3) { animation-delay: 0.8s; }
#system .title-bounce:nth-child(4) { animation-delay: 1.2s; }
#system .title-bounce:nth-child(5) { animation-delay: 1.6s; }
#system .title-bounce:nth-child(6) { animation-delay: 2.0s; }

@keyframes borderGradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* SYSTEM セクション */
#system {
    height: auto;
    min-height: 702px;
    padding-top: 130px;
    padding-bottom: 100px;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

#system h2 {
    color: #6e6e6e;
    position: relative;
    z-index: 2;
    font-weight: 300;
    -webkit-text-stroke: 5px #ffffff;
    text-stroke: 5px #ffffff;
    paint-order: stroke fill;
}

#system h2::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 5px);
    width: 1182px;
    height: 15px;
    background: linear-gradient(90deg,
        #ffcfe3 0%,
        #eaeaff 40%,
        #eaeaff 60%,
        #ffcfe3 100%);
    background-size: 200% 100%;
    border-radius: 5px;
    z-index: -1;
    animation: borderGradientFlow 10s ease-in-out infinite;
}

/* システムリスト */
.system-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 50px;
    width: 1180px;
    margin-left: calc(50% - 590px - 1px);
    margin-right: auto;
}

.system-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.system-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    padding: 4px;
    background: linear-gradient(135deg, rgba(248, 165, 200, 0.3) 0%, rgba(157, 174, 228, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.system-title {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 26px;
    font-weight: bold;
    color: #333333;
    margin: 0;
    text-align: center;
    flex: 1;
}

.system-date {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 14px;
    color: #7e7e7e;
    letter-spacing: 1px;
    white-space: nowrap;
    position: absolute;
    right: 0;
}

.system-image {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
}

.system-image img {
    width: 864px;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* System画像重ね表示 */
.system-image-stack {
    position: relative;
    width: 864px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
}

/* 最背面の背景画像（system_bg.png） */
.system-image-stack .system-img-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    width: 864px;
    height: auto;
}

.system-image-stack .system-img-back {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.system-image-stack .system-img-front {
    position: relative;
    z-index: 2;
}

/* 回転アニメーション（時計回り、5秒ループ） */
.rotate-zoom {
    transform-origin: center center;
    animation: rotateAnim 20s linear infinite;
}

@keyframes rotateAnim {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* バウンスアニメーション（system_img1.png & option_img1.png用） */
.system-item:first-child .system-image-stack,
.system-item:nth-child(2) .system-image-stack {
    overflow: hidden;
}

.system-item:first-child .system-img-front,
.system-item:nth-child(2) .system-img-front {
    animation: imageBounce 3s ease-in-out infinite;
}

/* バウンスキーフレーム（弾む感じ） */
@keyframes imageBounce {
    0% {
        transform: translateY(0);
    }
    /* 0.5秒 = 約17%の期間 */
    5% {
        transform: translateY(-10px);
    }
    10% {
        transform: translateY(0);
    }
    12% {
        transform: translateY(-4px);
    }
    14% {
        transform: translateY(0);
    }
    16% {
        transform: translateY(-1px);
    }
    17% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(0);
    }
}

/* レインボーカラーアニメーション（色相変化） */
.rainbow-hue {
    animation: rainbowHueRotate 3s linear infinite;
}

@keyframes rainbowHueRotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

.system-description {
    position: relative;
    z-index: 1;
    width: 864px;
    margin: 0 auto;
}

.system-description2 {
    position: relative;
    z-index: 1;
    width: 864px;
    margin: 0 auto;
    padding-top: 10px;
    border-top: 1px solid #cccccc;
}

.system-description p {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 18px;
    color: #333333;
    line-height: 1.8;
    margin-top: 20px;
    text-align: left;
}

.system-description2 p {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 14px;
    color: #333333;
    line-height: 1.8;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: left;
}

/* レスポンシブ対応 */
@media screen and (max-width: 1024px) {
    #system {
        padding-top: 80px;
        padding-bottom: 60px;
    }

    #system h2::before {
        width: 90%;
    }

    .system-list {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .system-image img {
        width: 100%;
    }

    .system-image-stack {
        width: 100%;
    }

    .system-image-stack .system-img-bg {
        width: 100%;
    }

    .system-description,
    .system-description2 {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    #system {
        padding-top: 50px;
        padding-bottom: 40px;
        min-height: auto;
    }

    #system h2::before {
        width: 95%;
    }

    .system-list {
        width: 95%;
    }

    .system-item {
        gap: 15px;
        padding: 20px;
    }

    .system-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .system-title {
        font-size: 18px;
    }

    .system-date {
        font-size: 14px;
        position: relative;
    }

    .system-image img {
        width: 100%;
    }

    .system-description,
    .system-description2 {
        width: 100%;
    }

    .system-description p {
        font-size: 14px;
    }

    .system-description2 p {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .system-item {
        padding: 15px;
    }

    .system-title {
        font-size: 16px;
    }
}

