.dictionary-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 8px 0 30px;
    color: #e8eef7;
}

.dictionary-hero,
.dictionary-search-section,
.dictionary-sidebar > .ui.segment,
.term-box-style {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: linear-gradient(145deg, #17243a 0%, #111b2d 100%);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.2);
}

.dictionary-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px;
    background:
        radial-gradient(circle at 90% 10%, rgba(0, 181, 173, 0.17), transparent 34%),
        linear-gradient(145deg, #17243a 0%, #111b2d 100%);
}

.dictionary-hero__identity {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.dictionary-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(0, 181, 173, 0.34);
    border-radius: 15px;
    background: rgba(0, 181, 173, 0.12);
    color: #54d7d0;
    font-size: 19px;
}

.dictionary-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #55d5cf;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dictionary-hero h1 {
    margin: 0 0 7px;
    color: #f7fbff;
    font-size: clamp(24px, 2.2vw, 33px);
    font-weight: 750;
    line-height: 1.2;
}

.dictionary-hero p {
    margin: 0;
    color: #a9b8cb;
    font-size: 13px;
    line-height: 1.6;
}

.dictionary-hero__total {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(60, 202, 195, 0.24);
    border-radius: 999px;
    background: rgba(0, 181, 173, 0.1);
    color: #80e2dd;
    font-size: 12px;
    font-weight: 700;
}

.dictionary-search-section {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 15px;
}

.dictionary-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.dictionary-search__icon {
    position: absolute;
    left: 18px;
    z-index: 1;
    color: #8294ac;
    font-size: 17px;
    pointer-events: none;
}

.dictionary-search .searchTerm {
    width: 100%;
    min-width: 0;
    height: 54px;
    margin: 0;
    padding: 0 58px 0 48px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    outline: none;
    background: #0e1929;
    color: #f4f7fb;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dictionary-search .searchTerm::placeholder {
    color: #7889a0;
}

.dictionary-search .searchTerm:focus {
    border-color: #3ccac3;
    box-shadow: 0 0 0 3px rgba(60, 202, 195, 0.12);
}

.dictionary-search .searchButton {
    position: absolute;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #12b8b0, #079cba);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.dictionary-search .searchButton:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.dictionary-search-status {
    min-height: 16px;
    margin: 8px 4px 0;
    color: #fbbf69;
    font-size: 11px;
}

.dictionary-search .ui-autocomplete {
    z-index: 2000;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: #101b2c;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.4);
}

.dictionary-search .ui-menu-item-wrapper {
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    color: #dce5f1;
    font-size: 13px;
}

.dictionary-search .ui-menu-item-wrapper.ui-state-active {
    margin: 0;
    background: rgba(0, 181, 173, 0.15);
    color: #75e1db;
}

.dictionary-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

.dictionary-section-heading::before,
.dictionary-section-heading::after,
.dictionary-content-row::before,
.dictionary-content-row::after {
    display: none !important;
    content: none !important;
}

.dictionary-section-heading > .term-style {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
}

.dictionary-section-heading h2 {
    margin: 0;
    color: #f4f7fb;
    font-size: 18px;
    font-weight: 700;
}

.dictionary-section-heading__count {
    color: #8ea0b8;
    font-size: 12px;
}

.dictionary-content-row {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.8fr) minmax(210px, 0.8fr);
    align-items: start;
    gap: 16px;
    margin: 0;
}

.dictionary-content-row > .dictionary-sidebar,
.dictionary-content-row > .dictionary-results {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
}

.dictionary-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dictionary-sidebar > .ui.segment,
.dictionary-results .dictionary-other-heading {
    margin: 0;
    padding: 17px;
    border-color: rgba(148, 163, 184, 0.16) !important;
    background: linear-gradient(145deg, #17243a 0%, #111b2d 100%) !important;
    color: #e8eef7;
}

.dictionary-sidebar .box-header,
.dictionary-results .box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.dictionary-sidebar .box-header > .ui.ribbon.label,
.dictionary-results .box-header > .ui.ribbon.label {
    display: none;
}

.dictionary-sidebar .box-title,
.dictionary-results .box-title {
    margin: 0;
    color: #f1f5fb;
    font-size: 14px;
    font-weight: 700;
}

.dictionary-sidebar .latest_post_container {
    margin-top: 7px;
}

.dictionary-sidebar .latest_postnav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dictionary-sidebar .latest_postnav li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.11);
}

.dictionary-sidebar .latest_postnav li:last-child {
    border-bottom: 0;
}

.dictionary-sidebar .latest_postnav a {
    color: #aebdd0 !important;
    font-size: 12px;
    line-height: 1.5;
    transition: color 0.18s ease;
}

.dictionary-sidebar .latest_postnav a:hover {
    color: #69dcd6 !important;
}

.dictionary-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.term-box-style {
    margin: 0 0 12px;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 16px;
    background: linear-gradient(145deg, #17243a 0%, #111b2d 100%) !important;
    color: #b5c2d3;
    font-size: 13px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.term-box-style h2 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.term-box-style h2 a {
    color: #69dcd6 !important;
}

.term-box-style h2 a:hover {
    color: #a2f1ec !important;
}

.dictionary-term-definition {
    color: #b5c2d3;
}

.dictionary-other-heading {
    margin: 10px 0 0 !important;
}

.dictionary-pagination {
    display: flex;
    justify-content: center;
    margin: 8px 0 16px;
}

.dictionary-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    float: none;
    margin: 0;
    padding: 0;
}

.dictionary-pagination .pagination > li > a,
.dictionary-pagination .pagination > li > span {
    min-width: 36px;
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 9px;
    background: #142137;
    color: #b8c5d6;
}

.dictionary-pagination .pagination > .active > span {
    border-color: rgba(60, 202, 195, 0.4);
    background: rgba(0, 181, 173, 0.16);
    color: #7de1db;
}

.dictionary-pagination .pagination > li > a:hover {
    border-color: rgba(60, 202, 195, 0.4);
    background: rgba(0, 181, 173, 0.1);
    color: #7de1db;
}

@media (max-width: 1100px) {
    .dictionary-content-row {
        grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.6fr);
    }

    .dictionary-content-row > .dictionary-sidebar:last-of-type {
        grid-column: 1 / -1;
    }

    .dictionary-content-row > .dictionary-sidebar:last-of-type .latest_postnav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 18px;
    }
}

@media (max-width: 720px) {
    .dictionary-page {
        gap: 13px;
        padding: 2px 0 22px;
    }

    .dictionary-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .dictionary-hero__identity {
        gap: 12px;
    }

    .dictionary-hero__icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .dictionary-hero__total {
        align-self: flex-start;
    }

    .dictionary-search-section {
        padding: 11px;
    }

    .dictionary-search .searchTerm {
        height: 48px;
        font-size: 13px;
    }

    .dictionary-content-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .dictionary-content-row > .dictionary-sidebar:last-of-type {
        grid-column: auto;
    }

    .dictionary-content-row > .dictionary-sidebar:last-of-type .latest_postnav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .term-box-style {
        padding: 15px;
        font-size: 12px;
    }
}
