
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #eee;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    scrollbar-gutter: stable;
    padding-right: 17px;
    overflow-y: scroll;
}

.container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    box-sizing: border-box;
    padding: 20px;
    margin: 10px;
    min-width: 660px;
    display: flex;
    gap: 12px;
    flex-direction: column;
    max-width: 660px;
}

.top {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0px;
    margin: 0px;
    height: 55px;
    max-width: 100%;
    overflow: clip;
}

.logo {
    height: 50px;
    min-width: 120px;
    cursor: pointer;
    flex-shrink: 1;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 600;
}

.search-box {
    min-width: 100px;
    align-items: center;
    justify-content: center;
}

#searchInput {
    max-width: 400px;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    outline: none;
    height: 30px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#searchInput:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#searchButton {
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    height: 54px;
    min-width: 100px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#searchButton:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#searchButton:active {
    transform: translateY(0);
}

.results-container {
    min-height: 100px;
}

.dictionary-entry {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dictionary-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dictionary-entry h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8em;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.dictionary-entry .meaning {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.dictionary-entry .example {
    color: #777;
    font-style: italic;
    margin-left: 15px;
    border-left: 3px solid #ced4da;
    padding-left: 10px;
    font-size: 0.95em;
}


h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-weight: 600;
    color: #505760;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6c757d;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

/* Utility / Helper Classes */
.sub-title {
    font-size: 0.8em;
    color: #6c757d;
}

/* Header Section */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

h1 {
    margin: auto;
    color: #04b;
    font-size: 48px;
    font-weight: 740;
}

.pronounce-section {
    margin: auto;
    color: #888;
    display: flex;
    justify-content: center;
}

.priority-box {
    display: flex;
    align-itms: center;
    justify-content: center;
}
.priority {
    font-size: 1.5rem;
    color: #ffc107; /* yellow */
}
.syllable {
    margin-left: 8px;
}

/* Pronunciation */
.ipa {
    font-family: 'Charis SIL', 'DejaVu Sans', sans-serif; /* IPA characters font */
}

.definition-box {
}

.definition-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.definition-list dt {
    font-weight: bold;
    float: left;
    width: 120px;
    margin-bottom: 10px;
}

.definition-list dd {
    margin-left: 140px;
    margin-bottom: 10px;
}

/* Meanings Section */
.meaning-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.meaning-card .meaning-title {
    background: linear-gradient(90deg,rgba(3, 0, 184, 1) 0%, rgba(4, 0, 255, 1) 100%);
    cursor: pointer;
    color: #fff;
    padding-left: 12px;
    padding-right: 12px;
    margin-top: 0;
    margin-bottom: 0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meaning-title:hover {
    filter: brightness(150%);
    background: linear-gradient(90deg,rgba(20, 20, 224, 1) 0%, rgba(25, 30, 255, 1) 100%);
}

.meaning-card .meaning-title.expand {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.number {
    padding: 4px;
}

.part-of-speech {
    background-color: #0c80b0;
    color: #fff;
    padding: 0px 4px;
    border-radius: 5px;
    font-size: 0.9em;
    min-width: 30px;
}

.svg-box {
    margin: 10px;
}

.transitivity-badge {
    background-color: #6c85fd;
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-left: 10px;
}

.meaning-content {
    max-height: 0;
    opacity: 0;
    padding: 0px;
    padding-left: 10px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.content {
    margin-top: 16px;
    margin-bottom: 16px;
}

.meaning-content.visible {
    max-height: 10000px;
    padding-left: 10px;
    padding-right: 10px;
    opacity: 1;
}

.definition-group {
    margin-bottom: 15px;
}

.definition-jp {
    font-weight: bold;
}

.english-definition {
    color: #555;
    margin: 8px;
}

.example-list {
    list-style: none;
    padding: 0;
    margin-left: 20px;
    border-left: 3px solid #0dcaf0; /* cyan */
    padding-left: 10px;
}

.example-item {
    margin-bottom: 8px;
}

.example-item .sentence {
    font-style: italic;
    color: #495057;
    margin-bottom: 2px;
}

.example-item .translation {
    font-size: 0.95rem;
    color: #6c757d;
    margin-top: 0;
}

.related-terms-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.related-column{ 
    flex: 1 1 calc(33.333% - 20px / 3 * 2); /* 3カラムにするための計算 */
}

.simple-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.simple-list li {
    margin-bottom: 5px;
}

.note-box, .readability-explanation {
    background-color: #e9ecef; /* light gray */
    border-left: 5px solid #6c757d; /* dark gray border */
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.readability-explanation {
    background-color: #f0f8ff; /* light blue */
    border: 1px solid #cce5ff;
}

.readability-level {
    margin-bottom: 10px;
    font-weight: bold;
}

/* Common Mistakes */
.mistake-item {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #fff;
}

.incorrect-example {
    color: #dc3545; /* red */
    font-weight: bold;
}

.correct-example {
    color: #198754; /* green */
    font-weight: bold;
}

.note-text {
    font-size: 0.95rem;
    color: #6c757d;
    margin-top: 10px;
}

/* Additional Example Sentences */
.additional-example-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.additional-example-item {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #fcfcfc;
}

.additional-example-item .sentence {
    margin-bottom: 5px;
}

.additional-example-item .translation {
    font-style: italic;
    color: #555;
    margin-bottom: 10px;
}

.meta-info {
    font-size: 0.85rem;
    color: #777;
    text-align: right;
    margin-top: 10px;
}

.badge {
    background-color: #6c757d;
    color: #fff;
    padding: 3px 7px;
    border-radius: 3px;
    font-size: 0.8em;
    white-space: nowrap;
}

.suggestions-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.suggestions-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #333;
}

.word-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-tag {
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    background-color: #e0f0ff;
    color: #0066cc;
    border-radius: 999px;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
}

.word-tag:hover {
    background-color: #cce4ff;
    color: #004b99;
}

.list-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 0px;
    min-height: 100vh;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.word-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 660px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* 角丸を有効にするため */
    background-color: #ffffff;
}

.word-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    gap: 20px;
    border-bottom: 1px solid #e6e9ed;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.word-list li:last-child {
    border-bottom: none;
}

.word-list li:nth-child(odd) {
    background-color: #f8f9fa;
}

.word-list li:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    cursor: pointer;
}

.word-link {
    font-size: 0.9em;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.word-entry:hover {
    color: #0056b3;
    text-decoration: underline;
}

.word-translation {
    font-size: 1em;
    color: #555;
}



@media (max-width: 480px) {
    .container {
	margin: 4px 4px;
	padding: 10px;
	min-width: 90%;
	max-width: 100%;
    }
    h1 {
	font-size: 2.2rem;
    }
    h2 {
	font-size: 1.8rem;
    }
    h3 {
	font-size: 1.3rem;
    }
    h4 {
	font-size: 1.1rem;
    }
    .header-section {
	flex-direction: column;
	align-items: flex-start;
    }
    .priority {
	margin-top: 10px;
	font-size: 1.2rem;
    }
    .related-terms-group {
	flex-direction: column;
	gap: 15px;
    }
    .section {
	min-height: 30px;
    }
    .meaning-tile {
	height: 
    }
    .related-column {
	min-width: unset; /* Remove min-width for small screens */
	width: 100%;
    }

    .top {
	height: 50px;
	overflow: hidden;
    }
    .list-container {
        padding: 0px;
	height: 20px;
    }
    .logo {
	width: 90px;
	height: auto;
	min-width: 90px;
	transform: scale(1);
	position: relative;e
    }
    #searchInput {
	height: 20px;
	width: 120px;
    }
    #searchButton {
	min-width: 50px;
	width: 50px;
	height: 45px;
	padding: 0px;
	font: 0.4em;
    }
    .word-list li {
        padding: 8px;
    }
    .word-link {
        font-size: 0.7em;
    }
    .word-translation {
        font-size: 0.6em;
    }
}
