<style >
/* =========================
   LIGHT GOLDEN STYLE (ADAPTIVE)
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #f9f9fb;
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    /* КРИТИЧЕСКИЕ ФИКСЫ ДЛЯ МОБИЛЬНЫХ */
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Глобальный фикс горизонтального скролла */
body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* ======= LAYOUT ======= */
.main-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 10px 40px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Все контейнеры не должны выходить за пределы */
.container,
.container-fluid,
.main-wrapper,
.dashboard-layout,
.practices-page-layout {
    max-width: 100%;
    overflow-x: hidden;
}

/* ======= FILTER AREA (GROUP + SECTIONS) ======= */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
    width: 100%;
    max-width: 900px;
}

label {
    font-weight: 600;
    color: #555;
}

select {
    background: white;
    border: 2px solid #e0c14b;
    border-radius: 10px;
    padding: 10px 14px;
    color: #333;
    font-size: 1em;
    transition: border 0.2s, box-shadow 0.2s;
    cursor: pointer;
    min-width: 200px;
    max-width: 100%;
}

    select:focus {
        outline: none;
        border-color: #d4af37;
        box-shadow: 0 0 0 3px rgba(212,175,55,0.25);
    }

#section-select {
    min-width: 240px;
    min-height: 100px;
}

/* ======= SELECTED SECTION CHIPS ======= */
.selected-section-chip {
    display: inline-block;
    background: #d4af37;
    color: white;
    padding: 5px 10px;
    margin: 4px;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

    .selected-section-chip:hover {
        background: #e0c14b;
    }

    .selected-section-chip .remove {
        margin-left: 6px;
        font-weight: bold;
    }

/* ======= BUTTONS ======= */
button, .btn {
    background: linear-gradient(90deg, #ffe066 0%, #ffd000 100%);
    color: #333;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

    button:hover, .btn:hover {
        box-shadow: 0 4px 12px rgba(212,175,55,0.3);
    }

    button:active, .btn:active {
        transform: scale(0.97);
    }

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-telegram 0.6s linear;
    background: rgba(212,175,55,0.3);
}

@keyframes ripple-telegram {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* ======= PRACTICE CARDS ======= */
#practices-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.practice-block {
    border: 1.5px solid #e0c14b;
    border-radius: 12px;
    background: white;
    max-width: 750px;
    width: 100%;
    overflow: hidden;
    transition: box-shadow 0.25s, border-color 0.25s;
}

    .practice-block:hover {
        box-shadow: 0 6px 14px rgba(212,175,55,0.2);
        border-color: #d4af37;
    }

.practice-header {
    text-align: center;
    padding: 14px 20px;
    font-weight: 600;
    background: linear-gradient(90deg, #fff6d1 0%, #ffeb88 100%);
    cursor: pointer;
    transition: background 0.3s;
    color: #333;
}

    .practice-header:hover {
        background: linear-gradient(90deg, #ffec99 0%, #fff6d1 100%);
    }

.practice-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
}

    .practice-content.show {
        max-height: 1500px;
        padding: 20px;
    }

/* ======= MEDIA ======= */
.media-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

    .media-top img, .media-top video {
        max-width: 150px;
        max-height: 150px;
        border-radius: 8px;
        object-fit: cover;
        border: 1.5px solid #e0c14b;
        cursor: pointer;
        transition: transform 0.2s;
    }

        .media-top img:hover, .media-top video:hover {
            transform: scale(1.05);
        }

.media-wrapper {
    position: relative;
    display: inline-block;
}

.watermark {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 11px;
    color: rgba(0,0,0,0.5);
    background: rgba(255,255,255,0.6);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* ======= AUDIO ======= */
.audio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .audio-section audio {
        width: 100%;
        max-width: 700px;
    }

/* ======= TEXT & SECTIONS ======= */
.practice-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

    .practice-sections span {
        padding: 6px 12px;
        background: #fff6d1;
        color: #444; 
        border-radius: 14px;
        font-weight: 500;
        font-size: 0.95em;
    }

.practice-text {
    text-align: justify;
    color: #444;
    font-size: 1em;
}

/* ======= ТАБЛИЦЫ С ГОРИЗОНТАЛЬНЫМ СКРОЛЛОМ ======= */
.table-responsive,
.data-table-wrapper,
.users-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

table {
    max-width: 100%;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .practice-block {
        max-width: 95%;
    }

    .filter-row {
        flex-direction: column;
        align-items: center;
    }
    
    /* Сетки на мобильных - одна колонка */
    .explore-grid,
    .admin-quick-actions {
        grid-template-columns: 1fr !important;
    }
    
    /* Фиксы для overflow */
    .dashboard-layout,
    .practices-page-layout,
    .admin-layout {
        padding: 15px 10px 100px 10px;
    }
    
    /* Фильтры вертикально */
    .filters-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    select {
        width: 90%;
    }

    .practice-header {
        padding: 10px;
        font-size: 1em;
    }

    .practice-content.show {
        padding: 12px;
    }

    .media-top img, .media-top video {
        max-width: 100%;
    }
    
    /* Минимальные отступы на очень маленьких экранах */
    .container,
    .dashboard-layout,
    .practices-page-layout {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ======= SELECTION SAFETY ======= */
body, img, video, a {
    -webkit-user-select: none;
    user-select: none;
}

#group-select, #section-select, textarea, input[type="text"], input[type="search"] {
    -webkit-user-select: auto !important;
    user-select: auto !important;
}

</style >
