/* ========================================
   非公式バナー
   ======================================== */

.unofficial-banner {
    background: #fff3e0;
    border-bottom: 1px solid #ffe0b2;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #e65100;
    text-align: center;
}

.unofficial-banner a {
    color: #2d6a4f;
    font-weight: bold;
    text-decoration: underline;
}

/* ========================================
   グローバルスタイル
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   ヘッダー
   ======================================== */

.header {
    background: #ffffff;
    border-bottom: 3px solid #2d6a4f;
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: #2d6a4f;
    border-bottom-color: #2d6a4f;
}

/* ========================================
   ヒーロー セクション
   ======================================== */

.hero {
    background: #ffffff;
    color: #333;
    padding: 4rem 0;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: #2d6a4f;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 145, 108, 0.6);
}

/* ========================================
   広告スペース
   ======================================== */

.ad-space {
    background-color: #f5f5f5;
    padding: 1.5rem 0;
    text-align: center;
    margin: 2rem 0;
    border: 2px dashed #cccccc;
}

.ad-placeholder {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* ========================================
   説明セクション
   ======================================== */

.intro {
    padding: 3rem 0;
    background-color: white;
}

.intro h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.intro > .container > p {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #2d6a4f;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(45, 106, 79, 0.15);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2d6a4f;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ========================================
   メニューセクション
   ======================================== */

.menu {
    padding: 3rem 0;
    background-color: #ffffff;
}

.menu h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.menu-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    border: 2px solid #2d6a4f;
    border-top: 4px solid #2d6a4f;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(45, 106, 79, 0.2);
    border-top-color: #40916c;
}

.menu-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2d6a4f;
}

.menu-item p {
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   フッター
   ======================================== */

.footer {
    background: #f5f5f5;
    color: #333;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
    border-top: 3px solid #2d6a4f;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #666;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #2d6a4f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #1b4332;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    color: #999;
    font-size: 0.85rem;
}

/* ========================================
   レスポンシブ デザイン
   ======================================== */

/* タブレット対応 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .intro h2,
    .menu h2 {
        font-size: 1.5rem;
    }

    .features {
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .menu-item {
        padding: 1.5rem;
    }
}

/* スマートフォン対応 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.1rem;
    }

    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav a {
        padding: 0.3rem 0;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
    }

    .intro h2,
    .menu h2 {
        font-size: 1.2rem;
    }

    .intro > .container > p {
        font-size: 0.95rem;
    }

    .features,
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card,
    .menu-item {
        padding: 1.2rem;
    }

    .feature-card h3,
    .menu-item h3 {
        font-size: 1.1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .search-history-grid {
        grid-template-columns: 1fr;
    }

    .quiz-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .category-filter {
        flex-direction: column;
    }
}

/* ========================================
   検索履歴セクション
   ======================================== */

.search-history {
    padding: 3rem 0;
    background-color: #f9f9f9;
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
}

.search-history h2 {
    font-size: 1.8rem;
    color: #333;
    text-align: center;
    margin-bottom: 1rem;
}

.search-history-lead {
    text-align: center;
    color: #333;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.search-history-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.search-history-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    border-top: 4px solid #2d6a4f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-history-number {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: #2d6a4f;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.search-history-card h3 {
    color: #333;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.search-history-card p {
    color: #555;
    font-size: 0.95rem;
}

.search-history-highlight {
    background: #ffffff;
    border-left: 4px solid #2d6a4f;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.search-history-highlight p {
    color: #333;
    font-size: 1.05rem;
}

.search-history-highlight strong {
    color: #2d6a4f;
}

/* ========================================
   練習問題ページ
   ======================================== */

.practice-controls {
    padding: 2rem 0;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-filter label {
    font-weight: bold;
    color: #333;
}

.category-filter select {
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background: #fff;
    min-width: 200px;
}

.category-filter select:focus {
    outline: none;
    border-color: #2d6a4f;
}

.practice-stats {
    margin-top: 1rem;
    color: #666;
    font-size: 0.95rem;
    display: flex;
    gap: 2rem;
}

.quiz-area {
    padding: 2rem 0;
    min-height: 400px;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-placeholder {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
    padding: 4rem 0;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quiz-progress {
    font-weight: bold;
    color: #2d6a4f;
    font-size: 1rem;
}

.quiz-category {
    color: #666;
    font-size: 0.9rem;
}

.quiz-difficulty {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.diff-1 { background: #e8f5e9; color: #2e7d32; }
.diff-2 { background: #e3f2fd; color: #1565c0; }
.diff-3 { background: #fff3e0; color: #e65100; }
.diff-4 { background: #fce4ec; color: #c62828; }

.quiz-question {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2d6a4f;
}

.quiz-question p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}

.option-btn:hover:not(:disabled) {
    border-color: #2d6a4f;
    background: #f0faf4;
}

.option-btn:disabled {
    cursor: default;
}

.option-btn.correct {
    border-color: #2d6a4f;
    background: #e8f5e9;
}

.option-btn.incorrect {
    border-color: #c62828;
    background: #fce4ec;
}

.option-label {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: #e0e0e0;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.correct .option-label {
    background: #2d6a4f;
    color: white;
}

.incorrect .option-label {
    background: #c62828;
    color: white;
}

.quiz-explanation {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.explanation-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.correct-label {
    color: #2d6a4f;
}

.incorrect-label {
    color: #c62828;
}

.explanation-text {
    color: #333;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.next-btn {
    background: #2d6a4f;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.next-btn:hover {
    background: #1b4332;
}

/* 結果表示 */
.quiz-result {
    text-align: center;
    padding: 3rem 0;
}

.quiz-result h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.result-score {
    font-size: 3rem;
    font-weight: bold;
    color: #2d6a4f;
    margin-bottom: 0.5rem;
}

.result-percent {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.result-message {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 2rem;
}

