/* ===================================
   TRYSISTOR - Nutrition Enhanced Styles
   栄養学記事の共通スタイルシート
   =================================== */

/* 読了時間表示 */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #86efac;
    padding: 0.5rem 1rem;
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.5rem;
}

/* 用語解説システム */
.term-explanation {
    position: relative;
    display: inline;
}

.term {
    position: relative;
    color: #86efac;
    font-weight: 600;
    border-bottom: 2px dotted #22c55e;
    cursor: help;
    transition: all 0.2s ease;
}

.term:hover {
    color: #4ade80;
    border-bottom-color: #4ade80;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border: 1px solid #10b981;
    border-radius: 0.75rem;
    padding: 1rem;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5),
        0 10px 10px -5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    pointer-events: none;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #10b981;
}

.term:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.tooltip-content h4 {
    color: #86efac;
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tooltip-content p {
    color: #d1fae5;
    font-size: 0.8125rem;
    line-height: 1.6;
    margin: 0;
}

/* 実践チェックリスト */
.practice-checklist {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.3) 0%, rgba(6, 95, 70, 0.2) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.practice-checklist h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #86efac;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin: 0.75rem 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.checklist-item:hover {
    background: rgba(6, 78, 59, 0.3);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateX(4px);
}

.checklist-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    cursor: pointer;
    accent-color: #10b981;
    flex-shrink: 0;
}

.checklist-item label {
    color: #d1fae5;
    font-size: 1rem;
    line-height: 1.6;
    cursor: pointer;
    flex: 1;
}

.checklist-item input[type="checkbox"]:checked+label {
    color: #86efac;
    text-decoration: line-through;
    opacity: 0.7;
}

/* 理解度クイズ */
.comprehension-quiz {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.3) 0%, rgba(6, 95, 70, 0.2) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.comprehension-quiz h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #86efac;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}

.quiz-question {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.quiz-question p {
    color: #d1fae5;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.quiz-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.quiz-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.quiz-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
}

.quiz-answer.show {
    max-height: 500px;
    margin-top: 1rem;
}

.quiz-answer strong {
    color: #86efac;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.quiz-answer p {
    color: #d1fae5;
    font-size: 0.9375rem;
    line-height: 1.7;
    background: rgba(6, 78, 59, 0.3);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid #10b981;
}

/* スクロールアニメーション */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tooltip-content {
        min-width: 240px;
        max-width: calc(100vw - 2rem);
        left: 50%;
        transform: translateX(-50%);
    }

    .tooltip-content::before {
        left: 50%;
    }

    .practice-checklist,
    .comprehension-quiz {
        padding: 1.5rem;
    }

    .checklist-item {
        padding: 0.75rem;
    }
}