/* 学習分野カードのスタイル */
.subject-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.subject-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #e0f0ff;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-color: #4dc0e6;
}

.subject-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f5f5f5;
}

.card-icon {
    font-size: 2.5rem;
    color: #4dc0e6;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.5rem;
    color: #0078a8;
    margin-bottom: 10px;
}

.card-description {
    color: #666;
    margin-bottom: 15px;
}

.card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.subject-card.disabled .card-tag {
    background: #999;
}

/* フォントサイズ調整機能 */
.english-container {
    --font-scale: 1.0;
    --container-width: 1200px;
}

/* フォントサイズクラス */
.font-size-small {
    --font-scale: 1.0;
    --container-width: 1200px;
}

.font-size-medium {
    --font-scale: 1.2;
    --container-width: 1320px;
}

.font-size-large {
    --font-scale: 1.5;
    --container-width: 1500px;
}

/* フォントサイズスケーリング対象 */
.verb-title {
    font-size: calc(2rem * var(--font-scale));
}

.verb-pronunciation {
    font-size: calc(1rem * var(--font-scale));
}

.form-value {
    font-size: calc(1.1rem * var(--font-scale));
}

.meaning-content {
    font-size: calc(1rem * var(--font-scale));
}

.example-sentence {
    font-size: calc(1rem * var(--font-scale));
}

.translation {
    font-size: calc(0.95rem * var(--font-scale));
}

.word-text {
    font-size: calc(1rem * var(--font-scale));
}

.word-phonetic {
    font-size: calc(0.85rem * var(--font-scale));
}

.meaning-header {
    font-size: calc(1.1rem * var(--font-scale));
}

.form-label {
    font-size: calc(0.9rem * var(--font-scale));
}

/* フォントサイズボタンのアクティブ状態 */
.font-size-btn.active-size {
    box-shadow: 0 0 0 2px #0078a8;
    transform: scale(1.05);
}

.font-size-btn {
    transition: all 0.3s ease;
    font-weight: bold;
}

.font-size-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* フォントサイズコントロールエリア */
.font-size-controls {
    border: 2px solid #e0f0ff;
    box-shadow: 0 2px 8px rgba(0, 120, 168, 0.1);
}

/* 上部コントロールエリア */
.top-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* フォントサイズ変更アニメーション */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* モバイル時のフォントサイズコントロール調整 */
@media (max-width: 768px) {
    .font-size-controls {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .font-size-controls > div:first-child {
        margin-right: 0;
        margin-bottom: 5px;
        justify-content: center;
    }
    
    .font-size-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    #current-size-display {
        margin-left: 0;
        justify-content: center;
        padding: 8px 12px;
    }
    
    /* 上部コントロールのモバイル調整 */
    .top-controls {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .top-controls > div:first-child {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .top-controls > div[style*="width: 1px"] {
        display: none;
    }
    
    .top-controls .font-size-btn {
        flex: 1;
        padding: 10px;
    }
    
    .top-controls .redsheet-button {
        width: 100%;
        padding: 12px;
    }
    
    /* モバイル時のコンテナ幅調整 */
    .font-size-small {
        --container-width: 100%;
    }
    
    .font-size-medium {
        --container-width: 100%;
    }
    
    .font-size-large {
        --container-width: 100%;
    }
}/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Meiryo', 'Hiragino Kaku Gothic Pro', sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: #f0f8ff;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(77, 192, 230, 0.2);
    padding: 20px;
    margin-bottom: 30px;
}

.title-section {
    padding-bottom: 20px;
    border-bottom: 1px solid #e0f0ff;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 24px;
    color: #0078a8;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: #0078a8;
}

.breadcrumb li {
    display: inline;
}

.breadcrumb li:not(:last-child):after {
    content: "\203A";
    margin: 0 8px;
    color: #4dc0e6;
}

.breadcrumb a {
    color: #4dc0e6;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    color: #667;
    font-size: 14px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #4dc0e6;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 8px 16px;
    background: #4dc0e6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

button:hover {
    background: #0078a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#redsheet-button, #redsheet-button-full {
    background: #FFC0CB;
    color: #006400;
}

#redsheet-button:hover, #redsheet-button-full:hover {
    background: #FFB6C1;
}

.sample-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sample-buttons button {
    background: #5cd6a8;
    font-size: 13px;
}

.sample-buttons button:hover {
    background: #3cb989;
}

.editor-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.toolbar {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 5px;
}

#text-color-black {
    background: #333;
}

#text-color-red {
    background: #e74c3c;
}

#editor {
    min-height: 300px;
    padding: 15px;
    outline: none;
    overflow-y: auto;
}

/* 赤シート関連のスタイル */
#redsheet-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;  /* 初期サイズを小さく */
    height: 30%; /* 初期サイズを小さく */
    z-index: 1000;
    display: flex; /* フレックスボックス使用 */
    flex-direction: row; /* 横並びに変更 */
    box-shadow: none; /* 影を削除 */
    border-radius: 0; /* 角丸を削除 */
    overflow: visible; /* オーバーフローを可視に変更 */
    resize: both;  /* ユーザーによるリサイズを許可 */
}

/* 赤シートを確実に表示するための追加スタイル */
#redsheet-overlay:not(.hidden) {
    display: flex !important;
}

.redsheet-controls-vertical {
    background: transparent; /* 透明に変更 */
    padding: 5px;
    display: flex;
    flex-direction: column; /* 縦並びに */
    justify-content: flex-start; /* 上部から配置 */
    width: 35px; /* 幅を少し小さくして再調整 */
}

#close-redsheet {
    background: #e74c3c;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px; /* 上部に少しスペースを追加 */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* 影を追加して目立たせる */
}

/* 赤シート関連のスタイルは english.css で管理 */

.hidden {
    display: none !important;
}

/* 赤文字スタイル */
.red-text {
    color: red !important;
}

/* 赤シートに覆われた赤文字の表示 */
.covered {
    color: white !important;
}

/* セクションスタイル */
.content-section {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.content-section h3 {
    margin-bottom: 10px;
    color: #0078a8;
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.flex-item {
    flex: 1;
    min-width: 200px;
}

.flex-item h4 {
    color: #4dc0e6;
}
