body {
    color: white;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    user-select: none !important;
    background-color: black;
}

input:focus,
textarea:focus {
    outline: none;
}

.world_archive {
    display: flex;
    flex-direction: row;
}

.center_box {
    display: flex;
    justify-content: center;
    align-content: flex-start;
    gap: 20px;

    width: 70%;
}

.archive_text {
    top: 15px;
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 20px;
}

.left_box {
    width: 15%;
    position: sticky;
    height: 100vh;
}

.right_box {
    width: 15%;
    height: 100vh;
}

.message_text {
    position: fixed;
    overflow: visible;
    width: 60%;
    bottom: 20px;
    align-content: center;
    display: flex;
    flex-direction: row;
}

::selection {
    background: white;
    color: black;
}

.style_text_input {
    background-color: black;
    color: white;
    resize: none;
    align-content: center;
    height: 70px;
    width: 100%;
    padding: 30px 30px 30px 30px;
    border: 0;
    box-shadow: inset 0 0 0 0.3px gray;
    overflow-y: auto;
    position: relative;
}

.liked {
    box-shadow: inset 0 0 0 0.3px lime;
}

.form_transaction {
    display: flex;
    flex-direction: column;
    width: 10%;
}

.button_send_message {
    height: 50%;
    border: 0;
    width: auto;
    min-width: 110px;
    background-color: black;
    color: white;
    box-shadow: inset 0 0 0 0.3px gray;
}

.button_send_message:hover {
    background-color: white;
    color: black;
    cursor: pointer;
}

.price_message {
    height: 50%;
    text-align: center;
    border: 0;
    background-color: black;
    color: white;
    width: auto;
    min-width: 106px;
    transition: color 0.3s ease;
    box-shadow: inset 0 0 0 0.3px gray;
}

.price-up {
    color: lime;
}

.price-down {
    color: red;
}

::-webkit-scrollbar {
    display: none;
}

/* =========================
   CONTAINER
========================= */

.confirm_message {
    position: fixed;
    top: 100px;
    width: 40%;
    z-index: 999;
}

.output_text_users {
    background-color: black;
    color: white;
    border: 0;
    height: 120px;
    width: 300px;
    padding: 20px;
    box-shadow: inset 0 0 0 0.3px gray;
    box-sizing: border-box;
    overflow-y: auto;
    resize: none;
    margin: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: pointer;
}

.output_text_users:hover {
    transform: scale(1.05);
}

.output_text_users_click {
    width: 600px;
    height: 200px;
}

/* =========================
   FORM
========================= */

.pay_form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;

    background-color: black;
    width: 100%;
    padding: 20px;

    box-shadow: inset 0 0 0 1px gray;
}

/* =========================
   INPUTS
========================= */

#enter_name,
#enter_email,
#confirm_price {
    background-color: black;
    color: white;

    border: 0;
    box-shadow: inset 0 0 0 1px gray;

    padding: 10px;
    box-sizing: border-box;
    width: 50%;
}

/* =========================
   TEXTAREA
========================= */

.style_text_pay {
    background-color: black;
    color: white;
    resize: none;

    height: 80px;
    width: 50%;

    padding: 30px;
    border: 0;
    box-shadow: inset 0 0 0 1px gray;
    box-sizing: border-box;

    overflow-y: auto;
    cursor: pointer;

    transition: height 0.5s ease, width 0.5s ease;
}

.style_text_pay2 {
    height: 250px;
    width: 100%;
}

/* =========================
   BUTTONS
========================= */

.dop_opt {
    display: flex;
    gap: 10px;
}

#back_to_message,
#pay_to_message,
#paypal {
    background-color: black;
    border: 0;
    box-shadow: inset 0 0 0 1px gray;
    padding: 20px;
    transition: opacity 0.5s ease;
    color: white;
}

/* hover */

#back_to_message:hover,
#pay_to_message:hover,
#paypal:hover {
    background-color: white;
    color: black;
    cursor: pointer;
}

/* blocked button */

.blocked_button {
    opacity: 50%;
}

/* information line */

#line_users_information {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

/* table rank*/

.rank_table {
    width: 100%;
    border-collapse: collapse;
    color: white;
    font-size: 12px;
}

.rank_table th,
.rank_table td {
    padding: 6px;
    text-align: center;
}

.rank_table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* заголовок */
.rank_table th {
    font-weight: bold;
    border-bottom: 2px solid white;
}

/* пустые строки */
.rank_table .empty {
    opacity: 0.3;
}

/* топ 3 */

/* 1 место — золото */
.rank_table tr:nth-child(2) td {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 10px 8px rgb(255, 217, 0);
}

.rank_table tr:nth-child(2):hover td {
    background-color: #FFD700;
    cursor: pointer;
    color: black;
    transform: scale(1.2);
}

/* 2 место — серебро */
.rank_table tr:nth-child(3) td {
    color: #C0C0C0;
    font-weight: 700;
    text-shadow: 0 10px 8px rgb(192, 192, 192);
}

.rank_table tr:nth-child(3):hover td {
    background-color: #C0C0C0;
    cursor: pointer;
    color: black;
    transform: scale(1.2);
}

/* 3 место — бронза */
.rank_table tr:nth-child(4) td {
    color: #CD7F32;
    font-weight: 700;
    text-shadow: 0 10px 8px rgb(249, 134, 20);
}

.rank_table tr:nth-child(4):hover td {
    background-color: #CD7F32;
    cursor: pointer;
    color: black;
    transform: scale(1.2);
}

/* остальные строки */
.rank_table tr:not(:nth-child(-n+4)):hover td {
    background-color: white;
    color: black;
    cursor: pointer;
    transform: scale(1.2);
}

.refresh_wrapper {
    position: sticky;
    top: 10px;
    z-index: 10;
    display: flex;
    justify-content: center;
    width: 100%;
    pointer-events: none;
}

.refresh_btn {
    pointer-events: auto;
    background: black;
    color: white;
    border: 1px solid white;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    width: auto;
}

.refresh_btn:hover {
    background: white;
    color: black;
    transform: scale(1.05);
}

.viewing_user {
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
    color: white;
}

.filters_panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

/* кнопки */
.filter_btn {
    background: black;
    color: white;
    border: 1px solid white;
    padding: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.filter_btn:hover {
    background: white;
    color: black;
    transform: scale(1.05);
}

/* группы */
.filter_group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* input */
.filter_group input {
    background: black;
    color: white;
    border: 1px solid white;
    padding: 5px;
    font-size: 12px;
}

/* кнопки внутри */
.filter_group button {
    background: black;
    color: white;
    border: 1px solid white;
    padding: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.filter_group button:hover {
    background: white;
    color: black;
    transform: scale(1.05);
}

/* разделители */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 5px 0;
}

/* подпись */
.filter_label {
    font-size: 11px;
    opacity: 0.6;
}

.load_more {
    height: 120px;
    line-height: 80px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    background: black;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.load_more:hover {
    transform: scale(1.05);
    background-color: white;
    color: black;
}

/* =========================
   MOBILE ADAPTATION
========================= */

@media (max-width:768px) {

    /* главный контейнер */
    .world_archive {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        align-items: flex-start;
    }

    /* FILTERS слева */
    .left_box {
        width: 50%;
        min-width: 100px;
        height: auto;
        position: relative;
    }

    /* RANK справа (куда ты обвёл) */
    .right_box {
        width: 50%;
        min-width: 0;

        height: 340px;
        /* высота примерно как фильтры */
        overflow-y: auto;

        position: relative;
    }

    .right_box::-webkit-scrollbar {
        display: none;
    }

    /* компактный рейтинг */
    .rank_table {
        width: 100%;
        font-size: 9px;
    }

    .rank_table th,
    .rank_table td {
        padding: 2px;
    }

    /* ЦЕНТР идёт ниже под ними */
    .center_box {
        width: 100%;
        order: 3;
        /* отправляем вниз */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* сообщения */
    .archive_text {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 15px;
        gap: 10px;
    }

    .output_text_users {
        width: 92%;

        height: 120px;

        font-size: 12px;
        padding: 12px;
    }

    .output_text_users_click {
        height: auto;
        height: 200px;
    }

    .output_text_users:hover {
        transform: none;
    }

    /* фильтры чуть компактнее */
    .filter_btn,
    .filter_group button,
    .filter_group input {
        font-size: 10px;
        padding: 5px;
        width: 100%;
    }

    /* строка ввода */
    .message_text {
        position: fixed;

        width: 100%;
        left: 0;
        bottom: 0;

        padding: 10px;
        box-sizing: border-box;

        display: flex;
        flex-direction: row;
        align-items: stretch;

        min-height: 90px;

        background: black;
        z-index: 1000;
    }

    .style_text_input {
        min-height: 100px;
        height: 100px;

        padding: 15px;
        box-sizing: border-box;
    }

    .form_transaction {
        width: auto;
        min-width: 45px;
        flex-shrink: 0;
        min-height: 90px;
    }

    .button_send_message,
    .price_message {
        height:49px;
    }

    /* PAY FORM MOBILE FIX */

    .confirm_message {
        width: 95%;
        left: 50%;
        transform: translateX(-50%);
        top: 60px;

        box-sizing: border-box;
    }

    .pay_form {
        width: 100%;
        padding: 15px;
    }

    #enter_name,
    #enter_email,
    #confirm_price {
        width: 100%;
        max-width: none;
    }

    .style_text_pay {
        width: 100%;
        height: 120px;
        padding: 15px;
    }

    .dop_opt {
        width: 100%;

        display: flex;
        flex-direction: column;
        /* кнопки вниз */
        gap: 8px;
    }

    #back_to_message,
    #pay_to_message,
    #paypal {
        width: 100%;
        padding: 14px;
    }

}