/* ------------------------------------------------ */
/* --- БЛОК 1: Общие оверлеи и контейнеры --- */
/* ------------------------------------------------ */
.share-modal-overlay,
.confirmation-modal-overlay,
.add-to-playlist-modal-overlay,
.modal-overlay-small {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.share-modal-overlay.active,
.confirmation-modal-overlay.active,
.add-to-playlist-modal-overlay.active,
.modal-overlay-small.active {
    display: flex;
}

.share-modal-content,
.confirmation-modal-content,
.add-to-playlist-modal-content,
.modal-content-small {
    position: relative;
    background-color: #282828;
    border-radius: 12px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f1f1; 
    font-family: 'Roboto', sans-serif; 
    transform: scale(var(--overlay-ui-scale, 1));
    transform-origin: center center;
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
    z-index: 5;
}

.modal-close-button:hover {
    color: #fff;
}


/* ------------------------------------------------ */
/* --- БЛОК 2: ОКНО ПОДТВЕРЖДЕНИЯ --- */
/* ------------------------------------------------ */

.confirmation-modal-content {
    max-width: 420px;
    padding: 24px 32px;
    text-align: left;
}

.confirmation-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.confirmation-modal-body {
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.confirmation-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.confirmation-modal-button {
    border-style: none;
    border-radius: 18px;
    padding: 10px 24px;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.confirmation-modal-button.cancel {
    background: none;
    color: #3ea6ff;
}

.confirmation-modal-button.cancel:hover {
    background-color: rgba(62, 166, 255, 0.1);
}

.confirmation-modal-button.confirm {
    background-color: #3ea6ff;
    color: #0f0f0f;
}

.confirmation-modal-button.confirm:hover {
    background-color: #65b8ff;
}


/* ------------------------------------------------ */
/* --- БЛОК 3: Окно "Поделиться" --- */
/* ------------------------------------------------ */

.share-modal-content {
    max-width: 500px;
    padding: 24px 32px;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.share-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.share-modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: #fff;
}

.share-social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.social-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #f1f1f1;
    transition: opacity 0.2s;
}

.social-link-item:hover {
    opacity: 0.8;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.social-name {
    font-size: 13px;
}

.social-link-item[data-network="twitter"] .social-icon {
    transform: scale(1.15);
}

.social-link-item[data-network="telegram"] .social-icon {
    transform: scale(1.10);
}

.share-link-container {
    display: flex;
    align-items: center;
    background-color: #121212;
    border: 1px solid #3f3f3f;
    border-radius: 12px;
    padding: 8px;
}

.share-link-input {
    flex-grow: 1;
    background: none;
    border: none;
    outline: none;
    padding: 4px 8px;
    color: #f1f1f1;
    font-size: 14px;
    font-family: inherit;
}

.share-copy-button {
    background-color: #3ea6ff;
    color: #0f0f0f;
    border: none;
    border-radius: 18px;
    padding: 8px 20px;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: background-color 0.2s;
    font-family: inherit;
}

.share-copy-button:hover {
    background-color: #65b8ff;
}

/* ------------------------------------------------ */
/* --- ShareX: новый стиль "Поделиться" --- */
/* ------------------------------------------------ */

#share-modal .sharex-content.share-modal-content {
    max-width: 500px;
    padding: 20px 22px 16px;
    border-radius: 14px;
    background: #282828;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

#share-modal .sharex-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease;
}
#share-modal .sharex-close:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

#share-modal .sharex-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-right: 44px;
}

#share-modal .sharex-badge {
    display: none;
}

#share-modal .sharex-title {
    font-size: 21px;
    margin: 0 0 4px 0;
    font-weight: 700;
}

#share-modal .sharex-subtitle {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.35;
}

#share-modal .sharex-grid.share-social-links {
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    row-gap: 10px;
    margin: 0 0 14px 0;
}

#share-modal .sharex-item.social-link-item {
    min-width: 90px;
    padding: 8px 6px;
    border-radius: 10px;
    background: transparent;
    border: none;
    transition: background 0.18s ease, transform 0.18s ease;
}
#share-modal .sharex-item.social-link-item:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

#share-modal .sharex-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
}

#share-modal .sharex-item .social-icon {
    width: 26px;
    height: 26px;
    border-radius: 0;
    object-fit: contain;
}

#share-modal .sharex-item .social-name {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

#share-modal .sharex-link.share-link-container {
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 4px;
}

#share-modal .sharex-input.share-link-input {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

#share-modal .sharex-copy.share-copy-button {
    border-radius: 18px;
    padding: 8px 18px;
    background: #3ea6ff;
    border: none;
    color: #0f0f0f;
    font-weight: 700;
}
#share-modal .sharex-copy.share-copy-button:hover {
    background: #65b8ff;
}

#share-modal .sharex-footnote {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.35;
}

/* ------------------------------------------------ */
/* --- БЛОК 4: Окно "Добавить в плейлист" --- */
/* ------------------------------------------------ */

.add-to-playlist-modal-content {
    max-width: 400px;
    overflow: hidden;
}

.add-to-playlist-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #3f3f3f;
}

.add-to-playlist-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.add-to-playlist-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #e8e8e8;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.add-to-playlist-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.playlist-selection-list {
    padding: 8px 0;
    max-height: 250px;
    overflow-y: auto;
}

.playlist-selection-item {
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.playlist-selection-item:hover {
    background-color: #3f3f3f;
}

.no-playlists-message {
    padding: 16px 24px;
    color: #aaa;
    font-style: italic;
}

.create-new-playlist-section {
    border-top: 1px solid #3f3f3f;
    padding: 8px 0;
}

.create-new-playlist-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    color: #f1f1f1;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
}

.create-new-playlist-link:hover {
    background-color: #3f3f3f;
}

.create-new-playlist-link img {
    width: 24px;
    height: 24px;
    filter: invert(1);
}


/* ------------------------------------------------ */
/* --- БЛОК 5: Маленькие модальные окна (Create Playlist, Login Required) --- */
/* ------------------------------------------------ */

.modal-content-small {
    max-width: 400px;
    padding: 24px;
    background-color: #212121;
    overflow: visible;
}

.modal-content-small-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-content-small-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-align: left;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.modal-content-small > h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px 0;
    text-align: left;
}

.modal-content-small-close {
    position: static;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    padding: 0;
}

.form-group-small {
    margin-bottom: 20px;
}

.form-group-small label {
    display: block;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
}

.form-group-small input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background-color: #121212;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #f1f1f1;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group-small input[type="text"]:focus {
    border-color: #3ea6ff;
}

#create-playlist-fly-modal .modal-content-small {
    overflow: visible;
}

.custom-select-container {
    position: relative;
    z-index: 2;
}

#create-playlist-fly-modal .custom-select-container.open {
    z-index: 3200;
}

.custom-select-button {
    width: 100%;
    padding: 12px 14px;
    background-color: #121212;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #f1f1f1;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-select-arrow {
    width: 16px;
    height: 16px;
    filter: invert(1);
    transition: transform 0.3s ease;
}

.custom-select-container.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #282828;
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 3100;
    overflow: hidden;
}

.playlist-description-textarea {
    width: 100%;
    padding: 12px 14px;
    background-color: #121212;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #f1f1f1;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    resize: none;
    min-height: 96px;
}

.playlist-description-counter {
    margin-top: 8px;
    color: #aaa;
    font-size: 12px;
    text-align: right;
}

.custom-select-container.open .custom-select-dropdown {
    display: block;
}

.custom-select-option {
    padding: 12px 14px;
    font-size: 16px;
    cursor: pointer;
    color: #f1f1f1;
    transition: background-color 0.2s;
}

.custom-select-option:hover {
    background-color: #3f3f3f;
}

/* --- Футер и кнопки в маленьких модалках --- */

.modal-footer-small {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal-button-small {
    border: none;
    border-radius: 18px;
    padding: 8px 20px;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    transition: background-color .2s;
}

.modal-button-small.cancel {
    background-color: transparent;
    color: #f1f1f1;
}

.modal-button-small.cancel:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-button-small.create {
    background-color: #3ea6ff;
    color: #0f0f0f;
}

.modal-button-small.create:disabled {
    background-color: #aaa;
    color: #555;
    cursor: not-allowed;
}

.modal-button-small.create:hover:not(:disabled) {
    background-color: #65b8ff;
}

/* --- Стили для окна входа (Login Required) --- */

.login-modal-content {
    text-align: center;
}

.login-modal-content h3 {
    font-size: 22px;
    margin: 0 0 16px 0;
    text-align: center;
    color: #f1f1f1;
}

.login-modal-content .login-modal-text {
    color: #b8b8b8;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 24px 0;
}

.login-modal-content .login-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.login-modal-actions .modal-button-small {
    flex: 1;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
}

.login-modal-actions .modal-button-small.create {
    background-color: #f1f1f1;
    color: #0f0f0f;
}

.login-modal-actions .modal-button-small.create:hover {
    background-color: #dcdcdc;
}

.login-modal-actions .modal-button-small.secondary {
    background-color: rgba(255, 255, 255, 0.06);
    color: #e8e8e8;
    border-color: #5a5a5a;
}

.login-modal-actions .modal-button-small.secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #707070;
}


/* ------------------------------------------------ */
/* --- БЛОК 6: Стили для уведомлений (Toast) и валидации --- */
/* ------------------------------------------------ */

.notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    padding: 12px 24px;
    background-color: #282828;
    color: #f1f1f1;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.notification.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.error {
    background-color: #c62828;
    color: #fff;
}


/* --- Стили валидации (сообщения под полем) --- */

.input-wrapper-small {
    position: relative;
    margin-bottom: 28px;
}

.form-group-small input.input-error {
    border-color: #ff5252;
}

.input-error-message-small {
    position: absolute;
    bottom: -20px;
    left: 5px;
    color: #ff8a80;
    font-size: 13px;
    text-align: left;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.input-error-message-small.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------------ */
/* --- БЛОК 7: Окно "Пожаловаться" (Report Modal) --- */
/* ------------------------------------------------ */

.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}
.report-modal-overlay.active { display: flex; }

.report-modal-content {
    background-color: #282828;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #f1f1f1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.report-modal-header {
    padding: 24px;
    border-bottom: 1px solid #3f3f3f;
    flex-shrink: 0;
}

.report-modal-title {
    font-size: 22px;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.report-modal-body {
    padding: 8px 24px 24px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.report-option {
    display: flex;
    align-items: center;
    padding: 12px 0;
}

.report-option input[type="radio"] { display: none; }

.report-option label {
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    position: relative;
    padding-left: 36px;
    line-height: 1.5;
}

.report-option label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #909090;
    border-radius: 50%;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.report-option label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    background-color: #3ea6ff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.report-option input[type="radio"]:checked + label::before { border-color: #3ea6ff; }
.report-option input[type="radio"]:checked + label::after { transform: translateY(-50%) scale(1); }

.other-reason-container {
    display: none;
    margin-top: 8px;
    margin-left: 36px;
}
.other-reason-container.is-visible { display: block; }

.report-other-textarea-scroll {
    margin-top: 4px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), 0 2px 12px rgba(0, 0, 0, 0.35);
}

#other-reason-details,
#comment-other-reason-details {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 72px;
    padding: 12px 12px;
    background: transparent;
    border: none;
    color: #f1f1f1;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    overflow-y: auto;
}

#other-reason-details::-webkit-scrollbar,
#comment-other-reason-details::-webkit-scrollbar { width: 10px; }

#other-reason-details::-webkit-scrollbar-track,
#comment-other-reason-details::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 999px; }

#other-reason-details::-webkit-scrollbar-thumb,
#comment-other-reason-details::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(101, 184, 255, 0.45), rgba(62, 166, 255, 0.30));
    border-radius: 999px;
}

#other-reason-details::-webkit-scrollbar-thumb:hover,
#comment-other-reason-details::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(101, 184, 255, 0.55), rgba(62, 166, 255, 0.35));
}

#other-reason-details::placeholder,
#comment-other-reason-details::placeholder { color: rgba(255, 255, 255, 0.38); }

#other-reason-details:focus,
#comment-other-reason-details:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(62, 166, 255, 0.45);
    border-radius: 10px;
}

.char-counter { text-align: right; font-size: 13px; color: #aaa; margin-top: 8px; }

.report-modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #3f3f3f;
    flex-shrink: 0;
}

.report-button {
    padding: 10px 24px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.report-button.cancel { background-color: transparent; color: #3ea6ff; }
.report-button.cancel:hover { background-color: rgba(62, 166, 255, 0.1); }

.report-button.submit { background-color: #3ea6ff; color: #0f0f0f; }
.report-button.submit:hover { background-color: #65b8ff; }
.report-button.submit:disabled { background-color: #3f3f3f; color: #909090; cursor: not-allowed; }

/* ── Мобильные / планшеты: модальные окна (троеточие, share, report, premium) ── */
@media (max-width: 900px) {
    .share-modal-overlay,
    .confirmation-modal-overlay,
    .add-to-playlist-modal-overlay,
    .modal-overlay-small,
    .report-modal-overlay,
    .modal-overlay {
        align-items: center;
        justify-content: center;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        box-sizing: border-box;
    }

    .share-modal-content,
    .confirmation-modal-content,
    .add-to-playlist-modal-content,
    .modal-content-small,
    .report-modal-content,
    .modal-content,
    #share-modal .sharex-content.share-modal-content,
    .premium-download-modal-content.premiumx-content {
        width: min(100%, calc(100vw - 24px)) !important;
        max-width: min(640px, calc(100vw - 24px)) !important;
        max-height: min(58vh, 58dvh) !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
        margin: 0 auto;
    }

    .report-modal-content {
        display: flex;
        flex-direction: column;
        max-height: none !important;
        overflow: visible !important;
        width: min(100%, calc(100vw - 20px)) !important;
    }

    .report-modal-header {
        padding: 10px 14px 6px !important;
        flex-shrink: 0;
    }

    .report-modal-title {
        font-size: 17px !important;
        line-height: 1.2 !important;
    }

    .report-modal-body {
        overflow: visible !important;
        max-height: none !important;
        padding: 2px 14px 6px !important;
        flex-shrink: 0;
    }

    .report-option {
        padding: 3px 0 !important;
        align-items: flex-start;
    }

    html.original-theme .report-option:hover,
    body.original-theme .report-option:hover {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .report-option label {
        font-size: 13px !important;
        line-height: 1.28 !important;
        padding-left: 28px !important;
    }

    .report-option label::before {
        width: 16px;
        height: 16px;
        top: 0.65em;
        transform: translateY(-50%);
    }

    .report-option label::after {
        left: 4px;
        width: 8px;
        height: 8px;
        top: 0.65em;
    }

    .other-reason-container {
        margin-top: 4px !important;
        margin-left: 28px !important;
    }

    .other-reason-container #other-reason-details,
    .other-reason-container #comment-other-reason-details {
        min-height: 56px;
        max-height: 72px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .other-reason-container .char-counter {
        margin-top: 4px;
        font-size: 11px;
    }

    .report-modal-footer {
        padding: 8px 14px 10px !important;
        flex-shrink: 0;
    }

    .report-button {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    /* Прокрутка только при выборе «Другое» */
    .report-modal-content:has(.other-reason-container.is-visible) {
        max-height: min(88vh, 88dvh) !important;
        overflow: hidden !important;
    }

    .report-modal-content:has(.other-reason-container.is-visible) .report-modal-body {
        overflow-y: auto !important;
        max-height: calc(min(88vh, 88dvh) - 108px) !important;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 1;
        min-height: 0;
    }

    /* Поделиться — компактная плашка */
    #share-modal .sharex-content.share-modal-content,
    #live-share-modal .sharex-content.share-modal-content {
        padding: 12px 14px 10px !important;
        max-height: none !important;
        overflow: visible !important;
        width: min(100%, calc(100vw - 20px)) !important;
    }

    #share-modal .sharex-head {
        margin-bottom: 6px !important;
        padding-right: 34px !important;
        gap: 0 !important;
    }

    #share-modal .sharex-title {
        font-size: 17px !important;
        margin: 0 0 2px !important;
    }

    #share-modal .sharex-subtitle {
        font-size: 11.5px !important;
        line-height: 1.3 !important;
    }

    #share-modal .sharex-grid.share-social-links,
    #live-share-modal .sharex-grid.share-social-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 12px !important;
        row-gap: 0 !important;
        margin: 0 0 10px !important;
        overflow: visible !important;
        max-height: none !important;
    }

    #share-modal .sharex-item.social-link-item,
    #live-share-modal .sharex-item.social-link-item {
        min-width: 0 !important;
        flex: 1 1 0 !important;
        padding: 6px 4px !important;
        gap: 6px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    #share-modal .sharex-item.social-link-item:hover,
    #live-share-modal .sharex-item.social-link-item:hover {
        background: transparent !important;
        transform: none !important;
    }

    #share-modal .sharex-icon,
    #live-share-modal .sharex-icon {
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #share-modal .sharex-item .social-icon,
    #live-share-modal .sharex-item .social-icon {
        width: 52px !important;
        height: 52px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        filter: none !important;
    }

    #share-modal .sharex-item .social-name,
    #live-share-modal .sharex-item .social-name {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    html.original-theme #share-modal .sharex-icon,
    html.original-theme #live-share-modal .sharex-icon,
    body.original-theme #share-modal .sharex-icon,
    body.original-theme #live-share-modal .sharex-icon {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    html.original-theme #share-modal .sharex-item.social-link-item:hover,
    html.original-theme #live-share-modal .sharex-item.social-link-item:hover,
    body.original-theme #share-modal .sharex-item.social-link-item:hover,
    body.original-theme #live-share-modal .sharex-item.social-link-item:hover {
        background: transparent !important;
        border-radius: 0 !important;
    }

    #share-modal .sharex-link.share-link-container {
        padding: 6px !important;
        margin-bottom: 0 !important;
    }

    #share-modal .sharex-input.share-link-input {
        font-size: 12px !important;
        padding: 2px 6px !important;
    }

    #share-modal .sharex-copy.share-copy-button {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    #share-modal .sharex-close {
        width: 30px !important;
        height: 30px !important;
        top: 8px !important;
        right: 8px !important;
        font-size: 18px !important;
    }

    .confirmation-modal-footer,
    .report-modal-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .confirmation-modal-button,
    .report-button {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .confirmation-modal-content {
        padding: 20px 18px;
    }

    .report-modal-header,
    .report-modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal-close-button {
        top: 8px;
        right: 8px;
    }
}
