/* タブのスタイル */
.tab-nav {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.tab-btn {
    position: relative;
    z-index: 1;
    padding: 12px 20px;
    margin-bottom: -1px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 10px 10px 0 0;
    font-size: 15px;
    font-weight: bold;
    color: #3868c9;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    /* タブの幅 */
    max-width: 200px;
    min-height: 48px;
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tab-btn.active {
    z-index: 10;
    background-color: #7a64d1;
    color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tab-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .tab-btn.active {
        transform: scale(1.1);
        transform-origin: bottom center;
    }
}

@media (max-width: 767px) {
    .tab-nav {
        gap: 8px;
        margin-bottom: 20px;
        transform-origin: center top;
    }

    .tab-btn {
        width: calc(50% - 4px);
        max-width: none;
        padding: 8px 5px;
        border-radius: 5px;
        margin-bottom: 0;
        font-size: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 48px;
    }

    .tab-btn.active {
        padding-bottom: 12px;
        background-color: #7a64d1;
        color: #ffffff;
        box-shadow: none;
    }
}

.tab-content-container {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-align: left;
    min-height: 200px;
}

.tab-heading {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    font-size: 1.8em;
    color: #3868c9;
    border-bottom: 3px solid #7a64d1;
}

.tab-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #2c3e50;
}

.tab-text h3 {
    font-size: 1.3rem;
    color: #324f8b;
    padding: 2px 0 6px 15px;
    margin: 25px 0 10px;
    border-left: 6px solid #7a64d1;
    border-bottom: 1px solid rgba(50, 79, 139, 0.1);
}

.tab-text a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 1px solid transparent;
}

.tab-text a:hover {
    color: #357abd;
    border-bottom: 1px solid #357abd;
}

.highlight {
    color: #ff5e62;
    font-weight: bold;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.05);
}

.tab-pane {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Layout Transition Animation */
@keyframes layoutSnap {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.tab-nav.layout-changed {
    animation: layoutSnap 0.25s ease-out;
}

/* 準備中のタブのスタイル */
.preparation-tab {
    text-align: center;
    padding: 80px 20px;
}

.preparation-icon {
    margin-bottom: 30px;
    display: block;
}

.preparation-icon i {
    font-size: 6rem;
    color: #324f8b;
    display: inline-block;
    animation: rotateHourglass 4s ease-in-out infinite;
    -webkit-animation: rotateHourglass 4s ease-in-out infinite;
    text-shadow: 0 5px 15px rgba(50, 79, 139, 0.2);
}

@keyframes rotateHourglass {
    0% {
        transform: rotate(0deg);
    }

    45% {
        transform: rotate(180deg);
    }

    55% {
        transform: rotate(180deg);
    }

    95% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes rotateHourglass {
    0% {
        -webkit-transform: rotate(0deg);
    }

    45% {
        -webkit-transform: rotate(180deg);
    }

    55% {
        -webkit-transform: rotate(180deg);
    }

    95% {
        -webkit-transform: rotate(360deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

.preparation-tab p {
    color: #64748b;
    line-height: 2;
    font-size: 1.25rem;
    font-weight: 500;
}

@media (max-width: 480px) {
    .preparation-icon i {
        font-size: 4rem;
    }

    .preparation-tab p {
        font-size: 1rem;
    }
}