/* Поиск */
.mat-grid-search-form {
    margin-bottom: 10px;
    display: flex;
    gap: 5px;
}

.mat-grid-search-input {
    flex: 1;
    padding: 5px 8px;
    border-radius: 3px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.mat-grid-search-btn {
    padding: 5px 10px;
    border-radius: 3px;
    border: 0;
    background: #333;
    color: #fff;
    cursor: pointer;
}

.mat-grid-search-btn:hover {
    background: #555;
}

/* Сетка онлайн-моделей */
.mat-online-grid-wrapper {
    position: relative;
}

.mat-online-grid-loading {
    text-align: center;
    color: #666;
    padding: 10px 0;
}

.mat-online-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.mat-grid-item {
    width: 150px;
    text-align: center;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.mat-grid-item:hover {
    box-shadow: 0 0 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.mat-grid-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

.mat-grid-username {
    margin-top: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #222;
    word-break: break-word;
}

/* избранные */
.mat-grid-item-fav {
    border-color: #ff9800;
    box-shadow: 0 0 8px rgba(255,152,0,0.6);
}

/* Пагинация */
.mat-grid-pagination {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.mat-grid-page-btn {
    background: #333;
    color: #fff;
    border: 0;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.mat-grid-page-btn:hover {
    background: #555;
}

.mat-grid-page-info {
    color: #fff;
    font-size: 14px;
}

/* Модальное окно */
.mat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mat-modal-content {
    position: relative;
    background: #fff;
    max-width: 960px;
    width: 100%;
    border-radius: 6px;
    padding: 10px 10px 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #fff;
}

.mat-modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.mat-modal-title {
    margin: 0 0 8px;
    font-size: 16px;
    text-align: left;
}

/* HTML блоки над/под плеером */
.mat-modal-top-block,
.mat-modal-bottom-block {
    margin: 8px 0;
    font-size: 13px;
    color: #fff;
}

/* контейнер под iframe 16:9 по умолчанию */
.mat-modal-iframe-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.mat-modal-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Блок регистрации моделей/вебмастеров */
.mat-signup-block {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fafafa;
}

.mat-signup-title {
    margin: 0 0 8px;
    font-size: 16px;
}

.mat-signup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mat-signup-btn {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 3px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.mat-signup-btn-model {
    background: #e91e63;
}

.mat-signup-btn-webmaster {
    background: #3f51b5;
}

.mat-signup-btn-common {
    background: #009688;
}

.mat-signup-btn:hover {
    opacity: 0.85;
}

/* Мобильная адаптация модального плеера */
@media (max-width: 767px) {
    .mat-modal-overlay {
        padding: 0;
    }

    .mat-modal-content {
        max-width: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 5px 5px 10px;
    }

    .mat-modal-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .mat-modal-top-block,
    .mat-modal-bottom-block {
        font-size: 12px;
        margin: 4px 0;
    }

    .mat-modal-iframe-wrap {
        position: relative;
        padding-bottom: 0;
        height: calc(100% - 70px);
    }

    .mat-modal-iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}
