:root {
    --blue: #557a95;
    --blue: #7395ae;
    --blue2: #659dbd;
    --blue: #5085a5;
    --blue3: #1b9ce5;
    --blue: #6cdaee;
    --blue: #2e9cca;
    --blue: #5ab9ea;
    --blue: #84ceeb;
    --blue: #a8d0e6;
    --blue: #8fc1e3;
    --blue: #d2fdff;
    --blue6: #3b8beb;
    --blue5: #90ccf4;
    --blue4: #5da2d5;
    --blue: #97aabd;
    --blue: #77a6f7;
    --blue1: #d6e9fee5;
    --blue: #d3e3fc;
    --blue: #86b3d1;
    --blue: #4d6d9a;

    --green: #5cdb95;
    --green3: #8ee4af;
    --green2: #afd275;
    --green1: #86c232;
    --green: #53900f;
    --green4: #15db95;
    --green: #479761;
    --green: #16ffbd;

    --yellow: #ffe400;
    --yellow: #faed26;
    --yellow: #fccd04;
    --yellow: #fbeec1;
    --yellow: #f8e9a1;
    --yellow: #d6ce15;
    --yellow: #f3d250;
    --yellow: #fce181;

    --cream: #edf5e1;
    --cream: #e7e3d4;
    --cream: #edeae5;

    --white: #feffff;
    --white: #f7f9fb;
    --white1: #fff;

    --pink: #f172a1;
    --pink: #e64398;
    --pink: #f78888;
    --pink: #c96567;
    --pink: #edb5bf;
    --pink: #cb2d6f;

    --orange: #f79e02;

    --rich-black: #061923;
    --firey-rose: #FF5964;
    --alice-blue: #EBF8FF;
    --jasmine: #FFE099;
    --tea-green: #C8D6AF;
    --tea-green-light: #F7FFEA;
    --english-violet: #48284A;

    --greenapp: #14a76c;
    --yellowapp: #ffe400;
    --orangeapp: #ff652f;
    --greyapp:#747474;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Innovative and Audacious */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* line-height: 1.6; */
    /* background-color: var(--alice-blue); */
    background-color: var(--greyapp);
    color: #333;
    padding: 1rem;
    
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    
}

.back-button {
    
    /* background-color: rgb(28, 176, 246);
    border-color: rgb(24, 153, 214); */
    background-color: var(--yellowapp);
    border-bottom: #ffe400;
    color: rgb(255, 255, 255);
    padding: 0.4rem 1rem;
    border-radius:16px;
    font-size: 1rem;
    letter-spacing: 0.8px;
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 0 hsl(54, 98%, 36%);
    display: inline-block;
    margin-bottom: 1rem;
}

.back-button:hover {
    filter: brightness(1.1)
}

.back-button:active {
    transform: translateY(4px);
    box-shadow: none;
}

header {
    /* background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%); */
    background-color: var(--greenapp);
    text-align: center;
    color: white;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.language-key {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.language-badge {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    transition: transform 0.2s, background-color 0.2s;
}

.language-badge:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.25);
}

.search-bar {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    gap: 10px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar .button-group {
    display: flex;
    gap: 10px;
}

.search-bar .clear-search {
    padding: 0.8rem 1.8rem;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: none;
}

.search-bar .clear-search:hover {
    background-color: #c53030;
}

.search-bar .clear-search.visible {
    display: block;
}

.search-stats {
    text-align: center;
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.section.no-results {
    display: none;
}

.section-header .match-count {
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    margin-left: 10px;
    display: none;
}

/* Highlight matching text */
.highlight {
    background-color: #faf089;
    padding: 0 2px;
    border-radius: 2px;
}

.search-bar input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.search-bar button {
    padding: 0.8rem 1.8rem;
    background-color: var(--blue4);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.search-bar button:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
}

.section {
    background-color: white;
   
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s;
}

.section:hover {
    transform: translateY(-2px);
}

.section-header {
    /* background: var(--blue4); */
    background-color: var(--orangeapp);
    font-family: "Courier New", Courier, monospace;
    font-weight: 600;
    color: white;
    padding: 0.5rem;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.section-header button:hover {
    transform: scale(1.1);
}

.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.word-item {
    padding: 1.2rem;
    background-color: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s;
    border: 1px solid #a7adb4;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

.word-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #4299e1;
}

.word-english {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 2px solid #a7adb4;
    padding-bottom: 5px;
}

.translation {
    font-size: 0.95rem;
    color: #4a5568;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.translation span {
    font-weight: 600;
    color: #2d3748;
    margin-right: 8px;
    min-width: 35px;
}

footer {
	/*background: var(--blue5);*/
    background: var(--greenapp);
	color: white;
	margin-bottom: 0;
    padding: 5px 0;

    
    /* position: fixed; */
    width: 100%;
    bottom: 0;
}

.logo {
    position: relative;
    margin: auto;
    width: 100%;
}

footer .logo {
	margin-bottom: 20px;
}

footer .logo h1 {
	font-size: 1.5rem;
    color: white;
    position: absolute;
    top: 10px;
    left: 42px;
    font-family: "Courier New", Courier, monospace;
    
}

.logo img {
    width: 50px;
    display: block;
    max-width: 100%;
}

.logo img:hover {
    transform: scale(1.2);
}


footer article{
	font-size: 1.2em;
	text-align: center;
	color: white;
    font-family: "Courier New", Courier, monospace;
}

footer a:hover{
    border-bottom:0;
}

/* Responsive Adjustments 1366px x 768px dell latitude 5430 */
@media (max-width: 1360px) {
    header {
        padding: 2rem 0;
    }
    
    .container {
        max-width:  1200px;
        margin: 0 auto;
        
    }

    .word-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        
    }

    header h1 {
        font-size: 2rem;
    }

    .language-badge {
        font-size: 0.8rem;
    }
    
    .section-header {
        font-size: 1.3rem;
    }

    footer .logo h1 {
        font-size: 1.4rem;
    }

    footer article {
        font-size: 1rem;
    }
    
}

/* Responsive Adjustments 768px x 1024px iPad Mini 3 */
@media (max-width: 770px) {
    header {
        padding: 1.5rem 0;
    }

    .container {
        max-width:  650px;
        
    }

    header h1 {
        font-size: 1.5rem;
    }

    .back-button {
        font-size: 0.8rem;
    }

    .language-badge {
        font-size: 0.6rem;
    }

    .search-bar button {
       
    }

    .section-header {
        font-size: 1.2rem;
    }

    .word-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .search-bar input {
        font-size: 0.8rem;
        
    }

    .word-english {
        
        font-size: 0.9rem;
    }

    .translation {
        font-size: 0.75rem;
    }
   
    .section-header button {
        font-size: 1.2rem;
    }

    footer .logo h1 {
        font-size: 1.2rem;
    }

    footer article {
        font-size: 1rem;
    }

    
}

/* Responsive Adjustments 384px × 824px S22 Ultra */
@media (max-width: 390px) { 
    header {
        padding: 1.5rem 0;
    }

    .back-button {
        font-size: 0.7rem;
    }

    .word-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        
    }

    .language-badge {
        padding: 0.3rem 0.8rem;
        font-size: 0.5rem;
    }

    .section-header {
        font-size: 1rem;
        padding: 1rem;
    }

    .search-bar .button-group {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 10px;
    }

    .word-item {
        padding: 1rem;
    }

    .word-english {
        
        font-size: 0.8rem;
    }

    .translation {
        font-size: 0.65rem;
    }

    .section-header button {
        font-size: 1rem;
    }

    footer .logo h1 {
        font-size: 0.9rem;
    }

    footer article {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section,
    .word-item,
    .search-bar button,
    .language-badge {
        transition: none;
    }
}