* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #ffffff;
}

h2 {
    text-align: center;
}

body {
    background: #EEE;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* header*/
header {
    width: 100%;
    background-color: #b10040
}

.nav_content {
    display: flex;
    margin: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.LW_logo {
    height: 4em;

}

ol {
    text-align: left;
    float: left;
    background: cadetblue;
}

.LW_link {
    padding: .5rem .5rem;
    order: 1;
}

.nav_right {
    order: 2;
    margin-left: auto;
}

.nav_text {
    font-family: 'Oxygen', sans-serif;
    font-size: 1rem;
}

.random_button {
    background-color: #b10040;
    border-radius: 10px;
    border: 1px solid #8e0034;
    display: inline-block;
    cursor: pointer;
    color: #ffffff;
    font-size: 28px;
    padding: 3px 16px;
    text-shadow: 0px 1px 0px #8e0034;
    margin: auto;
    margin-right: 1rem;
}

.random_button_text {
    display: none;
}

.random_button:hover {
    background-color: #8e0034;
}

.random_button:active {
    position: relative;
    top: 1px;
}

.search {
    border-radius: 20px;
    border: 1px solid #000000;
    font-size: 17px;
    padding: 10px 16px;
    text-shadow: 0px 1px 0px #2f6627;
    margin: auto;
    font-family: 'Oxygen', sans-serif;
    display: flex;
    flex: auto;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    order: 3;
}

/* alfabet */
#alfabet {
    color: #FFF;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
    top: 0;
    max-width: 100%;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.15);
    /* Tinted background */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

#alfabet::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Webkit */
}

#alfabet ul {
    margin: 0;
    padding: 0.5rem;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    /* Center by default for desktop */
}

/* On mobile, if it overflows, we want it to start from the left */
@media only screen and (max-width: 600px) {
    #alfabet ul {
        justify-content: flex-start;
    }
}

#alfabet li {
    color: white;
    display: block;
    flex: 0 0 auto;
    /* Don't shrink */
    padding: 0.5rem 0.8rem;
    text-transform: uppercase;
    font-size: 18px;
}


/* main */
h1 {
    font-weight: 600;
    font-family: 'Oxygen', sans-serif;
}

main {
    background-color: #EEE;
}

main p {
    font-family: 'Oxygen', sans-serif;
    font-size: 1rem;
    font-weight: 300;
}

#content {
    color: black;
    padding-top: 5rem;
    text-align: center;
}

.popular_words {
    font-family: 'Oxygen', sans-serif;
    text-align: center;
    margin: 1rem auto;
    display: table;
}

/* footer */
footer {
    background-color: #211d1d;
    padding: 10px;
    color: white;
    margin-top: auto;
    padding: 2rem 1rem;
}

.footer {
    display: flex;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

.footer_copyright {
    font-family: 'Oxygen', sans-serif;
    font-size: 0.9rem;
    color: #888;
}

.footer_contribute_box {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer_contribute {
    color: #26b11d;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Oxygen', sans-serif;
    border: 1px solid #26b11d;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.footer_contribute:hover {
    background-color: #26b11d;
    color: white;
}

/* Woorden lijst*/

.letter,
.popular_words h2,
.categories_section h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Lovelyn', sans-serif;
    font-size: 40px;
    margin: 1rem 0;
    padding-bottom: 1rem;
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, #b10040 0%, #ff4d8d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 4px 8px rgba(177, 0, 64, 0.1);
}

.letter::after,
.popular_words h2::after,
.categories_section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #b10040, transparent);
    border-radius: 2px;
}

.letter_prefix {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    -webkit-text-fill-color: initial;
    /* Reset gradient for prefix */
    margin-bottom: 0.5rem;
    display: block;
}

.letter_value {
    letter-spacing: 1px;
}

@media only screen and (max-width: 600px) {
    .letter {
        font-size: 28px;
        /* Smaller on mobile */
    }
}

.words {
    display: flex;
    max-width: 70rem;
    margin: auto;
    justify-content: center;
    flex-wrap: wrap;
    align-items: flex-start;
}

.words_container {
    width: 50%;
    margin: .5rem 1rem;
    background: #f9f3f3;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #b10040;
    min-width: 275px;
    max-width: 280px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.expand_arrow {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1rem;
    color: #b10040;
    transition: transform 0.3s ease;
}

.words_container.expanded .expand_arrow {
    transform: rotate(180deg);
}

h3 {
    font-family: 'EB Garamond', serif;
}

.words_layout_word {
    margin: auto;
}

.words_layout_meaning {
    color: #969494;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.words_layout_example {
    font-style: italic;
    display: none;
}

.words_container.expanded .words_layout_meaning {
    white-space: normal;
}

.words_container.expanded .words_layout_example {
    display: block;
}

/* Woorden toevoegen*/

.add_words_input {
    max-width: 60rem;
    background-color: white;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 0.3rem;
}

.add_words_box {
    margin: 1rem;
    text-align: left;
}

.form_input {
    border-radius: 0.3rem;
    border: 1px solid #ececec;
    display: block;
    width: 100%;
    padding: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.form__label {
    display: block;
    margin: 0.5rem 0;
}

.add_words_submit {
    padding-top: 1rem;
    margin: auto;
}

.add_words_submit_button {
    border: unset;
    display: block;
    padding: 0.5rem;
    font-family: 'Poppins', sans-serif;
    background-color: #26b11d;
    text-align: center;
    color: #fff;
    border-radius: 0.3rem;
    cursor: pointer;
    min-width: 10rem;
}

.form_button-submit {
    margin-left: auto;
}

.form_required::after {
    content: "*";
    right: 0;
    color: red;
    font-weight: bold;
}

.submission_sent {
    text-align: center;
    background: #ffffff;
    border-radius: 15px;
    margin: 1.5rem;
    padding: 1rem;
}

.submission_sent_text {
    font-size: 30px;
}

.submission_sent_gif {
    width: 16rem;
}

/* approval menu */

.approval_form {
    text-align: center;
    font-size: 1.75rem;
    text-align: center;
    font-size: 1.75rem;
    background: white;
    border-radius: 15px;
    max-width: 60rem;
    margin: 1rem auto;
}

.approve_button {
    border: unset;
    padding: 0.5rem;
    font-family: 'Poppins', sans-serif;
    background-color: #26b11d;
    text-align: center;
    color: #fff;
    border-radius: 0.3rem;
    cursor: pointer;
    min-width: 10rem;
}

.approval_buttons {
    display: inline-flex;
}

.reject_button {
    border: unset;
    padding: 0.5rem;
    font-family: 'Poppins', sans-serif;
    background-color: #ca0000;
    text-align: center;
    color: #fff;
    border-radius: 0.3rem;
    cursor: pointer;
    min-width: 10rem;
}

@media only screen and (min-width: 498px) {

    .search {
        order: 2;
    }

    .random_button {
        order: 3;
    }

    .nav_right {
        margin-left: unset;
    }

}



@media only screen and (min-width: 768px) {

    .search {
        order: 2;
        max-width: 19rem;
        margin-left: auto;
    }

    .random_button {
        order: 3;
        display: none;
    }

    .random_button_text {
        display: block;
        background-color: #b10040;
        border-radius: 10px;
        border: 1px solid #8e0034;
        cursor: pointer;
        color: #ffffff;
        font-size: 20px;
        padding: 4px 6px;
        text-shadow: 0px 1px 0px #8e0034;
        margin-right: 1rem;
    }

    .words_container {
        min-width: 336px;
        max-width: 410px;
    }
}

/* Category Grid */
.category_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
}

.category_item {
    background: #b10040;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Oxygen', sans-serif;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.category_item:hover {
    background: #8e0033;
}

/* Ensure footer links are white/visible if needed, though 'a' global style handles it */

@media only screen and (min-width: 1000px) {

    .nav_content {
        max-width: 70rem;
    }

    .submission_sent {
        margin-left: 25rem;
        margin-right: 25rem;
        margin-top: 3rem;
        margin-bottom: 3rem;
    }

    .submission_sent_gif {
        width: 400px;
    }

}

/* Mobile Optimizations */
@media only screen and (max-width: 600px) {
    .words_container {
        width: 95%;
        min-width: unset;
        max-width: unset;
        margin: 0.25rem auto;
        padding: 0.75rem;
    }

    .words {
        padding: 0 0.5rem;
    }

    /* Hide meaning when not expanded on mobile */
    .words_container:not(.expanded) .words_layout_meaning {
        display: none;
    }

    .words_container h3 {
        font-size: 1.1rem;
        margin: 0;
    }

    .expand_arrow {
        top: 0.75rem;
        /* Align with center of single line */
    }

    .nav_content {
        justify-content: center;
    }

    .search {
        margin: 0.5rem;
        width: 100%;
    }

    .search {
        margin: 0.5rem;
        width: 100%;
    }
}

.categories_section {
    max-width: 60rem;
    margin: 2rem auto;
    text-align: center;
}

.popular_words h2 {
    width: 100%;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 60rem;
    padding: 1rem;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    text-decoration: none;
    color: #333;
    background: #fff;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
}

.page-link:hover {
    border-color: #b10040;
    color: #b10040;
    background: #fff5f8;
}

.page-link.active {
    background: #b10040;
    color: #fff;
    border-color: #b10040;
}

.page-link.prev,
.page-link.next {
    font-weight: bold;
    border-color: #b10040;
    color: #b10040;
}

.page-link.prev:hover,
.page-link.next:hover {
    background: #b10040;
    color: #fff;
}

@media only screen and (max-width: 600px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .page-numbers {
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

/* Home Page Refinements */
.hero-section,
.contribution-box {
    padding: 3rem 1.5rem;
    text-align: center;
    background-color: #fdf2f5;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    border: 1px solid #ffdee6;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #b10040;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.section-centered {
    text-align: center;
}

.section-centered h2 {
    justify-content: center;
}

.button {
    display: inline-block;
    background-color: #b10040;
    color: white !important;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(177, 0, 64, 0.2);
}

.button:hover {
    background-color: #8e0034;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(177, 0, 64, 0.3);
}

.contribution-box {
    margin-top: 4rem;
    padding: 2.5rem 1rem;
}

.contribution-box p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.popular_words h2,
.top-categories-section h2,
.categories_section h2 {
    margin-top: 2rem;
}

.popular_words p small {
    color: #888;
    display: block;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* About Page */
.about-page {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-text-block {
    max-width: 800px;
    line-height: 1.8;
    color: #444;
}

.about-text-block h1 {
    text-align: center;
    margin-bottom: 3rem;
}

.about-text-block h2 {
    color: #b10040;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.about-text-block p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
}

.about-page .intro {
    font-size: 1.35rem;
    line-height: 1.6;
    color: #333;
    border-left: 5px solid #b10040;
    padding-left: 2rem;
    margin: 3rem 0;
    font-style: italic;
}

.about-page .separator {
    margin: 4rem 0;
    border: 0;
    border-top: 1px solid #eee;
}

.about-page .credits {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: #fdf2f5;
    border-radius: 12px;
    border: 1px solid #ffdee6;
    text-align: center;
}

.about-page .credits h3 {
    margin-bottom: 1rem;
    color: #b10040;
}

.about-page .credit-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.about-page .credit-link:hover {
    border-color: #b10040;
    color: #b10040;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(177, 0, 64, 0.1);
}

@media only screen and (max-width: 600px) {
    .about-text-block h1 {
        font-size: 1.8rem;
    }

    .about-page .intro {
        font-size: 1.1rem;
        padding-left: 1rem;
    }
}