/* ======================================================================= */
/* DICTIONARY PAGE STYLES - dictionary.css */
/* Koodi яскравий стиль */
/* ======================================================================= */

/* ======================================================================= */
/* MAIN LAYOUT */
/* ======================================================================= */

.dictionary-main {
    padding-top: 40px;
    padding-bottom: 60px;
    min-height: 100vh;
    background-color: var(--bg);
}

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

/* ======================================================================= */
/* HERO SECTION */
/* ======================================================================= */

.dict-hero {
    text-align: center;
    padding: 60px 0;
}

.dict-hero-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: var(--lime);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: var(--black);
    border: 3px solid var(--black);
    box-shadow: 6px 6px 0px var(--black);
}

.dict-hero-title {
    font-size: 3em;
    font-weight: 900;
    color: var(--black);
    margin: 0 0 15px 0;
}

.dict-hero-subtitle {
    font-size: 1.3em;
    color: var(--darkgray);
    margin: 0 0 40px 0;
    font-weight: 500;
}

/* Search */
.dict-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.dict-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--darkgray);
    font-size: 1.1em;
}

.dict-search input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border-radius: 15px;
    border: 3px solid var(--black);
    font-size: 1.1em;
    font-family: inherit;
    background: var(--white);
    box-shadow: 5px 5px 0px var(--black);
    transition: all 0.2s ease;
}

.dict-search input:focus {
    outline: none;
    box-shadow: 7px 7px 0px var(--black);
    transform: translate(-2px, -2px);
}

.dict-search input::placeholder {
    color: var(--darkgray);
}

/* ======================================================================= */
/* LANGUAGE TABS */
/* ======================================================================= */

.dict-tabs-section {
    margin-bottom: 40px;
}

.dict-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.dict-lang-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 15px;
    border: 3px solid var(--black);
    background: var(--white);
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 4px 4px 0px var(--black);
}

.dict-lang-tab:hover {
    box-shadow: 6px 6px 0px var(--black);
    transform: translate(-2px, -2px);
}

.dict-lang-tab.active {
    background: var(--lime);
}

.tab-icon {
    font-size: 1.3em;
}

.tab-name {
    color: var(--black);
}

/* Language-specific active colors */
.dict-lang-tab[data-lang="html"].active {
    background: #E44D26;
}
.dict-lang-tab[data-lang="html"].active .tab-name {
    color: white;
}

.dict-lang-tab[data-lang="css"].active {
    background: #264de4;
}
.dict-lang-tab[data-lang="css"].active .tab-name {
    color: white;
}

.dict-lang-tab[data-lang="javascript"].active {
    background: #F7DF1E;
}

.dict-lang-tab[data-lang="react"].active {
    background: #61DAFB;
}

.dict-lang-tab[data-lang="python"].active {
    background: #3776AB;
}
.dict-lang-tab[data-lang="python"].active .tab-name {
    color: white;
}

.dict-lang-tab[data-lang="nodejs"].active {
    background: #68A063;
}
.dict-lang-tab[data-lang="nodejs"].active .tab-name {
    color: white;
}

.dict-lang-tab[data-lang="git"].active {
    background: #F05032;
}
.dict-lang-tab[data-lang="git"].active .tab-name {
    color: white;
}

.dict-lang-tab[data-lang="general"].active {
    background: var(--pink);
}
.dict-lang-tab[data-lang="general"].active .tab-name {
    color: white;
}

/* ======================================================================= */
/* TERMS COUNT */
/* ======================================================================= */

.dict-terms-count {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
    color: var(--darkgray);
    font-weight: 500;
}

.dict-terms-count span {
    color: var(--black);
    font-weight: 700;
}

/* ======================================================================= */
/* TERMS GRID - Яскраві картки! */
/* ======================================================================= */

.dict-terms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.dict-term-card {
    background: var(--white);
    border-radius: 20px;
    border: 4px solid;
    overflow: hidden;
    transition: all 0.2s ease;
}

.dict-term-card:hover {
    transform: translate(-4px, -4px);
}

.dict-term-header {
    padding: 18px 25px;
    border-bottom: 3px solid var(--black);
}

.dict-term-title {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--black);
    display: block;
}

.dict-term-body {
    padding: 20px 25px;
}

.dict-term-text {
    font-size: 1.1em;
    color: var(--black);
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

/* Dictionary Code Examples */
.dict-example {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 2px dashed rgba(0,0,0,0.15);
}

.dict-example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dict-example-label {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--black);
}

/* Copy Button */
.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid var(--black);
    background: var(--lime);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 3px 3px 0px var(--black);
}

.copy-btn:hover {
    box-shadow: 4px 4px 0px var(--black);
    transform: translate(-1px, -1px);
}

.copy-btn:active {
    box-shadow: 1px 1px 0px var(--black);
    transform: translate(2px, 2px);
}

.copy-btn.copied {
    background: #4CAF50;
    color: white;
}

.copy-btn i {
    font-size: 1em;
}

.copy-text {
    color: var(--black);
}

.copy-btn.copied .copy-text {
    color: white;
}

.dict-example pre {
    margin: 0;
    background: #1e1e1e;
    border-radius: 15px;
    padding: 18px;
    overflow-x: auto;
    border: 3px solid var(--black);
    box-shadow: 4px 4px 0px var(--black);
}

.dict-example code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #9cdcfe;
    white-space: pre;
    line-height: 1.6;
}

/* No results */
.dict-no-results {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 25px;
    border: 4px dashed var(--lime);
    grid-column: 1 / -1;
}

.no-results-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.dict-no-results h3 {
    font-size: 1.8em;
    color: var(--black);
    margin: 0 0 10px 0;
    font-weight: 800;
}

.dict-no-results p {
    color: var(--darkgray);
    font-size: 1.2em;
}

/* ======================================================================= */
/* RESPONSIVE */
/* ======================================================================= */

@media (max-width: 992px) {
    .dictionary-container {
        padding: 0 30px;
    }

    .dict-hero-title {
        font-size: 2.5em;
    }

    .dict-tabs {
        gap: 10px;
    }

    .dict-lang-tab {
        padding: 12px 18px;
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    .dictionary-container {
        padding: 0 20px;
    }

    .dict-hero {
        padding: 40px 0;
    }

    .dict-hero-icon {
        width: 80px;
        height: 80px;
        font-size: 2em;
    }

    .dict-hero-title {
        font-size: 2em;
    }

    .dict-hero-subtitle {
        font-size: 1.1em;
    }

    .dict-search input {
        padding: 15px 15px 15px 50px;
        font-size: 1em;
    }

    .dict-tabs {
        gap: 8px;
    }

    .dict-lang-tab {
        padding: 10px 14px;
        font-size: 0.85em;
        gap: 6px;
    }

    .tab-icon {
        font-size: 1.1em;
    }

    .dict-terms-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dict-term-card {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .dict-hero-title {
        font-size: 1.7em;
    }

    .dict-lang-tab {
        padding: 8px 12px;
        font-size: 0.8em;
        border-width: 2px;
        box-shadow: 3px 3px 0px var(--black);
    }

    .dict-term-card {
        padding: 18px;
        border-radius: 15px;
    }

    .dict-term-code {
        padding: 6px 12px;
        font-size: 0.95em;
    }
}
