body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    z-index: 0;
    transition: 0.3s ease;
    text-align: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.6;
    font-size: 16px;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
}

h2 {
    font-size: 1.8rem;
    margin: 0.5em 0;
}

h3 {
    font-size: 1.5rem;
    padding: 0;
    margin: 0;
}

p {
    margin: 0 0 5px;
}

p .highlight {
    font-weight: bold;
}

nav {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: space-between;
    top: 15px;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 20px;
}

.section {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
}

.word {
    margin: 0 15px;
}

#word {
    position: relative;
    z-index: 3;
    font-size: 2.5rem;
    margin: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    transition: 0.3s ease;
    letter-spacing: 2px;
    font-weight: 500;
}

img#logo {
    max-height: 67px;
    display: block;
    position: relative;
    transition: transform 0.3s ease;
}

img#logo:hover {
    transform: scale(1.05);
}

span.title {
    display: block;
    padding-top: 0;
    font-weight: 600;
}

#letters {
    font-size: 1.2rem;
    margin: 15px 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
}

.card {
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    margin: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.show {
    display: block;
}

.rest svg {
    width: 24px;
    height: 24px;
}

.bday svg {
    fill: #fb28a9;
}

#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 15px;
    width: 320px;
    max-width: 90vw;
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

#popup input[type="text"] {
    margin: 0 0 15px;
    width: 100%;
    box-sizing: border-box;
}

#blanket {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease;
}

.hide {
    display: none !important;
}

#attempts {
    display: block;
}

.infopanel {
    display: flex;
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    margin: 5px 0 15px;
    gap: 20px;
}

.infopanel .info {
    min-width: 120px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.word-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    min-height: 120px;
}

.correct-letter {
    padding: 15px;
    border-radius: 8px;
    margin: 5px;
    transition: all 0.3s ease;
}

.wrong-letter {
    padding: 10px;
    border-radius: 8px;
    margin: 5px;
    transition: all 0.3s ease;
}

.wrongLetter {
    color: #f4744e;
    font-weight: bold;
}

#hint span {
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
}

.hintLetter {
    color: orange;
    font-weight: bold;
}

.btn-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 25px 0;
    flex-wrap: wrap;
}

#themePicker {
    position: relative;
    top: 0;
    left: 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 500;
    min-width: 100px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover:not(.inactive) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active:not(.inactive) {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.inactive {
    cursor: default;
    opacity: 0.7;
}

input[type="text"] {
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 2rem;
    margin: 20px 0 5px;
    max-width: 80vw;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

input[type="text"]:focus {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(120, 247, 140, 0.3);
}

#nameForm {
    font-size: 18px;
}

input::placeholder {
    font-size: 16px;
    opacity: 0.7;
}

.icon-btn {
    padding: 12px;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.card-title {
    font-size: 24px;
    margin-bottom: 15px;
}

#warning {
    position: fixed;
    display: none;
    margin: auto;
    transition: all 0.5s ease;
    width: 80%;
    max-width: 500px;
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
    z-index: 100;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { top: 80px; opacity: 0; }
    to { top: 100px; opacity: 1; }
}

#score {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 10px 0;
    padding: 8px 16px;
    display: inline-block;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

#score-value {
    font-weight: bold;
    font-size: 1.3rem;
}

.highscores_container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0 20px;
}

.highscores {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.highscores:hover {
    transform: translateY(-5px);
}

.highscores h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.medal {
    font-size: 1.2rem;
    margin-right: 5px;
}

.text-yellow-500 {
    color: #f59e0b;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-amber-700 {
    color: #b45309;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.list li:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.list .player-name {
    font-weight: 500;
    text-align: left;
    flex: 1;
}

.list .score {
    font-weight: bold;
}

footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    width: 100vw;
    position: relative; 
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    gap: 20px;
}

footer .footer_container {
    max-width: 1080px;
    width: 85%;
    display: flex;
    flex-direction: row;
    margin: auto;
    flex-wrap: wrap-reverse;
}

.links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.links a {
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8.825l-4.9-4.9 1.4-1.4L6 6.025l3.5-3.5 1.4 1.4-4.9 4.9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(120, 247, 140, 0.3);
}

#languagePicker {
    margin-right: 20px;
    min-width: 120px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-container a {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .btn, 
    .icon-btn {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .highscores {
        padding: 15px;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .highscores_container {
        flex-direction: column;
    }
    
    .btn-container {
        gap: 15px;
    }
    
    #word {
        font-size: 2rem;
    }
    
    input[type="text"] {
        font-size: 1.5rem;
        padding: 12px;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    img#logo {
        position: static;
        margin-bottom: 10px;
    }
    
    #languagePicker {
        margin: 10px 0;
    }
    
    .logo-container {
        flex-direction: column;
        align-items: center;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
        padding: 0 10px;
    }
    
    .btn, 
    .icon-btn {
        font-size: 14px;
        padding: 8px 16px;
        min-width: 80px;
    }
    
    .btn-container {
        gap: 10px;
    }
    
    .infopanel {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .infopanel .info {
        width: auto;
    }
    
    #word {
        font-size: 1.8rem;
    }
    
    input[type="text"] {
        font-size: 1.3rem;
        max-width: 90vw;
    }
    
    .highscores h2 {
        font-size: 1.4rem;
    }
}

/* Animation classes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.btn-pulse {
    animation: pulse 0.3s ease;
}

.score-pulse {
    animation: pulse 0.5s ease;
}

.letters-updated {
    animation: pulse 0.3s ease;
}

.letter-reveal {
    animation: fadeIn 0.5s ease;
}

.warning-animation {
    animation: shake 0.5s ease;
}

.input-focused {
    transform: scale(1.02);
}

/* Add subtle transitions */
.btn, 
.icon-btn, 
input[type="text"],
select,
.highscores,
.card {
    transition: all 0.3s ease;
}

/* Win/Loss Message Styling */
.success-message,
.failure-message {
    font-size: 1.6rem;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.success-message.animated,
.failure-message.animated {
    opacity: 1;
    transform: translateY(0);
}

.success-message {
    background-color: rgba(46, 131, 69, 0.15);
    border: 1px solid rgba(46, 131, 69, 0.3);
}

.failure-message {
    background-color: rgba(228, 75, 40, 0.15);
    border: 1px solid rgba(228, 75, 40, 0.3);
}

.word-link {
    display: inline-block;
    font-weight: bold;
    border-bottom: 2px dashed rgba(120, 247, 140, 0.5);
    padding: 0 5px;
    transition: all 0.3s ease;
}

.word-link:hover {
    background-color: rgba(120, 247, 140, 0.1);
    border-bottom: 2px solid rgba(120, 247, 140, 0.8);
    transform: translateY(-2px);
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}
