body {
    background: #1a1a2e;
    color: #e6e6e6;
    font-family: 'Rubik', sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.top-bar {
    position: absolute;
    top: 0px;
    left: 0px;
    background: #11111e;
    z-index: 1000;
    padding: 10px 0px;
    text-align: center;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
    width: 100%;
    height: 40px;
    line-height: 0px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.score {
    position: absolute;
    top: 3px;
    right: 5px;
    background: #5d5fc0;
    font-size: 10px;
    border-radius: 50%;
    padding: 2px 2px;
    border: 1px solid #999999aa;
    min-width: 12px;
    text-align: center;
    color: white;
    font-weight: lighter;
}
.layout {
    display: flex;
    width: 100%;
    max-width: 1500px;
    gap: 20px;
}
.sidebar {
    width: 50%;
    background: #16213e;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.main-content {
    flex: 1;
    background: #16213e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}
input[type="text"] {
    background: #0f3460;
    border: 2px solid #FFD700;
    border-radius: 8px;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    margin: 10px;
    font-family: 'Rubik', sans-serif;
    width: calc(100% - 64px);
    max-width: 400px;
}
input[type="text"]:disabled {
    opacity: 0.5;
}
button {
    background: #FF5733; /* Changed color to a more visible one */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    margin: 10px;
}
button:hover {
    transform: translateY(-2px);
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #999;
}
.submit-button {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 11px;
    width: 53px;
    height: 49px;
    font-size: 24px;
    text-align: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    margin-left: 10px;
    padding: 10px;
    margin: 5px;
}
.submit-button:hover {
    transform: translateY(-2px);
}
.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#countdown {
    font-size: 30px;
    font-weight: bold;
    color: #FFD700;
    position: absolute;
    top: 20px;
    right: 20px;
}
.letters {

    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.letter-card {
    font-size: 32px;
    background: #ffffff;
    color: #000;
    width: 50px;
    height: 70px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid #999;
    cursor: pointer;
    transition: transform 0.2s;
}
.letter-card.small {
    width: 15px;
    height: 20px;
    font-size: 12px;
    border-width: 1px;
    border-radius: 4px;
    margin-right: 1px;
}
.letter-card[placeholder$="true"] {
    border: 2px solid transparent;
    background-color: #000000;
    opacity: 0.2;
    background-size: 10px 10px;
    background-repeat: repeat;
}
.letter-card:hover {
    transform: translateY(-2px);
}
.word-input-area {
    display: flex;
    gap: 10px;
    justify-content: center;
    min-height: 80px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.word-input-area.valid-word .letter-card {
    background: #FFD700;
    color: #0f3460;
    animation: validWordAnimation 0.5s ease-in-out;
}
@keyframes validWordAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.longest-word {
    display: flex;
    gap: 0px;
    margin-right: 10px;
}
.score-container {
    display: flex;
    align-items: center;
}
.player-list, .player-summary {
    display: grid;
    margin: 20px 0;
}
.player-card {
    background: #0f3460;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 4px;
    height: 18px;
}
.player-card.player {
    background: #FFD700;
    color: #0f3460;
}
h3 {
    color: #FFD700;
    font-size: 24px;
    margin: 0;
}
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    animation: fadeOut 2s forwards;
    z-index: 1000;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.best-word-notification {
    background: #FFD700;
    color: black;
}

.optimal-word-notification {
    background: #28a745; /* Green background for optimal word notification */
    color: white;
}

.player-scoreboard {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

*[hasAccent$="true"] {
    background: #fff; 
    color: #0f3460;
}
@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

#game-placeholder {
    height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 81px;
    background: #00000022;
    margin-top: 20px;
    border-radius: 8px;
    color: #a1a1a122;
    font-family: '212Sports', sans-serif;
}

.best-words-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.best-words-list {
    width: 30%;
    border-right: 1px solid #ccc;
    padding-right: 20px;
}

.best-word-item {
    cursor: pointer;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.best-word-item.selected {
    background-color: #f0f0f0;
    font-weight: bold;
    color: #333;
}

.word-definition {
    width: 70%;
    padding-left: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tab-button {
    background: #0f3460;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.tab-button.active {
    background: #FFD700;
    color: #0f3460;
}

.tab-button:hover {
    transform: translateY(-2px);
}

.start-button {
    width: 100%; 
    text-align: center;
    margin: 20px 0 0 0;
}

.best-word .letter-card {
    animation: riseAndShine 0.5s ease-in-out forwards;
    background: #FFD700;
}

.game-container {
    min-width: 800px;
    width: 1000px;
    margin-top: 50px;
    height: calc(100vh - 50px);
}

@keyframes riseAndShine {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}


@keyframes rainbowBackground {
    0% { background-color: rgb(255, 81, 81); }
    14% { background-color: rgb(255, 194, 80); }
    28% { background-color: rgb(255, 255, 80); }
    42% { background-color: rgb(110, 200, 119); }
    57% { background-color: rgb(130, 207, 255); }
    71% { background-color: rgb(115, 106, 229); }
    85% { background-color: rgb(191, 103, 191); }
    100% { background-color: rgb(255, 80, 80); }
}

@keyframes rainbowBackgroundClassy {
    0% { background-color: rgb(255, 255, 255); }
    14% { background-color: rgb(255, 253, 225); }
    28% { background-color: rgb(255, 251, 201); }
    42% { background-color: rgb(255, 249, 161); }
    57% { background-color: rgb(255, 245, 99); }
    71% { background-color: rgb(255, 244, 92); }
    85% { background-color: rgb(255, 227, 14); }
    100% { background-color: rgba(255, 238, 0, 1); }
}

.audio-toggle {
    border: none;
    color: #FFD700;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.restart-button {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    top: 2px;
    margin: 0;
    padding: 0 20px;
}

.top-toolbar {
    width: 100px;
    display: flex;
    vertical-align: bottom;
    align-items: center;
}

.bar-title {
    width: 100%;
    padding-left: 100px;
    font-family: '212Sports', sans-serif;
    font-size: 40px;

}

.disconnected-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    color: #e6e6e6;
}

.disconnected-screen h2 {
    margin-bottom: 20px;
}

.disconnected-screen button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
}

.disconnected-screen button:hover {
    transform: translateY(-2px);
}

.summary-score img {
    height: 29px;
    position: relative;
    top: 8px;
    left: 5px;
}

.kevin {
    --size: 170px;
    background: url('/images/kevin.png');
    width: var(--size);
    height: var(--size);
    background-size: cover;
    background-position: center;
    animation: dance 1.5s infinite ease-in-out;
}
  
  @keyframes dance {
    0% {
      transform: translate(0, 0) rotate(0deg);
    }
    12% {
      transform: translate(-10px, -10px) rotate(-5deg);
    }
    24% {
      transform: translate(0, 0) rotate(0deg);
    }
    36% {
      transform: translate(-10px, -10px) rotate(-5deg);
    }
    48% {
      transform: translate(0, 0) rotate(0deg);
    }
    60% {
      transform: translate(10px, -10px) rotate(5deg);
    }
    72% {
      transform: translate(0, 0) rotate(0deg);
    }
    84% {
      transform: translate(10px, -10px) rotate(5deg);
    }
    96% {
      transform: translate(0, 0) rotate(0deg);
    }
  }

.kevin-pyramid {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 81px;
    transform: translate(-50%, 0);
    left: 50%;
}

.kevin-row {
    display: flex;
    justify-content: center;
    padding: 5px 0;
}

.kevin {
    background-image: url('/images/kevin.png');
    background-size: cover;
    animation: dance 1.5s infinite ease-in-out;
}

.kevin-pyramid[size="big"] .kevin {
    --size: 170px;
}

.kevin-pyramid[size="normal"] .kevin {
    --size: 120px;
}

.kevin-pyramid[size="small"] .kevin {
    --size: 80px;
}