@font-face {
    font-family: 'Poppins Local';
    src: url('../fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins Local';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

*,
html,
body {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 100vw;
}

body {
    background-image: url('../images/bg_blur.png');
    background-size: cover;
    background-position: left;
    font-family: 'Poppins Local';
    font-weight: 500;
    background-color: #f4f4f9;
    width: 100%;
    min-width: 100vw;
    min-height: 100vh;
}

main {
    width: 100%;
    min-width: 100vw;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    min-height: 100vh;
}

.content {
    width: 90%;
    max-width: 1200px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

header {
    background-image: url('../images/bg.png');
    background-size: cover;
    background-position: center;
    height: 16rem;
}

#content {
    padding: 4rem 5rem 6rem;
}
.game-text {
    display: flex;
    width: 100%;
    padding: 2rem 6rem 4rem;
}

.game-text h1 {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #516b12;
}
.game-text p {
    font-size: 1.3rem;
    color: #884511;
    padding-left: 4rem;
}

@media (max-width: 1200px) {
    main {
        padding: 0px;
    }
    .content {
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }
}

@media (max-width: 1024px) {
    #content {
        padding: 2rem 3rem 2rem;
    }
}

@media (max-width: 920px) {
    .game-text {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 6rem 4rem;
    }
    .game-text p {
        padding-left: 0rem;
    }
}
@media (max-width: 820px) {
    #content {
        padding: 1rem 2rem 2rem;
    }
}

@media (max-width: 960px) {
    header {
        height: 11rem;
    }
}

@media (max-width: 720px) {
    #content {
        padding: 1rem 1rem 2rem;
    }
    .game-text {
        padding: 1rem 2rem 2rem;
    }
}
@media (max-width: 680px) {
    #content {
        padding: 1rem 1rem 2rem;
    }
}
@media (max-width: 490px) {
    header {
        height: 8rem;
    }
    #content {
        padding: 1rem;
    }
    .game-text {
        padding: 1rem 1rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    .game-text h1 {
        font-size: 1.8rem;
    }
    .game-text p {
        font-size: 1.2rem;
    }

    .grid-cell {
        width: 40px;
        height: 40px;
    }

    .solution-letter {
        font-size: 1.2em;
    }

    #check-button {
        width: 250px;
        margin-top: 20px;
    }
}

.game-grid {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.grid-cell {
    width: 60px;
    height: 60px;
    /* border: 2px solid #ccc; */
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #d9d9d9;
    cursor: grab;
    border-radius: 4px;
}

.drop-target {
    border: 2px dashed #76594b;
    background-color: rgba(244, 228, 184, 0.3);
}

.draggable {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #a0522d;
    color: white;
    border-radius: 4px;
    cursor: grab;
}

.prefilled {
    background-color: #d4ac0d;
    color: white;
    border: 2px solid #d4ac0d;
}

.solution-letter {
    font-size: 1.5em;
}

.prefilled-origin {
    color: #444;
    cursor: default !important;
}

.dropped-item {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #a0522d;
    color: white;
    border-radius: 4px;
    cursor: grab;
}

#origin-grid .grid-cell:empty {
    border: 2px dashed #76594b;
    background-color: rgba(244, 228, 184, 0.5);
}

#check-button {
    background-color: #76594b;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    font-size: 1.1rem;
    display: block;
    width: 300px;
    margin: 40px auto 0;
}

#check-button:hover:not([disabled]) {
    background-color: #5c463c;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

#check-button[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- MODAL ------------------------------------------------------ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    z-index: 1001;
    background-color: #fef6df;
    color: #76594b;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 5px solid rgba(158, 182, 0, 1);
    border-top: none;
}

.modal.success {
    border: 5px solid rgba(158, 182, 0, 1);
}
.modal.error {
    border: 5px solid #d9534f;
}

.modal-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    background-color: #76594b;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.btn:hover {
    background-color: #5c463c;
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.btn-ok {
    background-color: rgba(158, 182, 0, 1);
}

.btn-ok:hover {
    background-color: rgba(120, 140, 0, 1);
}

@keyframes bounce-icon {
    0%,
    100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.emoji-icon {
    display: block;
    .modal.success & {
        animation: bounce-icon 1s infinite;
    }
}

/* --- MODAL ------------------------------------------------------ */
