* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid rgba(187, 134, 252, 0.5);
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 25%, #0a0a1a 50%, #1a1a0a 75%, #0a1a1a 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(120, 219, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 25s ease infinite;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
}

.header {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(187, 134, 252, 0.5);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255,255,255,0.05);
}

.user-name {
    font-weight: 500;
    color: #ffffff;
}

.main-content {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    min-width: 250px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 2px 0 20px rgba(0,0,0,0.6);
    padding: 1rem 0;
    position: relative;
    z-index: 5;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #d0d0d0;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(120, 119, 198, 0.2);
    color: #bb86fc;
    font-weight: 600;
    border-left: 3px solid #bb86fc;
}

.nav-item .icon {
    font-size: 1.2rem;
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.news-feed {
    max-width: 700px;
    margin: 0 auto;
}

.post-form {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.8);
    border-color: rgba(187, 134, 252, 0.3);
}

.post-form h3 {
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.post-form textarea {
    width: 100%;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: #ffffff;
    resize: vertical;
    margin-bottom: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

.post-form textarea:focus {
    outline: none;
    border-color: #bb86fc;
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-upload {
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: inline-block;
    color: #ffffff;
    transition: all 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.file-upload:hover {
    background: rgba(50, 50, 50, 1);
    border-color: rgba(187, 134, 252, 0.3);
}

.file-upload input {
    display: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(0);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #bb86fc 0%, #985eff 100%);
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #985eff 0%, #bb86fc 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(187, 134, 252, 0.4);
}

.btn-secondary {
    background: rgba(30, 30, 30, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(40, 40, 40, 1);
    border-color: rgba(187, 134, 252, 0.4);
    color: #ffffff;
}

.btn-block {
    width: 100%;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    border-color: rgba(187, 134, 252, 0.3);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author {
    font-weight: 600;
    color: #ffffff;
}

.post-time {
    color: #888;
    font-size: 0.875rem;
}

.post-content {
    margin-bottom: 1rem;
    word-wrap: break-word;
    color: #f0f0f0;
    line-height: 1.7;
}

.post-actions {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
}

.post-reaction-btn {
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.post-reaction-btn:hover {
    background: rgba(50, 50, 50, 1);
    border-color: rgba(187, 134, 252, 0.3);
    transform: translateY(-2px);
}

.reaction-count {
    font-size: 0.875rem;
    color: #888;
    background: rgba(255,255,255,0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
}

.post-reactions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(40, 40, 40, 0.5);
    border-radius: 8px;
}

.post-like-btn {
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.post-like-btn:hover {
    background: rgba(60, 60, 60, 0.7);
    border-color: rgba(255, 105, 180, 0.5);
    transform: scale(1.05);
}

.post-comment-btn {
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.post-comment-btn:hover {
    background: rgba(60, 60, 60, 0.7);
    border-color: rgba(187, 134, 252, 0.4);
    transform: scale(1.05);
}

.comments-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comment {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(40, 40, 40, 0.5);
    border-radius: 8px;
    transition: background 0.2s;
}

.comment:hover {
    background: rgba(50, 50, 50, 0.7);
}

.comment-item {
    display: flex;
    gap: 0.75rem;
}

.comment-replies {
    margin-left: 2rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(187, 134, 252, 0.3);
}

.comment-form textarea,
.reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-form textarea:focus,
.reply-form textarea:focus {
    outline: none;
    border-color: rgba(187, 134, 252, 0.5);
    background: rgba(50, 50, 50, 0.9);
}

.reply-form {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.reaction-item {
    font-size: 0.875rem;
    color: #e0e0e0;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.reaction-item:hover {
    background: rgba(255,255,255,0.1);
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
    max-height: 500px;
    object-fit: cover;
}

.profile-page {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
    position: relative;
    border: 3px solid rgba(187, 134, 252, 0.3);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .profile-avatar {
        width: 90px;
        height: 90px;
        margin: 0 auto;
    }
    
    .profile-info {
        width: 100%;
        text-align: center;
    }
    
    .profile-info h2 {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 1rem;
        gap: 1rem;
    }
    
    .profile-avatar {
        width: 70px;
        height: 70px;
    }
}

/* Адаптивные стили для мобильных устройств (iPhone 11 Pro и меньше) */
@media (max-width: 414px) {
    /* Уменьшаем аватарки в хедере */
    .user-avatar {
        width: 32px;
        height: 32px;
        border-width: 1.5px;
    }
    
    .user-avatar-wrapper .online-status-indicator {
        width: 10px;
        height: 10px;
        border-width: 1.5px;
    }
    
    /* Уменьшаем аватарки в постах */
    .post-avatar {
        width: 32px;
        height: 32px;
    }
    
    /* Уменьшаем аватарку профиля */
    .profile-avatar {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }
    
    .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Уменьшаем аватарки в карточках пользователей */
    .user-card-avatar {
        width: 32px;
        height: 32px;
    }
    
    /* Уменьшаем аватарки сообществ */
    .community-avatar {
        width: 32px;
        height: 32px;
    }
    
    /* Общие стили для всех маленьких аватарок */
    img[style*="width:40px"][style*="height:40px"],
    img[style*="width: 40px"][style*="height: 40px"] {
        width: 32px !important;
        height: 32px !important;
    }
    
    img[style*="width:42px"][style*="height:42px"],
    img[style*="width: 42px"][style*="height: 42px"] {
        width: 36px !important;
        height: 36px !important;
    }
    
    img[style*="width:50px"][style*="height:50px"],
    img[style*="width: 50px"][style*="height: 50px"] {
        width: 40px !important;
        height: 40px !important;
    }
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Индикатор онлайн статуса */
.online-status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(15, 15, 15, 0.9);
    z-index: 10;
}

.online-status-indicator.online {
    background-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

.online-status-indicator.offline {
    background-color: #6c757d;
    width: auto;
    height: auto;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 16px;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.online-status-indicator .status-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    font-weight: 500;
}

/* Индикатор для маленьких аватаров */
.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar-wrapper .online-status-indicator {
    width: 12px;
    height: 12px;
    bottom: 0;
    right: 0;
    border-width: 2px;
}

.user-avatar-wrapper .online-status-indicator.offline {
    width: auto;
    height: auto;
    padding: 1px 4px;
    min-width: 12px;
    min-height: 12px;
}

.user-avatar-wrapper .online-status-indicator .status-text {
    font-size: 0.6rem;
}

.profile-info h2 {
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 600;
}

.profile-bio {
    color: #d0d0d0;
    margin-bottom: 0.5rem;
}

.profile-meta {
    color: #888;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.profile-actions {
    margin-top: 1rem;
}

.users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.user-card {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.user-card:hover {
    border-color: rgba(187, 134, 252, 0.3);
    transform: translateY(-2px);
}

.user-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-card-info {
    flex: 1;
}

.user-card-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #e0e0e0;
}

.user-card-phone {
    color: #888;
    font-size: 0.875rem;
}

.friends-page {
    max-width: 900px;
    margin: 0 auto;
}

.friends-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e4e6eb;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #65676b;
    transition: all 0.2s;
    margin-bottom: -2px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.tab-btn:hover {
    color: #1877f2;
}

.tab-btn.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.communities-page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #e0e0e0;
}

.communities-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 1.5rem;
}

.community-card {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.community-card:hover {
    border-color: rgba(187, 134, 252, 0.3);
    transform: translateY(-2px);
}

.community-card h3 {
    margin-bottom: 0.5rem;
    color: #e0e0e0;
}

.community-card p {
    color: #b0b0b0;
    margin-bottom: 1rem;
}

.community-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e4e6eb;
}

.admin-page {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-table-container {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.admin-table th {
    background: rgba(40, 40, 40, 0.8);
    font-weight: 600;
    color: #bb86fc;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-content {
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    margin: 5vh auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
}

.close-modal:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ffffff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #bb86fc;
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.message-box {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    display: none;
}

.message-box.success {
    background: rgba(40, 167, 69, 0.2);
    color: #4ade80;
    border: 1px solid rgba(40, 167, 69, 0.5);
    display: block;
}

.message-box.error {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.5);
    display: block;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #b0b0b0;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #b0b0b0;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Настройки тех.работ */
.settings-panel {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.setting-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item h4 {
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 600;
}

.setting-item p {
    color: #d0d0d0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: rgba(187, 134, 252, 0.8);
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #bb86fc 0%, #985eff 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.btn-delete-post {
    background: rgba(220, 53, 69, 0.2) !important;
    border: 1px solid rgba(220, 53, 69, 0.5) !important;
    color: #ff6b6b !important;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-delete-post:hover {
    background: rgba(220, 53, 69, 0.4) !important;
    border-color: #ff6b6b !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Verification badge tooltip */
.verification-badge {
    position: relative;
}
.verification-badge .v-tip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 50;
}
.verification-badge .v-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(20, 20, 20, 0.95);
}
.verification-badge:hover .v-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -2px);
}

/* Мобильные устройства */
@media (max-width: 768px) {
    /* Общие стили */
    .container {
        padding: 0;
    }
    
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .user-name {
        font-size: 0.875rem;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
    }
    
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    
    /* Улучшение производительности скролла */
    .content,
    .admin-table-container,
    .posts-container {
        -webkit-overflow-scrolling: touch;
        will-change: scroll-position;
    }
    
    /* Улучшение производительности скролла */
    .content,
    .admin-table-container,
    .posts-container {
        -webkit-overflow-scrolling: touch;
        will-change: scroll-position;
    }
    
    .nav-item {
        min-width: auto;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        font-size: 0.875rem;
    }
    
    .content {
        padding: 0.75rem;
        width: 100%;
    }
    
    /* Кнопки */
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
        min-height: 44px; /* Минимальный размер для удобного нажатия */
        touch-action: manipulation;
    }
    
    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-height: 36px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 44px;
    }
    
    /* Формы */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        padding: 0.875rem;
        font-size: 16px; /* Предотвращает зум на iOS */
        min-height: 44px;
        width: 100%;
        border-radius: 8px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    textarea {
        min-height: 120px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Профиль */
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .profile-avatar {
        margin: 0 auto 1rem;
    }
    
    .profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    /* Посты */
    .post {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .post-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .post-avatar {
        width: 40px;
        height: 40px;
    }
    
    .post-author {
        font-size: 0.9rem;
    }
    
    .post-time {
        font-size: 0.8rem;
    }
    
    .post-content {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-top: 0.75rem;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .post-like-btn,
    .post-comment-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-height: 36px;
    }
    
    /* Админ панель */
    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        white-space: nowrap;
        min-height: 40px;
    }
    
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .admin-actions {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    /* Модальные окна */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 1.25rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* Карточки сообществ */
    .community-card {
        padding: 1rem;
    }
    
    .communities-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Сообщения */
    .message {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Стили для сообщений перенесены в messages.css для лучшей организации */
    
    /* Поиск */
    .search-input {
        padding: 0.875rem;
        font-size: 16px; /* Предотвращает зум на iOS */
        min-height: 44px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .search-result-item {
        padding: 0.75rem;
    }
    
    /* Комментарии */
    .comment {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .comment-input {
        padding: 0.75rem;
        font-size: 16px; /* Предотвращает зум на iOS */
        min-height: 44px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Управление сообществами */
    .community-management-menu {
        padding: 1rem;
    }
    
    .community-management-menu h3 {
        font-size: 1.1rem;
    }
    
    .community-management-menu .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Переключатели */
    .toggle-switch {
        min-width: 50px;
        height: 28px;
    }
    
    .toggle-slider:before {
        height: 22px;
        width: 22px;
    }
    
    /* Файловые загрузки */
    .file-upload {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Хедер профиля */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    /* Верификация */
    .verification-badge {
        font-size: 0.9rem;
    }
    
    .verification-badge img {
        width: 18px;
        height: 18px;
    }
    
    /* Улучшения для очень маленьких экранов */
    @media (max-width: 480px) {
        .header {
            padding: 0.5rem;
        }
        
        .logo h1 {
            font-size: 1.1rem;
        }
        
        .content {
            padding: 0.5rem;
        }
        
        .post {
            padding: 0.75rem;
        }
        
        .btn {
            padding: 0.75rem 1rem;
            font-size: 0.9rem;
        }
        
        .modal-content {
            padding: 1rem;
            margin: 0.5rem;
        }
        
        .admin-table {
            min-width: 500px;
            font-size: 0.75rem;
        }
        
        .admin-table th,
        .admin-table td {
            padding: 0.4rem 0.3rem;
            font-size: 0.75rem;
        }
        
        .community-card h3 {
            font-size: 1rem;
        }
        
        .profile-avatar img {
            width: 70px;
            height: 70px;
        }
    }
}

/* Rich Text Editor Styles */
.rich-text-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar-group {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.toolbar-select {
    padding: 0.4rem 0.6rem;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-select:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(187, 134, 252, 0.5);
}

.toolbar-btn {
    padding: 0.4rem 0.75rem;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.toolbar-btn:hover {
    background: rgba(187, 134, 252, 0.2);
    border-color: rgba(187, 134, 252, 0.5);
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.toolbar-btn.active {
    background: rgba(187, 134, 252, 0.4);
    border-color: rgba(187, 134, 252, 0.7);
    color: #ffffff;
}

.toolbar-color {
    width: 40px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

.rich-text-editor {
    font-family: inherit;
    display: block;
}

.rich-text-editor:focus {
    border-color: rgba(187, 134, 252, 0.5);
}

.rich-text-editor.placeholder:empty::before,
.rich-text-editor:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.post-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(15, 15, 15, 0.5);
    border-radius: 8px;
}

.post-type-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.post-type-btn:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(187, 134, 252, 0.3);
}

.post-type-btn.active {
    background: rgba(187, 134, 252, 0.3);
    border-color: rgba(187, 134, 252, 0.5);
    color: #ffffff;
}

.article-heading-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 18pt;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-heading-input:focus {
    border-color: rgba(187, 134, 252, 0.5);
    outline: none;
}


