/* 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 {
  display: none;
    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);
    }
}

/* タブナビゲーション */
.pricing-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto 20px;
    width: 864px;
}

.pricing-tab {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 40px;
    border: 2px solid rgba(248, 165, 200, 0.5);
    background: rgba(255, 255, 255, 0.5);
    color: #666666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 165, 200, 0.3), transparent);
    transition: left 0.5s ease;
}

.pricing-tab:hover {
    border-color: rgba(248, 165, 200, 0.8);
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(248, 165, 200, 0.3);
}

.pricing-tab:hover::before {
    left: 100%;
}

.pricing-tab.active {
    background: linear-gradient(135deg, rgba(248, 165, 200, 0.6) 0%, rgba(157, 174, 228, 0.6) 100%);
    border-color: rgba(248, 165, 200, 0.8);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(248, 165, 200, 0.4);
}

/* 料金表テキストスタイル */
.system-pricing {
    width: 864px;
    margin: 0 auto 20px;
    position: relative;
}

.pricing-content {
    display: none;
    flex-direction: column;
    gap: 40px;
    animation: fadeIn 0.5s ease;
}

.pricing-content.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 30px;
    position: relative;
}

.pricing-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(248, 165, 200, 0.5) 0%, rgba(157, 174, 228, 0.5) 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;
}

.pricing-title {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 24px;
    font-weight: bold;
    color: #ff69b4;
    text-align: center;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(248, 165, 200, 0.3);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pricing-row {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 25px;
    color: #333333;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 5px;
}

.pricing-row span {
    flex: 1;
    text-align: center;
    /* padding-bottom: 8px; */
    border-bottom: 5px solid #ff69b4;
    animation: borderColorChange 3s linear infinite;
}

@keyframes borderColorChange {
    0% {
        border-bottom-color: #ff69b4;
    }
    25% {
        border-bottom-color: #9daee4;
    }
    50% {
        border-bottom-color: #f8a5c8;
    }
    75% {
        border-bottom-color: #c8b5ff;
    }
    100% {
        border-bottom-color: #ff69b4;
    }
}

.pricing-options {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 16px;
    color: #555555;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(157, 174, 228, 0.1);
    border-radius: 5px;
}

.pricing-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(200, 200, 200, 0.5);
}

.pricing-note p {
    font-family: "Yu Mincho", "YuMincho", serif;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin: 8px 0;
    text-align: left;
}

.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;
}

.system-description2 p .red {
    color: #ff0000;
    font-weight: bold;
}


/* レスポンシブ対応 */
@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%;
    }

    .pricing-tabs {
        width: 100%;
        gap: 15px;
    }

    .pricing-tab {
        font-size: 16px;
        padding: 10px 30px;
    }

    .system-pricing {
        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;
    }

    .pricing-tabs {
        gap: 10px;
        margin: 20px auto 15px;
    }

    .pricing-tab {
        font-size: 14px;
        padding: 8px 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%;
    }

    .pricing-section {
        padding: 20px;
    }

    .pricing-title {
        font-size: 20px;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-row {
        font-size: 16px;
        padding: 8px 15px;
    }

    .pricing-options {
        flex-direction: column;
        gap: 10px;
        font-size: 14px;
    }

    .pricing-note p {
        font-size: 13px;
    }

    .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;
    }

    .pricing-tabs {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .pricing-tab {
        font-size: 14px;
        padding: 10px 20px;
        width: 100%;
    }

    .pricing-section {
        padding: 15px;
        gap: 30px;
    }

    .pricing-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-row {
        font-size: 14px;
        padding: 6px 10px;
    }

    .pricing-row span {
        text-align: center;
    }

    .pricing-options {
        font-size: 13px;
    }

    .pricing-note p {
        font-size: 12px;
    }
}

