/* ライバー診断プラグイン フロントエンドスタイル */

/* フォント読み込み (Google Fonts使用) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');

/* リセット */
.liver-diagnosis-wrapper * {
    box-sizing: border-box;
}

/* メインラッパー */
.liver-diagnosis-wrapper {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
}

/* アニメーション */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ホバーアニメーション */
.option-card {
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.option-card:hover::before {
    width: 300px;
    height: 300px;
}

/* 選択済みオプションのアニメーション */
.option-card:has(input:checked) {
    animation: pulse 0.5s ease;
}

/* プログレスバーのアニメーション */
.progress-fill {
    background: linear-gradient(90deg, #ff6b9d, #c06c84, #ff6b9d);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

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

/* ローディングスピナー詳細 */
.loading-spinner {
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid transparent;
    border-top: 4px solid #c06c84;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1.5s linear infinite;
}

/* レスポンシブ調整 */
@media (max-width: 480px) {
    .liver-diagnosis-header h2 {
        font-size: 24px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* アクセシビリティ */
.option-card:focus-within {
    outline: 3px solid #ff6b9d;
    outline-offset: 2px;
}

.btn:focus {
    outline: 3px solid #ff6b9d;
    outline-offset: 2px;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .liver-diagnosis-wrapper {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .question-text {
        color: #e0e0e0;
    }
    
    .option-card {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .option-card:hover {
        background: #333;
    }
    
    .form-control {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
}

/* プリント時のスタイル */
@media print {
    .question-nav,
    .liver-diagnosis-progress {
        display: none;
    }
    
    .liver-diagnosis-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* 高コントラストモード */
@media (prefers-contrast: high) {
    .option-card {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* モーション削減設定に対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}