/* ヒノトレ カスタムCSS */

/* カラーテーマ */
:root {
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dark: #6d28d9;
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --primary-900: #4c1d95;
    --accent: #6366f1;
    --bg: #faf8ff;
}

body {
    background-color: var(--bg);
    font-feature-settings: "palt";
}

/* ナビゲーション */
.nav-link.active {
    border-bottom: 2px solid var(--primary);
    color: var(--primary-700);
}

/* カード */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* タブ */
.tab-btn {
    transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active {
    color: var(--primary-700);
    border-bottom: 3px solid var(--primary);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* SVG タイマー */
.timer-ring {
    transition: stroke-dashoffset 0.1s linear;
}

.timer-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
}

/* ヒント表示アニメーション */
.hint-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}
.hint-panel.show {
    max-height: 300px;
    opacity: 1;
}

/* プログレスバー */
.progress-fill {
    transition: width 0.6s ease;
}

/* ストリークバッジ */
@keyframes streak-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.streak-pulse {
    animation: streak-pulse 2s ease-in-out infinite;
}

/* 完了チェックマーク */
@keyframes check-pop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.check-pop {
    animation: check-pop 0.3s ease forwards;
}

/* お題カード */
.prompt-card {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ストリークカレンダー */
.streak-day {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    transition: background-color 0.2s;
}
.streak-day.active {
    background-color: var(--primary);
}
.streak-day.inactive {
    background-color: #e5e7eb;
}
.streak-day.today {
    outline: 2px solid var(--primary-dark);
    outline-offset: 1px;
}

/* ヒーロー背景パターン */
.hero-pattern {
    background-image: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                      radial-gradient(circle at 60% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
}

/* レスポンシブ */
@media (max-width: 640px) {
    .timer-container {
        width: 180px;
        height: 180px;
    }
    .timer-text {
        font-size: 2rem;
    }
}

/* 広告ユニット */
.ad-unit {
    min-height: 90px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}
.ad-unit .adsbygoogle {
    display: block;
    width: 100%;
}

/* コンテンツ内のスタイリング */
.lesson-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5b21b6;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ede9fe;
}
.lesson-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6d28d9;
    margin: 1.5rem 0 0.75rem;
}
.lesson-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.25rem 0 0.5rem;
}
.lesson-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #374151;
}
.lesson-content ul, .lesson-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
    color: #374151;
}
.lesson-content li {
    line-height: 1.8;
    margin-bottom: 0.25rem;
}
.lesson-content strong {
    color: #5b21b6;
}
.lesson-content blockquote {
    border-left: 4px solid #8b5cf6;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: #f5f3ff;
    border-radius: 0 8px 8px 0;
    color: #5b21b6;
}
.lesson-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.lesson-content th {
    background: #f5f3ff;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border: 1px solid #ede9fe;
    font-weight: 600;
    color: #5b21b6;
}
.lesson-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
}
.lesson-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* ============ ガイド記事用スタイル ============ */
.guide-content {
    font-size: 1.05rem;
    line-height: 1.95;
    color: #1f2937;
}
.guide-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ede9fe;
}
.guide-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #5b21b6;
    margin: 2rem 0 0.75rem;
}
.guide-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.5rem;
}
.guide-content p {
    margin: 0.9rem 0;
}
.guide-content ul, .guide-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}
.guide-content li {
    margin: 0.4rem 0;
}
.guide-content blockquote {
    border-left: 4px solid #8b5cf6;
    background: #f5f3ff;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: normal;
    color: #5b21b6;
}
.guide-content blockquote p {
    margin: 0.3rem 0;
}
.guide-content strong {
    color: #111827;
    font-weight: 600;
}
.guide-content .insight-box {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.guide-content .insight-box .insight-title {
    font-weight: 700;
    color: #6d28d9;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.guide-content .example-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.guide-content .example-box .example-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.guide-content th {
    background: #f5f3ff;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ede9fe;
    font-weight: 600;
    text-align: left;
}
.guide-content td {
    padding: 0.6rem 0.75rem;
    border: 1px solid #e5e7eb;
}
.guide-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2.5rem 0;
}
.guide-content .toc {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.guide-content .toc-title {
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.guide-content .toc ol {
    padding-left: 1.25rem;
    margin: 0;
}
.guide-content .toc li {
    margin: 0.35rem 0;
    font-size: 0.9rem;
}
.guide-content .toc a {
    color: #7c3aed;
    text-decoration: none;
}
.guide-content .toc a:hover {
    text-decoration: underline;
}
