.by-rooms-wrapper {
    /* background: #5f8783; */
    padding: 40px 20px;
    font-family: "Montserrat", sans-serif;
    max-width: 100%;
}

.by-rooms-title {
    text-align: center;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 35px;
    letter-spacing: 1px;
}

.by-rooms-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    justify-items: center;
}

.by-room-card {
    width: 100%;
    min-height: 220px;
    background: #a9d9d5;
    border-radius: 24px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.by-room-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.by-room-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    background: #fff;
    border: 2px solid #2e2e2e;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.by-room-card h3 {
    margin: 0 0 10px;
    color: #1f2d2c;
    font-size: 22px;
    font-weight: 700;
}

.by-room-card p {
    margin: 0;
    color: #1f2d2c;
    font-size: 14px;
    line-height: 1.35;
}

.by-room-card:nth-child(4) {
    grid-column: 1 / 2;
    transform: translateX(50%);
}

.by-room-card:nth-child(5) {
    grid-column: 3 / 4;
    transform: translateX(-50%);
}

.by-chat-box {
    max-width: 860px;
    height: 640px;
    margin: 0 auto;
    background: #f5f7f7;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.by-chat-header {
    background: #a9d9d5;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.by-chat-header h3 {
    margin: 0;
    font-size: 22px;
    color: #1f2d2c;
}

.by-chat-header span {
    font-size: 13px;
    color: #35514f;
}

.by-chat-back {
    width: 42px;
    height: 42px;
    border: none;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
}

.by-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #eef5f4;
}

.by-message {
    max-width: 76%;
    margin-bottom: 15px;
    padding: 14px 17px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.by-message.user {
    margin-left: auto;
    background: #5f8783;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.by-message.assistant {
    margin-right: auto;
    background: #fff;
    color: #1f2d2c;
    border-bottom-left-radius: 4px;
}

.by-message.loading {
    background: #fff;
    color: #777;
    font-style: italic;
}

.by-chat-form {
    padding: 16px;
    background: #fff;
    display: flex;
    gap: 12px;
    border-top: 1px solid #ddd;
}

.by-chat-form textarea {
    flex: 1;
    resize: none;
    min-height: 48px;
    max-height: 110px;
    border: 1px solid #ccc;
    border-radius: 16px;
    padding: 14px;
    font-family: "Montserrat", sans-serif;
    outline: none;
}

.by-chat-form button {
    border: none;
    background: #5f8783;
    color: #fff;
    padding: 0 24px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
}

.by-chat-form button:hover {
    background: #4e7571;
}

@media (max-width: 900px) {
    .by-rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .by-room-card:nth-child(4),
    .by-room-card:nth-child(5) {
        grid-column: auto;
        transform: none;
    }
}

@media (max-width: 600px) {
    .by-rooms-wrapper {
        padding: 30px 14px;
    }

    .by-rooms-title {
        font-size: 24px;
    }

    .by-rooms-grid {
        grid-template-columns: 1fr;
    }

    .by-room-card {
        min-height: 190px;
    }

    .by-chat-box {
        height: 620px;
        border-radius: 18px;
    }

    .by-message {
        max-width: 90%;
        font-size: 14px;
    }

    .by-chat-form {
        flex-direction: column;
    }

    .by-chat-form button {
        height: 46px;
    }
}

.by-room-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
    margin: auto;
}