@import url('https://fonts.googleapis.com/css2?family=Ephesis&family=Griffy&family=Meow+Script&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Potta+One&display=swap');
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #ae9cff;
    background: url('dic-bg.png');
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    padding: 0;
}

 


.container {
    background-color: #c5dfcf;
    width: 90vmin;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    padding: 80px 50px;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(38, 33, 61, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
} 

.search-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
} 

.search-box input {
    padding: 5px;
    width: 70%;
    border: none;
    outline: none;
    border-bottom: 3px solid #7acc6f;
    font-size: 1.3rem;
    font-family: "Emphesis", cursive;
}

.search-box button {
    padding: 15px 0;
    width: 25%;
    background-color: #a9ca5b;
    border: none;
    outline: none;
    color: #745f5f;
    border-radius: 5px;
    font-size: 1.3rem;
    cursor: pointer;
    font-family: "Emphesis", cursive;
}

.result {
    position: relative;
    color: rgb(39, 122, 97);
}

.result h3 {
    font-size: 1.7rem;
    color: #1f194c;
}

.result .word {
    display: flex;
    justify-content: space-between;
    margin-top: 80px;
}

.result button {
     background-color: transparent;
     color: ae9cff;
     border: none;
     outline: none;
     font-size: 18px;
}

.result .details {
    display: flex;
    gap: 10px;
    color: #28691f;
    margin: 5px 0 20px 0;
    font-size: 1.3rem;
}

.word-meaning {
    color: #467a5a;
    font-size: 1.3rem;
   
}

.word-example {
    color: #3f8a42;
    font-style: italic;
    border-left: 5px solid #39ac5f;
    padding-left: 20px;
    margin-top: 30px;
    font-size: 1.4rem;
}

.error {
    margin-top: 80px;
    text-align:  center;
    font-family: cursive;
    color: #8eaf51;
}
.detail p {
    color: #3c833c;
}

.detail h3 {
    font-size: 3rem;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 1rem;
    }
    .card {
        width: 100%;
    }
}

.petal {
    position: absolute;
    top: -50px;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
}
#falling-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
}
#toggle-petals {
    position: fixed;
    top: 20px;
    right: 20px;
    pointer-events: auto;
    background-color: #a5d178;
    background: linear-gradient(135deg, #a0ecec, #81f7ff);
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    z-index: 1000;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #916363;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-family: "Griffy", cursive;
}
#toggle-petals:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
#toggle-petals:active {
    transform: scale(0.95);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
@keyframes sparkle {
    0% { box-shadow: 0 0 5px #d2eecf, 0 0 10px #9afd91, 0 0 20px #8ffd73; }
    50% { box-shadow: 0 0 8px #beecd5, 0 0 14px #9afd91, 0 0 26px #8ffd73; }
    100% { box-shadow: 0 0 5px #c0e9d0, 0 0 10px #9afd91, 0 0 20px #8ffd73;}
}

#toggle-petals.glow {
    animation: sparkle 1.5s infinite alternate;
}
@keyframes fall {
    to { transform: translateY(100vh) rotate(360deg);}
}

@keyframes sway {
    0%, 100% { tranform: translateX(0);}
    50% { transform: translateX(20px); }
}
.hidden {
    display: none;
}

h2 {
    font-size: 1.7rem;
    font-family: "Griffy", cursive;
    color: #348f83;
    margin-bottom: 10px;
    text-align: center;
}
.new-word {
    background-color: #e8f5ef;
    padding: 15px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
}
.ipa {
    font-style: italic;
    color: #555;
}
.definition {
    margin-top: 5px;
    font-size: 1.1rem;
}