body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}
h1 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.container {
    margin-top: 20px;
}
.input-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.target-display {
    font-size: 24px;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.target-display .reading {
    font-size: 16px;
    color: #666;
    margin-top: 5px;
}
.input-area {
    margin-bottom: 20px;
}
.input-display {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    margin-bottom: 10px;
    min-height: 20px;
    display: none;
}

.message-display {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    margin-bottom: 10px;
    min-height: 20px;
    height: 20px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}
.button-group {
    display: none;
    gap: 10px;
    margin-bottom: 15px;
}
button {
    background-color: #589147;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #c2dde2c0;
}
button.secondary {
    background-color: #5c6bc0;
}
button.secondary:hover {
    background-color: #3f51b5;
}
button.danger {
    background-color: #a76d69;
}
button.danger:hover {
    background-color: #914646;
}
button.toggle-button.suspended {
    background-color: #FF9900;
}
.settings {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 6px;
}
.settings-title {
    font-weight: bold;
    margin-bottom: 10px;
}
.setting-group {
    margin-bottom: 15px;
}
.shortcuts {
    background-color: #e3f2fd;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 15px;
}
.shortcuts h3 {
    margin-top: 0;
    font-size: 16px;
}
.shortcuts ul {
    columns: 2;
    margin: 0;
    padding-left: 20px;
}
.dictionary-upload {
    margin-top: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}
.problems-upload {
    margin-top: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.tab-group {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}
.tab {
    padding: 8px 16px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
}
.tab.active {
    background-color: #fff;
    border-bottom-color: #fff;
    font-weight: bold;
}

.loading-container {
    display: none;
    margin-top: 10px;
}

.loading-container.visible {
    display: block;
}

.toggle-settings-button {
    background-color: #f0f0f0;
    color: #333;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    text-align: left;
}

.toggle-icon {
    float: right;
}

/* 辞書セレクタのスタイル */
.dictionary-selector {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    height: 20px;
}

.dictionary-selector label {
    margin-right: 10px;
    font-weight: normal;
}

.dictionary-selector select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 設定ヘッダーのスタイル */
.settings-header {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
    border: 1px solid #ddd;
    margin-top: 20px;
    cursor: pointer;
}

.settings-title {
    font-weight: bold;
    margin-left: 10px;
}

.toggle-settings-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #666;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon {
    font-size: 12px;
}

/* 設定コンテナのスタイル */
.settings-container {
    display: none;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 0 0 4px 4px;
    border: 1px solid #ddd;
    border-top: none;
}

.settings-container.visible {
    display: block;
}

.dictionary-upload, .problems-upload {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

/* ファイル選択とテキスト入力のグループスタイル */
.file-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.name-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.name-input label {
    white-space: nowrap;
}

.name-input input {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 150px;
}

.footer {
    padding-top: 35px;
    color: #a0a0a0;
    font-size: 12px;
}

.footer a {
    color: #2b9ae9;
}

.footer a:visited {
    color: #2b9ae9;
}

.footer a:hover {
    color: #236391;
}

    
/* モーダル関連のスタイル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
}

.modal p {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    margin: 0 0 15px 0;
    line-height: 1.5;
    color: #747474;

}

.modal a {
    color: #34719c;
}

.modal a:visited {
    color: #34719c;
}

.modal a:hover {
    color: #3d97d8;
}

.modal-overlay.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #3f51b5;
}

.close-button:hover {
    color: #3f51b5;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e5e5e5;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    background-color: #f9fafb;
    border-radius: 0 0 8px 8px;
}

.help-button-area {
    background-color: white;
    padding: 0px;
    float: right;
}

/* コンテンツのスタイル */
.readme {
    white-space: pre-wrap;
    font-family: monospace;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .file-input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .name-input {
        width: 100%;
    }
    
    .name-input input {
        flex-grow: 1;
    }
}
