
body {
    font-family: 'Nunito', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #f0f9ff;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239bd6ff' fill-opacity='0.21'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.top-bar-home {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px;
    background-color: #4a4a4a;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    margin-top: -30px;
    margin-left: -35px;
    margin-right: -35px;
}

.top-bar-snake {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #4a4a4a;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    margin-top: -30px;
    margin-left: -35px;
    margin-right: -35px;
}

.top-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px;
    background-color: #4a4a4a;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    margin-top: -30px;
    margin-left: -35px;
    margin-right: -35px;
}

.home-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
.language-select {
    background-color: #66bb6a;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .top-bar {
        justify-content: center;
    }
    .top-bar-snake {
        justify-content: space-between;
    }
    .top-bar-home {
        justify-content: center;
    }
    .language-select {
        width: 100%;
        max-width: 200px;
    }
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 800px;
    border: 5px solid #ffd700;
    border-top: none;
}

.card-cipher {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 450px;
    border: 5px solid #ffd700;
    border-top: none;
}

.card-title { 
    font-family: 'Fredoka One', cursive;
    font-size: 32px;
    text-align: center;
    margin-bottom: 25px;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.games-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.game-card { 
    background-color: #e0f7fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.game-card h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 24px;
    color: #00838f;
    margin-top: 0;
}

.game-card p {
        color: #4a4a4a;
        margin-bottom: 15px;
}

.game-card .icon {
    font-size: 48px;
    color: #4dd0e1;
    margin-bottom: 15px;
}

.donate-card { 
    background-color: pink;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.donate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.donate-card h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 24px;
    color: #00838f;
    margin-top: 0;
}

.donate-card p {
        color: #4a4a4a;
        margin-bottom: 15px;
}

.donate-card .icon {
    font-size: 48px;
    color: #4dd0e1;
    margin-bottom: 15px;
}

.play-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #66bb6a;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #4caf50;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    font-weight: bold;
    color: #4a4a4a;
    margin-bottom: 10px;
}

.cipher-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background-color: #e0f7fa;
    border-radius: 15px;
    padding: 15px;
}

.problem input {
    width: 5rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: #00838f;
    border: 2px solid #b2ebf2;
    border-radius: 0.75rem;
    padding: 0.5rem;
    background-color: #e0f7fa;
}

.problem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff9c4;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    font-family: 'Fredoka One', cursive;
    font-size: 20px;
    color: #ff9800;
}

.answer-input {
    width: 97%;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    border: 2px solid #b2ebf2;
    border-radius: 10px;
    background-color: #e0f7fa;
    color: #00838f;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.answer-input:focus {
    border-color: #4dd0e1;
    box-shadow: 0 0 0 3px rgba(77, 208, 225, 0.3);
    outline: none;
}

#decodedMessage {
    width: 95%;
    padding: 10px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #b2ebf2;
    border-radius: 10px;
    background-color: #e0f7fa;
    color: #00838f;
    margin-bottom: 15px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #66bb6a;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.submit-btn:hover {
    background-color: #4caf50;
}
.submit-btn:active {
    transform: translateY(2px);
}

#feedbacktop {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.25rem;
}

#feedbacktop.show {
    opacity: 1;
}
#feedbacktop.success {
    background-color: #c8e6c9;
    color: #2e7d32;
}
#feedbacktop.error {
    background-color: #ffcdd2;
    color: #c62828;
}

#feedbackbottom {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.25rem;
}

#feedbackbottom.show {
    opacity: 1;
}
#feedbackbottom.success {
    background-color: #c8e6c9;
    color: #2e7d32;
}
#feedbackbottom.error {
    background-color: #ffcdd2;
    color: #c62828;
}

footer {
    text-align: center;
    margin-top: 25px;
    color: #4a4a4a;
}