* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

*:not(i) {
    font-family: "Poppins", sans-serif;
}

body {
    background-color: #8eb4ed;
    color: #2d3436;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dictionary-entry {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px;
    margin: 24px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.dictionary-entry:hover {
    transform: translateY(-2px);
}

.entry-header {
    border-bottom: 2px solid #6c5ce7;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.word-title {
    font-size: 2.4em;
    color: #2d3436;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 25px;
}

.word-part {
    font-size: 0.4em;
    color: #666;
    font-style: italic;
}

.part-of-speech {
    font-size: 0.875rem;
}

.subanen-word {
    font-size: 1.8em;
    color: #2d3436;
    font-style: italic;
    margin-bottom: 12px;
}

.entry-content {
    display: grid;
    grid-gap: 20px;
}

.entry-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.entry-section:hover {
    background-color: #f0f0f0;
}

.example-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border-left: 4px solid #6c5ce7;
}

.section-label {
    font-weight: 600;
    color: #6c5ce7;
    text-transform: uppercase;
    font-size: 0.9em;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.section-content {
    color: #2d3436;
    line-height: 1.8;
    padding-left: 15px;
    border-left: 3px solid #6c5ce7;
}

.container {
    background-color: #ffffff;
    width: 90vmin;
    max-width: 800px;
    position: relative;
    padding: 80px 40px;
    margin: 100px auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: auto;
    z-index: 1000;
}

.logo img {
    width: 150px;
    height: auto;
    display: block;
}

.signature {
    position: fixed;
    bottom: 25px;
    left: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    z-index: 1000;
    background-color: transparent;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.1)
    );
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.signature p {
    margin: 5px 0;
    transition: all 0.3s ease;
}

.signature p:hover {
    transform: translateX(5px);
    color: white;
}

.search-box {
    width: 100%;
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    color: #2d3436;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.search-box button {
    padding: 12px 30px;
    background-color: #6c5ce7;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #5b4cc4;
    transform: translateY(-2px);
}

.result {
    position: relative;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.result::-webkit-scrollbar {
    width: 8px;
}

.result::-webkit-scrollbar-track {
    background: #f5f7fa;
    border-radius: 10px;
}

.result::-webkit-scrollbar-thumb {
    background-color: #6c5ce7;
    border-radius: 10px;
}

.error {
    text-align: center;
    color: #6c5ce7;
    font-size: 18px;
    margin: 40px 0;
}

.suggestion {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f5f7fa;
    border-radius: 20px;
    color: #6c5ce7;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    margin: 5px;
}

.suggestion:hover {
    background-color: #6c5ce7;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.suggestions-container {
    text-align: center;
    margin: 30px 0;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.reference {
    font-size: 0.85em;
    color: #888;
    margin-top: 15px;
}

.patterns-strip {
    position: fixed;
    bottom: 25px;
    right: 30px;
    width: 200px;
    height: auto;
    opacity: 0.9;
    z-index: 1000;
    background-color: transparent;
    padding: 15px;
    display: flex;
    align-items: flex-end;
}

.patterns-strip img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo img {
    max-width: 100%;
    height: auto;
}

.translation-block {
    font-style: italic;
    color: #444;
    font-size: 1.1em;
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.gloss-block {
    font-size: 1.6em;
    color: #2d3436;
    margin: 25px 0;
}

.section-block {
    margin: 25px 0;
}

.section-title {
    font-weight: 600;
    color: #6c5ce7;
    text-transform: uppercase;
    font-size: 0.9em;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.example-block {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid #6c5ce7;
}

.example-text {
    margin: 15px 0;
    white-space: pre-line;
    line-height: 2;
    font-size: 1.1em;
    color: #2d3436;
    padding: 10px 0;
}

.example-item + .example-item {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(108, 92, 231, 0.1);
}

.reference-block {
    font-size: 0.85em;
    color: #888;
    margin-top: 25px;
    font-style: italic;
}

.contribute-block {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin: 25px 0;
    border: 2px dashed #6c5ce7;
}

.contribute-block p {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.contribute-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #6c5ce7;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contribute-link:hover {
    background-color: #5b4cc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.contribute-link i {
    font-size: 1.1em;
}

@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        padding: 20px;
        align-items: center;
    }

    .logo {
        position: fixed;
        top: 20px;
        left: 20px;
        width: auto;
        z-index: 1000;
    }

    .container {
        position: static;
        width: 90%;
        padding: 30px 20px;
        margin: 100px auto 0;
        order: 2;
    }

    .patterns-strip {
        position: static;
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 30px auto;
        order: 3;
    }

    .patterns-strip img {
        width: 200px;
    }

    .signature {
        position: static;
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin: 0 auto 30px;
        order: 4;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-box input,
    .search-box button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px 15px;
    }

    .logo img {
        width: 80px;
    }

    .patterns-strip img {
        width: 150px;
    }

    .signature {
        font-size: 12px;
        padding: 12px;
    }

    .dictionary-entry {
        padding: 20px;
    }

    .word-title {
        font-size: 1.5em;
    }
}

:root {
    --primary-color: #6c5ce7;
    --background-color: #8eb4ed;
    --text-color: #2d3436;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

.dictionary-entry *:contains('Not Found') {
    display: none !important;
}

.section-content:empty,
.section-content:contains("Not Found"),
.section-block:empty {
    display: none !important;
}

.section-title + .section-content:empty,
.section-title + .section-content:contains("Not Found") {
    display: none !important;
}

/* Hide the entire section-block if it only contains "Not Found" content */
.section-block:only-child:contains("Not Found") {
    display: none !important;
}

.related-words-section {
    margin-top: 40px;
    border-top: 2px solid #eee;
    padding-top: 20px;
}

.related-title {
    color: #6c5ce7;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.related-entry {
    margin: 10px 0;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.related-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.related-content {
    display: none;
}

.related-entry.expanded .related-content {
    display: block;
}

.related-entry.expanded .fa-chevron-down {
    transform: rotate(180deg);
}

.related-word {
    font-weight: 500;
    color: #2d3436;
}

/* Add responsive styles */
@media (max-width: 1024px) {
    .logo {
        width: 150px;
    }
    
    .patterns-strip {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .logo {
        position: relative;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        margin-bottom: 30px;
    }

    .signature {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        text-align: center;
        margin-top: 30px;
    }

    .patterns-strip {
        position: relative;
        bottom: auto;
        right: auto;
        width: 120px;
        margin: 20px auto;
        justify-content: center;
    }

    .container {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 100px;
    }

    .signature {
        font-size: 12px;
        padding: 10px;
    }

    .patterns-strip {
        width: 100px;
    }
}