.WaitingPage {
    grid-template-columns: 6% 47% 47%;
    grid-template-rows: auto auto;
    grid-template-areas:
        "back players code"
        "back status code";
    padding-right: 6%;
}

.GameStatus {
    grid-area: status;
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    gap: 1em;
    justify-content: space-between;
}

.PlayerList {
    grid-area: players;
    display: flex;
    flex-direction: column;
}

.Link {
    grid-area: code;
    display: flex;
    flex-direction: column;
}

.CardTitle {
    margin-top: 0;
    color: #413f3f;
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 0.2em;
}

.Subtitle {
    color: #757070;
    font-size: 1em;
    font-weight: 400;
    margin-bottom: 1em;
}

.Separator {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2em 0;
    margin-bottom: 0em;
}

#gameStatus {
    font-size: 1.2em;
    color: #333333;
    margin-top: 10px;
}

#gameStatus::after {
    content: "";
    display: inline-block;
    width: 1em;
    text-align: left;
    animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
    0% {
        content: "";
    }
    33% {
        content: ".";
    }
    66% {
        content: "..";
    }
    100% {
        content: "...";
    }
}

#playerList {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9em;
}

#playerList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 1.15em 1.25em;
    border-radius: 0.9em;
    font-size: 1.1em;
    font-weight: 500;
    color: #2c2c2c;
    box-shadow: 0 0.25em 0.9em rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.player-name {
    flex: 1;
    max-width: 60%; 
    overflow: hidden;       
  white-space: nowrap;   
  text-overflow: ellipsis;
}

.player-status {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.95em;
    font-weight: 600;
}

.player-status::before {
    content: "";
    width: 0.6em;
    height: 0.6em;
    border-radius: 50%;
    display: inline-block;
}

.player-status.ready {
    color: #4cd137;
}

.player-status.ready::before {
    background: #4cd137;
}

.player-status.pending {
    color: #e86f18;
}

.player-status.pending::before {
    background: #e86f18;
}

#playerList li:hover {
    transform: translateY(-0.1em);
    box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.1);
}

#qrcode-container {
    width: 11em;
    height: 11em;
    background: #ffffff;
    padding: 1em;
    border-radius: 1.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.375em 1.25em rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin: 0 auto;
}

#qrcode-container:hover {
    transform: translateY(-0.1em);
    box-shadow: 0 0.65em 1.75em rgba(0, 0, 0, 0.12);
}

#qrcode-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#linkSection {
    margin-top: 1.5em;
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    gap: 1em;
    justify-content: space-between;
}

#LinkText,
#CodeTextSection {
    display: flex;
    flex-direction: column;
}

.copy-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6em 1em;
    margin-left: 1em;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    font-size: 1rem;
    background: #fafafa;
    cursor: pointer;
    position: relative;
    min-width: 5em;
    max-width: 70%;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.copy-box::after {
    content: "";
    width: 1.2em;
    height: 1.2em;
    background-image: url("../icons/copy.png");
    background-repeat: no-repeat;
    background-size: contain;
    margin-left: 0.6em;
    flex-shrink: 0;
}

.copy-box:hover {
    background: #e9e9e9;
    border-color: #bcbcbc;
}

.copy-box span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#PartyStatus {
    display: flex;
    flex-direction: column;
}

.ReadySection {
    display: flex;
    flex-direction: row;
    justify-content: end;
    padding-right: 1em;
}

.ReadyBtn {
    padding: 12px 28px;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ReadyBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ReadyBtn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.ReadyBtn.ready {
    background-color: #4cd137;
}

.ReadyBtn.pending {
    background-color: #e86f18;
}

.copy-box {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.copy-box:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.copy-box.clicked {
    transform: scale(1);
    transition: transform 0.25s ease;
}

#copy-toast {
    position: fixed;
    bottom: 2.5em;
    left: 50%;
    transform: translateX(-50%) translateY(2.5em);
    background: #333;
    color: white;
    padding: 0.625em 1.125em;
    border-radius: 0.625em;
    font-size: 0.9em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

#copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.goback{
    grid-area: back;
    display: flex;
    flex-direction: column;
    align-content: flex-end;
    flex-wrap: wrap;
}