.home {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;
}


.card {
    width: 100%;

    max-width: 500px;

    background: #222447;

    padding: 36px;

    border-radius: 24px;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.35);
}


.card h1 {
    margin-top: 0;

    margin-bottom: 8px;

    text-align: center;

    font-size: 42px;
}


.card h2 {
    margin-top: 20px;

    margin-bottom: 18px;

    font-size: 22px;

    text-align: center;
}


.subtitle {
    text-align: center;

    opacity: 0.75;

    margin-bottom: 30px;
}


.card label {
    display: block;

    margin:
        18px
        0
        8px;
}


.card button {
    width: 100%;

    margin-top: 14px;
}


.separator {
    text-align: center;

    opacity: 0.55;

    margin:
        28px
        0
        8px;
}


.error {
    min-height: 22px;

    margin-top: 14px;

    color: #ff8f9b;

    text-align: center;
}


.success-message {
    min-height: 22px;

    margin-top: 14px;

    color: #76e39d;

    text-align: center;
}


/* ==========================================================
   CONNEXION / INSCRIPTION
   ========================================================== */

.account-buttons {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 10px;
}


.account-buttons button {
    margin-top: 0;
}


.account-form {
    margin-top: 20px;

    padding: 20px;

    border-radius: 18px;

    background: #191b36;
}


/* ==========================================================
   COMPTE CONNECTÉ
   ========================================================== */

.connected-profile {
    display: grid;

    grid-template-columns:
        60px
        1fr;

    gap: 14px;

    align-items: start;

    padding: 18px;

    border-radius: 18px;

    background: #191b36;
}


.account-info {
    display: flex;

    flex-direction: column;

    gap: 4px;
}


#account-username {
    font-size: 20px;
}


#account-level,
#account-xp {
    font-size: 13px;

    opacity: 0.7;
}


.logout-button {
    grid-column:
        1
        / -1;

    background: #383b73 !important;
}


.connected-play-message {
    text-align: center;

    color: #76e39d;

    font-weight: 700;

    margin-top: 20px;
}

#show-avatars {
    grid-column: 1 / -1;
}


.avatar-picker {

    grid-column: 1 / -1;

    display: none;

    grid-template-columns: repeat(auto-fill, minmax(64px, 64px));

    justify-content: center;

    gap: 12px;

    width: 100%;

    margin-top: 18px;

    padding: 16px;

    max-height: 340px;

    overflow-y: auto;

    border-radius: 16px;

    background: #15172e;
}

.avatar-picker:not(.hidden) {

    display: grid;
}


.card .avatar-choice {

    width: 64px !important;
    height: 64px !important;

    margin-top: 0 !important;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    overflow: hidden;

    border: 3px solid transparent;

    border-radius: 50%;

    background: #30346b;

    cursor: pointer;

    transition: .15s;

    flex: none;
}

.avatar-choice img {

    width: 78%;
    height: 78%;

    object-fit: contain;

    object-position: center;

    display: block;
}


.avatar-choice:hover {
    border-color: #8c82ff;
}


.avatar-choice.selected {
    border-color: #76e39d;
}

.profile-avatar-container {

    position: relative;

    width: 60px;
    height: 60px;
}


.account-avatar {

    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 50%;

    background: #2d315f;
}


.profile-avatar-container .avatar-edit-button {

    position: absolute;

    right: -6px;
    bottom: -6px;

    width: 26px !important;
    height: 26px !important;

    margin: 0 !important;

    min-width: 26px;

    border: none;

    border-radius: 50%;

    background: #6657e8;

    color: white;

    font-size: 18px;

    font-weight: bold;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    z-index: 5;
}

.avatar-edit-button:hover {

    transform: scale(1.1);

    background: #8176ff;
}

.hidden {
    display: none !important;
}

.account-stats {
    grid-column: 1 / -1;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin-top: 16px;
}


.account-stat {
    display: flex;

    flex-direction: column;

    gap: 4px;

    padding: 12px;

    border-radius: 12px;

    background: #15172e;

    text-align: center;
}


.account-stat span {
    font-size: 12px;

    opacity: 0.65;
}


.account-stat strong {
    font-size: 18px;
}


.account-stat-wide {
    grid-column: 1 / -1;
}