@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* WordPressテーマとの競合を避けるため、全てのスタイルをスコープ内に限定 */
.nurse-enneagram-container {
    font-family: 'Noto Sans JP', sans-serif !important;
    background: linear-gradient(-45deg, #ffeef8, #e7f3ff, #fff5f5, #ffe0f0);
    background-size: 400% 400%;
    animation: nurse-enneagram-gradient 15s ease infinite;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    margin: 20px auto;
    border-radius: 10px;
}

.nurse-enneagram-container *,
.nurse-enneagram-container *::before,
.nurse-enneagram-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.nurse-enneagram-container .container {
    max-width: 600px;
    width: 100%;
}

.nurse-enneagram-container .screen {
    display: none;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.15);
    animation: nurse-enneagram-fadeIn 0.5s ease;
}

.nurse-enneagram-container .screen.active {
    display: block;
}

@keyframes nurse-enneagram-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes nurse-enneagram-slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes nurse-enneagram-slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes nurse-enneagram-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes nurse-enneagram-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes nurse-enneagram-shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes nurse-enneagram-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes nurse-enneagram-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* スタート画面 */
.nurse-enneagram-container .header h1 {
    color: #ff69b4;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.5;
    animation: nurse-enneagram-scaleIn 0.6s ease, nurse-enneagram-float 3s ease-in-out 0.6s infinite;
}

.nurse-enneagram-container .subtitle {
    text-align: center;
    color: #ff85c0;
    font-size: 1.1rem;
    margin-bottom: 30px;
    animation: nurse-enneagram-fadeIn 0.8s ease 0.3s both;
}

.nurse-enneagram-container .intro {
    background: linear-gradient(135deg, #fff0f8 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 2px solid #ffe0f0;
    animation: nurse-enneagram-slideInRight 0.8s ease 0.5s both;
}

.nurse-enneagram-container .intro p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 10px;
}

.nurse-enneagram-container .intro p:last-child {
    margin-bottom: 0;
}

.nurse-enneagram-container .btn-start,
.nurse-enneagram-container .btn-restart {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff69b4 0%, #ff85c0 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.3);
}

.nurse-enneagram-container .btn-start:hover,
.nurse-enneagram-container .btn-restart:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 105, 180, 0.4);
}

.nurse-enneagram-container .btn-start:active,
.nurse-enneagram-container .btn-restart:active {
    transform: translateY(-1px);
}

/* 質問画面 */
.nurse-enneagram-container .progress-bar {
    width: 100%;
    height: 10px;
    background: #ffe0f0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.nurse-enneagram-container .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff69b4 0%, #ff85c0 50%, #ff69b4 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    animation: nurse-enneagram-shimmer 2s linear infinite;
    box-shadow: 0 2px 10px rgba(255, 105, 180, 0.5);
    position: relative;
}

.nurse-enneagram-container .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    animation: nurse-enneagram-pulse 1s ease-in-out infinite;
}

.nurse-enneagram-container .question-number {
    text-align: center;
    color: #ff69b4;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.nurse-enneagram-container .question-card {
    animation: nurse-enneagram-scaleIn 0.5s ease;
}

.nurse-enneagram-container .question-card h2 {
    color: #333;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.nurse-enneagram-container .question-card.slide-out {
    animation: nurse-enneagram-slideOutLeft 0.4s ease forwards;
}

.nurse-enneagram-container .question-card.slide-in {
    animation: nurse-enneagram-slideInRight 0.5s ease;
}

.nurse-enneagram-container .options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nurse-enneagram-container .option-btn {
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    border: 3px solid #ffe0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    color: #666;
    text-align: left;
    font-family: 'Noto Sans JP', sans-serif;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: nurse-enneagram-slideUpFade 0.5s ease forwards;
}

.nurse-enneagram-container .option-btn:nth-child(1) { animation-delay: 0.1s; }
.nurse-enneagram-container .option-btn:nth-child(2) { animation-delay: 0.2s; }
.nurse-enneagram-container .option-btn:nth-child(3) { animation-delay: 0.3s; }
.nurse-enneagram-container .option-btn:nth-child(4) { animation-delay: 0.4s; }
.nurse-enneagram-container .option-btn:nth-child(5) { animation-delay: 0.5s; }

@keyframes nurse-enneagram-slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nurse-enneagram-container .option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 105, 180, 0.3), transparent);
    transition: left 0.5s ease;
}

.nurse-enneagram-container .option-btn:hover::before {
    left: 100%;
}

.nurse-enneagram-container .option-btn:hover {
    border-color: #ff69b4;
    background: linear-gradient(135deg, #fff0f8 0%, #ffe0f0 100%);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.2);
}

.nurse-enneagram-container .option-btn:active {
    transform: scale(0.98);
    animation: nurse-enneagram-pulse 0.3s ease;
}

.nurse-enneagram-container .option-btn.selected {
    background: linear-gradient(135deg, #ff69b4 0%, #ff85c0 100%);
    color: white;
    border-color: #ff69b4;
    transform: scale(1.05);
}

.nurse-enneagram-container .option-btn:focus {
    outline: none;
}

.nurse-enneagram-container .option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* 結果画面 */
.nurse-enneagram-container .result-header {
    text-align: center;
    margin-bottom: 30px;
    animation: nurse-enneagram-scaleIn 0.6s ease;
}

.nurse-enneagram-container .result-header h1 {
    color: #ff69b4;
    font-size: 2rem;
    margin-bottom: 20px;
    animation: nurse-enneagram-float 3s ease-in-out infinite;
}

.nurse-enneagram-container .result-type {
    background: linear-gradient(135deg, #fff0f8 0%, #f0f8ff 100%);
    padding: 30px;
    border-radius: 20px;
    border: 3px solid #ffe0f0;
    animation: nurse-enneagram-scaleIn 0.8s ease 0.2s both;
}

.nurse-enneagram-container .type-icon {
    margin-bottom: 15px;
    display: block;
    width: 100%;
}

.nurse-enneagram-container .type-icon img,
.nurse-enneagram-container .type-icon .default-type-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
    object-fit: cover;
}

.nurse-enneagram-container .type-icon .result-custom-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

@keyframes nurse-enneagram-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

.nurse-enneagram-container .result-type h2 {
    color: #ff69b4;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.nurse-enneagram-container .result-type h3 {
    color: #ff85c0;
    font-size: 1.3rem;
}

.nurse-enneagram-container .result-content {
    margin: 30px 0;
}

.nurse-enneagram-container .result-section {
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 2px solid #ffe0f0;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: nurse-enneagram-slideUpFade 0.6s ease forwards;
}

.nurse-enneagram-container .result-section:nth-child(1) { animation-delay: 0.4s; }
.nurse-enneagram-container .result-section:nth-child(2) { animation-delay: 0.6s; }
.nurse-enneagram-container .result-section:nth-child(3) { animation-delay: 0.8s; }
.nurse-enneagram-container .result-section:nth-child(4) { animation-delay: 1s; }

.nurse-enneagram-container .result-section h4 {
    color: #ff69b4;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.nurse-enneagram-container .result-section p {
    color: #666;
    line-height: 1.8;
}

.nurse-enneagram-container .result-section ul {
    color: #666;
    line-height: 1.8;
    padding-left: 25px;
    margin: 0;
}

.nurse-enneagram-container .result-section li {
    margin-bottom: 10px;
}

/* ローディング画面 */
.nurse-enneagram-container .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    animation: nurse-enneagram-fadeIn 0.5s ease;
}

.nurse-enneagram-container .loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #ffe0f0;
    border-top: 5px solid #ff69b4;
    border-radius: 50%;
    animation: nurse-enneagram-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes nurse-enneagram-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nurse-enneagram-container .loading-text {
    color: #ff69b4;
    font-size: 1.2rem;
    font-weight: 500;
    animation: nurse-enneagram-pulse 1.5s ease-in-out infinite;
}

/* 紙吹雪エフェクト */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: nurse-enneagram-confetti-fall linear forwards;
    opacity: 0.9;
}

@keyframes nurse-enneagram-confetti-fall {
    0% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

/* 病院情報のスタイル */
.nurse-enneagram-container .recommended-hospitals {
    margin-top: 30px;
}

.nurse-enneagram-container .hospitals-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.nurse-enneagram-container .hospital-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    border: 2px solid #ffe0f0;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: nurse-enneagram-slideUpFade 0.6s ease forwards;
}

.nurse-enneagram-container .hospital-card:hover {
    border-color: #ff69b4;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.2);
    transform: translateY(-5px);
}

.nurse-enneagram-container .hospital-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.nurse-enneagram-container .hospital-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nurse-enneagram-container .hospital-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.nurse-enneagram-container .hospital-name {
    color: #ff69b4;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.nurse-enneagram-container .hospital-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.nurse-enneagram-container .hospital-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff69b4 0%, #ff85c0 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.nurse-enneagram-container .hospital-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.4);
}

.nurse-enneagram-container .no-hospitals {
    text-align: center;
    color: #999;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 10px;
}

/* レスポンシブ - タブレット */
@media (max-width: 900px) {
    .nurse-enneagram-container .hospitals-list {
        grid-template-columns: 1fr;
    }
}

/* レスポンシブ - モバイル */
@media (max-width: 600px) {
    .nurse-enneagram-container {
        padding: 20px 10px;
        min-height: 70vh;
    }

    .nurse-enneagram-container .screen {
        padding: 25px;
        border-radius: 20px;
    }

    .nurse-enneagram-container .header h1 {
        font-size: 1.5rem;
    }

    .nurse-enneagram-container .subtitle {
        font-size: 1rem;
    }

    .nurse-enneagram-container .question-card h2 {
        font-size: 1.1rem;
    }

    .nurse-enneagram-container .result-type h2 {
        font-size: 1.5rem;
    }

    .nurse-enneagram-container .type-icon {
        max-width: 100%;
    }

    .nurse-enneagram-container .hospitals-list {
        grid-template-columns: 1fr;
    }

    .nurse-enneagram-container .hospital-name {
        font-size: 1.1rem;
    }
}
