.app-hidden {
    opacity: 0;
    visibility: hidden;
}

#app {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

:root {
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

body {
    background-color: #000000;  /* Изменили на чёрный */
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    min-height: -webkit-fill-available;
    position: relative;
    overflow-x: hidden;
}

/* Верхнее правое пятно */
body::before {
    content: '';
    position: fixed;
    width: 600px;          /* Уменьшили с 1000px */
    height: 600px;         /* Уменьшили с 1000px */
    top: -200px;          /* Подвинули ближе */
    right: -200px;        /* Подвинули ближе */
    background: radial-gradient(circle,
        rgba(138, 43, 226, 0.2) 0%,   /* Уменьшили прозрачность с 0.2 */
        rgba(138, 43, 226, 0) 70%
    );
    z-index: 0;
    pointer-events: none;
}

/* Нижнее левое пятно */
body::after {
    content: '';
    position: fixed;
    width: 500px;          /* Уменьшили с 800px */
    height: 500px;         /* Уменьшили с 800px */
    bottom: -150px;        /* Подвинули ближе */
    left: -150px;         /* Подвинули ближе */
    background: radial-gradient(circle,
        rgba(147, 51, 234, 0.15) 0%,  /* Уменьшили прозрачность с 0.15 */
        rgba(147, 51, 234, 0) 70%
    );
    z-index: 0;
    pointer-events: none;
}

.scroll-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(110px + var(--safe-area-bottom));
    background: transparent;
}

.scroll-container::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px; /* Высота затемнения */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 3.8) 100%
    );
    pointer-events: none;
    z-index: 100;
}

.header {
    padding: 16px;
    padding-top: calc(80px + var(--safe-area-top));
    background: transparent;
    position: relative;
    z-index: 1;
}

.welcome-text {
    color: #00ff9d;
    margin: 0;
    font-size: 1.5em;
}

.app-description {
    color: #cccccc;
    margin: 8px 0 0 0;
    font-size: 0.9em;
}

.content-list {
    display: grid;
    gap: 16px;
    padding: 16px;
    position: relative;
    z-index: 1;
}

.content-card {
    background: linear-gradient(145deg, rgba(34, 34, 34, 0.95), rgba(42, 42, 42, 0.95));
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.price {
    color: #00ff9d;
    font-weight: bold;
    margin-top: 8px;
}

.nav-button {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-button.active {
    opacity: 1;
}

.nav-button:active {
    transform: scale(0.95);
}

/* Стили для тегов в ленте */
.tags-filter {
    margin-top: 16px;
    overflow: hidden;
}

.tags-scroll {
    display: flex;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
}

.tags-scroll::-webkit-scrollbar {
    display: none;
}

.tag-filter-button {
    flex-shrink: 0;
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter-button.active {
    background: #00ff9d;
    color: #1a1a1a;
}

.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

/* Стили для админки */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.admin-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.admin-textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-button {
    background: #00ff9d;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.admin-tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.admin-tag-name {
    color: #00ff9d;
}

.admin-tag-delete {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.content-tags-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.tag-checkbox-input {
    display: none;
}

.tag-checkbox-label {
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tag-checkbox-input:checked + .tag-checkbox-label {
    background: #00ff9d;
    color: #1a1a1a;
}

.empty-state {
    text-align: center;
    color: #cccccc;
    padding: 32px 16px;
}

/* Стили для изображений */
.image-upload-container {
    margin-bottom: 16px;
}

.admin-file-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.image-preview {
    margin-top: 8px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Стили для меню админа */
.admin-menu-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-menu-card:active {
    transform: scale(0.98);
}

.admin-menu-item {
    display: flex;
    flex-direction: column;
    position: relative;
}

.admin-menu-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #00ff9d;
    font-size: 24px;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-back-button {
    background: none;
    border: none;
    color: #00ff9d;
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.admin-back-button:active {
    background: rgba(0, 255, 157, 0.1);
}

/* Стили для карточек материалов в ленте */
.feed-card {
    background-color: rgb(23 23 23);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease;
}

.feed-card:active {
    transform: scale(0.98);
}

.card-content {
    padding: 24px;
    padding-bottom: 84px;
}

.content-image {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: rgba(23, 23, 23, 0.5);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card-header {
    margin-bottom: 12px;
}

.title-with-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.content-tag {
    display: inline-block;
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.content-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.4;
    color: #00ff9d;
}

.content-description {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.card-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    display: flex;
}

.price-section {
    flex: 1;
    background-color: rgb(23 23 23);
    display: flex;
    align-items: center;
    padding-left: 24px;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

.price-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
}

.button-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 24px;
}

/* панель навигации, нижние кнопки */
.nav-content {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(23, 23, 23, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 30px;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    justify-content: center; /* Равномерное распределение кнопок */
    gap: 0px;
    box-shadow: 0 44px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    height: 50px; /* Увеличили высоту немного */
    width: calc(70%); /* Ширина с отступами по бокам */
}

.nav-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 10px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative; /* Добавлено для позиционирования псевдоэлемента */
}

.nav-button:active {
    transform: scale(0.95);
}

.nav-button.active::after {
    content: '';
    position: absolute;
    width: 40px; /* Фиксированная ширина */
    height: 40px; /* Фиксированная высота */
    background: rgba(0, 255, 157, 0.1);
    border-radius: 10px;
    z-index: -1; /* Размещаем под содержимым кнопки */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav-button.active {
    color: #00ff9d;
}

/* Добавляем поддержку для Safari */
@supports (-webkit-overflow-scrolling: touch) {
    .content-image img {
        -webkit-transform: translateZ(0);
    }
}

/* Стили для формы оплаты */
#payment-form {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
}

#payment-form.active {
    display: flex;
    opacity: 1;
    flex-direction: column;
    padding-top: calc(60px + var(--safe-area-top));
    padding-bottom: var(--safe-area-bottom);
}

#payment-form iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

.payment-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    height: calc(100vh - 60px - var(--safe-area-top) - var(--safe-area-bottom));
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 24px;
    overflow: hidden;
}

.payment-close-btn {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #1a1a1a;
    border: none;
    color: #00ff9d;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    cursor: pointer;
    z-index: 10000;
}

.payment-close-btn::before {
    content: '←';
    margin-right: 10px;
}

.payment-close-btn:active {
    background: rgba(0, 0, 0, 0.7);
}

/* Стили для кнопки покупки */
.purchase-button {
    position: relative;
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.purchase-button.loading {
    color: transparent; /* Скрываем текст при загрузке */
}

.purchase-button:hover {
    background: rgba(0, 255, 157, 0.2);
}

.purchase-button:active {
    transform: scale(0.98);
}

.purchase-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(0, 255, 157, 0.3);
    border-top-color: #00ff9d;
    border-radius: 50%;
    animation: button-loading-spinner 1s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Стили для модального окна оплаты */
.payment-modal {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.payment-status {
    text-align: center;
    margin-top: 16px;
    padding: 8px;
    border-radius: 8px;
}

.payment-status.success {
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
}

.payment-status.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4d4d;
}

/* Стили для отображения текущих настроек */
.settings-info {
    padding: 16px 0;
}

.settings-item {
    margin-bottom: 12px;
    color: #cccccc;
}

.settings-item strong {
    color: #00ff9d;
    margin-right: 8px;
}

.settings-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.settings-status.success {
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
}

.settings-status.warning {
    background: rgba(255, 166, 0, 0.1);
    color: #ffa600;
}

.settings-status.error {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

/* Стили для iframe ЮКассы */
#payment-widget-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
}

#payment-widget-container iframe {
    width: 100%;
    min-height: 100%;
    border: none;
    background: transparent !important;
}

@media (max-width: 480px) {
    .payment-container {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
    }

    #payment-widget-container {
        padding: 16px;
    }
}

/* Стили для экрана загрузки */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-screen::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle,
        rgba(138, 43, 226, 0.2) 0%,
        rgba(138, 43, 226, 0) 70%
    );
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loading-screen::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -150px;
    background: radial-gradient(circle,
        rgba(147, 51, 234, 0.15) 0%,
        rgba(147, 51, 234, 0) 70%
    );
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-logo {
    width: 200px;
    height: auto;
    position: relative;
    filter: invert(1);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.loading-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 45%,
        rgba(255, 255, 255, 0.2) 55%,
        transparent 100%
    );
    animation: shimmer 2s infinite linear;
    transform: skewX(-20deg);
}

.loading-screen.show-content::before,
.loading-screen.show-content::after,
.loading-screen.show-content .loading-logo {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-150%) skewX(-20deg);
    }
    100% {
        transform: translateX(150%) skewX(-20deg);
    }
}

.materials-info {
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.materials-count {
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
}

.no-materials {
    color: #666;
    font-style: italic;
}

.admin-content-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.admin-content-actions .admin-button {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Стили для списка покупок */
.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.purchased-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.purchased-item .content-image {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
}

.purchased-item .content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-title {
    margin: 0;
    color: #00ff9d;
    font-size: 16px;
}

/* Стили для списка пользователей */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-item {
    background: linear-gradient(145deg, rgba(34, 34, 34, 0.95), rgba(42, 42, 42, 0.95));
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-item:active {
    transform: scale(0.98);
}

.user-name {
    color: #00ff9d;
    font-size: 18px;
    margin-bottom: 8px;
}

.user-info {
    color: #cccccc;
    font-size: 14px;
}

/* Стили для детальной информации о пользователе */
.user-details {
    background: linear-gradient(145deg, rgba(34, 34, 34, 0.95), rgba(42, 42, 42, 0.95));
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.user-details h3 {
    color: #00ff9d;
    margin-bottom: 16px;
}

.user-detail-item {
    margin-bottom: 12px;
}

.user-detail-label {
    color: #cccccc;
    font-size: 14px;
}

.user-detail-value {
    color: #ffffff;
    font-size: 16px;
    margin-top: 4px;
}

.purchases-title {
    color: #00ff9d;
    margin-top: 24px;
    margin-bottom: 16px;
}

.purchase-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.purchase-title {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 8px;
}

.purchase-info {
    color: #cccccc;
    font-size: 14px;
}

/* Стиль для кнопки удаления пользователя */
.delete-user-button {
    background: #ff4d4d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
    width: 100%;
}

.delete-user-button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.blocked-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    color: #ff4d4d;
    font-size: 24px;
    text-align: center;
    padding: 20px;
}

.image-upload-container {
    position: relative;
    width: 100%;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
}

.image-upload-container input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    text-align: center;
    color: #6c757d;
}

.upload-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.circular-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    border: 2px solid #00ff9d;
    position: relative;
    top: -20px;
    box-shadow: 0 4px 10px rgba(0, 255, 157, 0.3);
}

.circular-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стили для аналитики и отчетов */
.content-card h3 {
    color: #00ff9d;
    font-size: 18px;
    margin-bottom: 15px;
}

#summary-stats, #commission-settings, #sales-report-controls, #sales-report, #settlements {
    margin-top: 15px;
}

/* Стили для общей статистики */
#summary-stats p {
    color: #ffffff;
    margin: 5px 0;
}

/* Стили для настройки комиссии */
#commission-settings {
    display: flex;
    align-items: center;
    gap: 10px;
}

#commission-percent {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 14px;
}

#commission-settings button {
    background: #00ff9d;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

#commission-settings button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Стили для контролов отчета по продажам */
#sales-report-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#sales-report-controls select,
#sales-report-controls input[type="date"],
#sales-report-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 14px;
}

#sales-report-controls button {
    background: #00ff9d;
    color: #1a1a1a;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sales-report-controls button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Стили для таблицы отчета по продажам */
#sales-report table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

#sales-report th,
#sales-report td {
    padding: 12px;
    text-align: left;
}

#sales-report th {
    color: #00ff9d;
    font-weight: normal;
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
}

#sales-report td {
    color: #ffffff;
}

#sales-report tr:first-child td {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#sales-report tr:last-child td {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Стили для учета выплат */
#settlements p {
    color: #ffffff;
    margin: 5px 0;
}

#settlements input[type="number"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 14px;
    margin-right: 10px;
}

#settlements button {
    background: #00ff9d;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

#settlements button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.text-formatting-toolbar {
    margin-bottom: 10px;
}

.format-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
}

.content-description {
    position: relative;
}

.description-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* Примерно 3 строки */
    transition: max-height 0.3s ease;
}

.description-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: none;
}

.expand-description {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
}

.admin-textarea {
    min-height: 100px;
}

.text-formatting-info {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}

/* Стили для страницы "Информация" */
.information-content {
    padding: 16px;
    color: #ffffff;
    line-height: 1.6;
}

.information-content h1 {
    color: #00ff9d;
    font-size: 24px;
    margin-bottom: 16px;
}

.information-content h2 {
    color: #00ff9d;
    font-size: 20px;
    margin-top: 24px;
    margin-bottom: 12px;
}

.information-content h3 {
    color: #00ff9d;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.information-content p {
    margin-bottom: 12px;
}

.information-content strong {
    color: #00ff9d;
    font-weight: bold;
}

.information-content em {
    font-style: italic;
}

/* Стили для кнопок форматирования в админке */
.formatting-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.format-button {
    background: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-button:hover {
    background: rgba(0, 255, 157, 0.2);
}

.format-button:active {
    transform: scale(0.98);
}

/* Стили для предпросмотра форматированного текста */
.formatted-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    color: #ffffff;
}

.formatted-preview h1,
.formatted-preview h2,
.formatted-preview h3 {
    color: #00ff9d;
    margin-bottom: 12px;
}

.formatted-preview p {
    margin-bottom: 12px;
}

/* Улучшенные стили для текстовой области в админке */
.admin-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    font-size: 14px;
    min-height: 200px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.6;
}

.admin-textarea:focus {
    outline: none;
    border-color: #00ff9d;
    box-shadow: 0 0 0 2px rgba(0, 255, 157, 0.2);
}

/* Стили для меню "Информация" в профиле */
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    cursor: pointer;
}

.menu-item-content h3.menu-title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1; /* Устанавливаем line-height в 1 для лучшего выравнивания */
    color: #00ff9d;  /* или любой другой цвет, который вы используете для заголовков */
}

.menu-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    color: #00ff9d;
    margin-right: 12px;
    flex-shrink: 0; /* Предотвращает сжатие иконки */
}

.menu-title {
    margin: 0;
    font-size: 16px;
    color: #00ff9d;  /* или любой другой цвет, который вы используете для заголовков */
}

.menu-arrow {
    color: #00ff9d;
    font-size: 18px;
}

.menu-item-content {
    display: flex;
    align-items: center;
}

.old-price {
    text-decoration: line-through;
    color: #888;
    font-size: 14px;
    margin-right: 8px;
}

.price-section {
    display: flex;
}

/* Стили для кнопки My Feed */
.nav-button.circular-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    border: 2px solid #00ff9d;
    position: relative;
    top: -25px; /* Поднимаем кнопку выше */
    box-shadow: 0 4px 10px rgba(0, 255, 157, 0.3);
    transition: all 0.3s ease;
    flex: 0 0 auto;
    z-index: 1001;
}

.nav-button.circular-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 255, 157, 0.2);
}

.nav-button.circular-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.nav-button svg {
    width: 24px;
    height: 24px;
    z-index: 1; /* Обеспечиваем, что SVG находится над фоном */
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 480px) {
    .nav-content {
        width: calc(70%);
        padding: 6px 10px;
    }

    .nav-button.circular-button {
        width: 80px;
        height: 80px;
        top: -4px;
    }
}

/* Обновляем стили для мобильных устройств */
@media (max-width: 480px) {
    .my-feed-container {
        padding-top: 100px;
    }

    .feed-posts {
        grid-template-columns: 1fr;
    }
}

.my-feed-container {
    padding: 16px;
    padding-top: calc(80px + var(--safe-area-top));
    padding-bottom: 100px;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.profile-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 16px;
}

.profile-info h2 {
    margin: 0;
    color: #00ff9d;
    font-size: 20px;
}

.profile-description {
    color: #cccccc;
    font-size: 14px;
    margin: 4px 0 0;
}

.feed-posts {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.feed-post {
    overflow: hidden;
}

.feed-post-image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: auto;
    display: block;
}

.post-description {
    padding: 12px;
    color: #ffffff;
    font-size: 14px;
}

@media (max-width: 480px) {
    .feed-posts {
        grid-template-columns: 1fr;
    }
}

.feed-post-card {
    margin-bottom: 20px;
}

.feed-post-image-container {
    width: 100%;
    margin-bottom: 12px;
}

.feed-post-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.feed-post-description {
    margin-bottom: 12px;
}

.feed-post-actions {
    display: flex;
    justify-content: space-between;
}

.price-value.paid {
    color: #4CAF50;  /* зеленый цвет */
    font-weight: bold;
}

.price-value.free {
    color: #4CAF50;
    font-weight: bold;
}

.feed-card.pinned {
    border: 2px solid #00ff9d;
    position: relative;
}

.pinned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #00ff9d;
    color: #1a1a1a;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.content-card.pinned {
    border: 2px solid #00ff9d;
}

.preview-button {
    background-color: rgba(0, 255, 157, 0.1);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.preview-button:hover {
    background-color: rgba(0, 255, 157, 0.2);
}

.preview-button:active {
    transform: scale(0.98);
}

.stories-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
}

.story-item {
    flex: 0 0 auto;
    width: 100px;           /* можно настроить под дизайн */
    height: 177px;          /* для пропорции 9:16 */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.story-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Модальное окно для просмотра сторис */
#storyModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#storyModal .modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
}

#storyModal video {
    width: 100%;
    display: block;
}

#storyModal .close {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
}

/* Прогресс-бар для сторис */
.progress-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.3);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #00ff9d;
}
