* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0f1a 0%, #0a1428 50%, #0a0f1a 100%);
    color: #e0e4f0;
    overflow-x: hidden;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(10,15,26,0.9); }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 4px; }
.app { display: flex; min-height: 100vh; position: relative; }
        
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: rgba(102,126,234,0.9);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
        
.sidebar {
    width: 280px;
    background: rgba(10,15,26,0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(102,126,234,0.2);
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sidebar.closed { transform: translateX(-100%); }
.close-menu-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(231,76,60,0.3);
    border: none;
    color: white;
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(102,126,234,0.3);
}
.logo-icon {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #667eea);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: auto;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #a0a8c0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}
.nav-item:hover { color: #fff; transform: translateX(5px); background: rgba(102,126,234,0.1); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
    color: #fff;
    border-left: 3px solid #667eea;
}
.nav-icon { font-size: 20px; }
.badge {
    margin-left: auto;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}
.user-info {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(102,126,234,0.1);
    border-radius: 12px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-details { flex: 1; }
.user-name { font-weight: 600; font-size: 14px; cursor: pointer; }
.user-status { font-size: 10px; color: #2ecc71; }
.logout-btn {
    background: rgba(231,76,60,0.2);
    border: none;
    color: #e74c3c;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}
.logout-btn:hover { background: rgba(231,76,60,0.4); transform: scale(1.1); }
        
.main-content { flex: 1; margin-left: 280px; margin-right: 320px; padding: 30px; min-height: 100vh; }
        
.right-sidebar {
    width: 320px;
    background: rgba(10,15,26,0.8);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(102,126,234,0.2);
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    right: 0;
    top: 0;
    overflow-y: auto;
}
.right-sidebar h3 { font-size: 14px; margin-bottom: 15px; color: #667eea; margin-top: 20px; }
.right-sidebar h3:first-of-type { margin-top: 0; }
        
.notifications-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}
.notification-item {
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.notification-item:hover { background: rgba(102,126,234,0.2); }
.notification-item.unread { background: rgba(102,126,234,0.15); border-left: 3px solid #667eea; }
.notification-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}
.notification-content { flex: 1; }
.notification-message { font-size: 12px; }
.notification-time { font-size: 10px; color: #8890a8; }
        
.friend-requests-list {
    margin-bottom: 20px;
    max-height: 250px;
    overflow-y: auto;
}
.friend-request-item {
    padding: 12px;
    background: rgba(102,126,234,0.1);
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.friend-request-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}
.friend-request-info { flex: 1; }
.friend-request-name { font-weight: 600; cursor: pointer; }
.friend-request-actions { display: flex; gap: 8px; }
.friend-request-actions button {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.accept-btn { background: #2ecc71; color: white; }
.reject-btn { background: #e74c3c; color: white; }
        
.online-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.online-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}
.online-item:hover { background: rgba(102,126,234,0.1); }
.trending-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.trending-tags span {
    padding: 6px 12px;
    background: rgba(102,126,234,0.2);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.trending-tags span:hover { background: rgba(102,126,234,0.4); }
        
.post-card {
    background: rgba(15,20,35,0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(102,126,234,0.2);
    transition: all 0.3s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(102,126,234,0.2); }
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.post-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author { font-weight: 700; color: #fff; cursor: pointer; }
.post-time { font-size: 11px; color: #8890a8; }
.post-content { margin-bottom: 15px; line-height: 1.6; word-break: break-word; }

/* ============ ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ИЗОБРАЖЕНИЙ ============ */
.post-image {
    position: relative;
    width: 100%;
    background: #0a0f1a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    text-align: center;
}
.post-image img {
    width: auto;
    max-width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-block;
}
.post-image img:hover { transform: scale(1.02); }

.post-stats {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}
.post-stats button {
    background: none;
    border: none;
    color: #a0a8c0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 8px;
}
.post-stats button:hover { color: #667eea; background: rgba(102,126,234,0.1); }
.post-stats button.liked { color: #e74c3c; }
.post-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}
.post-actions button {
    background: none;
    border: none;
    color: #8890a8;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
}
.post-actions button:hover { color: #667eea; background: rgba(102,126,234,0.1); }
        
.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    flex-wrap: wrap;
}
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}
.comment-content { flex: 1; min-width: 150px; }
.comment-author { font-weight: 600; font-size: 12px; color: #667eea; cursor: pointer; }
.comment-text { font-size: 13px; margin-top: 4px; word-break: break-word; }
.comment-time { font-size: 10px; color: #8890a8; }
.delete-comment {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
}
.add-comment {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.add-comment input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 20px;
    padding: 8px 15px;
    color: white;
    outline: none;
    min-width: 150px;
}
.add-comment button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}
        
.create-post {
    background: rgba(15,20,35,0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}
.create-post textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 12px;
    padding: 12px;
    color: #fff;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
}
.create-post-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.create-post button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.image-preview {
    margin-top: 10px;
    max-width: 200px;
    display: none;
}
.image-preview img { width: 100%; border-radius: 8px; }
        
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.friend-card {
    background: rgba(15,20,35,0.7);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}
        
.messages-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
    flex-wrap: wrap;
}
.chat-list {
    flex: 1;
    min-width: 250px;
    background: rgba(15,20,35,0.7);
    border-radius: 16px;
    overflow-y: auto;
}
.chat-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s;
}
.chat-item:hover { background: rgba(102,126,234,0.2); }
.chat-area {
    flex: 2;
    min-width: 300px;
    background: rgba(15,20,35,0.7);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}
.messages-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}
.message.sent {
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin-left: auto;
    color: white;
}
.message.received {
    background: rgba(255,255,255,0.1);
}
.message-input {
    display: none;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    gap: 10px;
}
.message-input input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 10px;
    padding: 10px;
    color: white;
    outline: none;
}
.message-input button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
}
.typing-indicator {
    padding: 5px 20px;
    font-size: 12px;
    color: #8890a8;
    font-style: italic;
    display: none;
}
        
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
}
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(102,126,234,0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
        
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(46,204,113,0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 2000;
    animation: fadeInOut 3s ease;
    backdrop-filter: blur(10px);
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}
        
.global-search-bar {
    position: sticky;
    top: 0;
    z-index: 99;
    background: rgba(10,15,26,0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 12px;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s;
}
.search-result-item:hover { background: rgba(102,126,234,0.2); }
.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
}
.search-result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-result-content { flex: 1; }
.search-result-title { font-weight: 600; font-size: 14px; color: #fff; }
.search-result-text { font-size: 12px; color: #8890a8; margin-top: 4px; }

/* ============ ГРУППЫ ============ */
.group-card {
    background: rgba(15,20,35,0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}
.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}
.group-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
    overflow: hidden;
}
.group-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
}
.group-members {
    font-size: 12px;
    color: #8890a8;
    margin-bottom: 10px;
}
.group-actions button {
    background: rgba(102,126,234,0.2);
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}
.group-actions button:hover {
    background: rgba(102,126,234,0.4);
    transform: scale(1.02);
}
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* ============ НАСТРОЙКИ ============ */
.settings-card {
    background: rgba(15,20,35,0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}
.settings-card h3 {
    margin-bottom: 20px;
    color: #667eea;
}
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.setting-label {
    font-weight: 500;
}
.setting-control select,
.setting-control input {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 8px;
    padding: 8px 15px;
    color: white;
    cursor: pointer;
}
.theme-toggle {
    background: rgba(102,126,234,0.2);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}
.theme-toggle:hover {
    background: rgba(102,126,234,0.4);
}

/* ============ ПРОФИЛЬ ============ */
.profile-card {
    background: rgba(15,20,35,0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    overflow: hidden;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}
.profile-bio {
    color: #8890a8;
    margin-bottom: 20px;
}
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}
.stat {
    text-align: center;
}
.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}
.stat-label {
    font-size: 12px;
    color: #8890a8;
}

/* ============ МОДАЛЬНОЕ ОКНО ДЛЯ ФОТО ============ */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    align-items: center;
    justify-content: center;
}
.photo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}
.photo-modal-container {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}
.photo-modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10003;
}
.photo-modal-close:hover {
    background: rgba(231, 76, 60, 0.8);
    transform: scale(1.1);
}
.photo-modal-prev,
.photo-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10003;
}
.photo-modal-prev { left: 20px; }
.photo-modal-next { right: 20px; }
.photo-modal-prev:hover,
.photo-modal-next:hover {
    background: rgba(102, 126, 234, 0.9);
    transform: translateY(-50%) scale(1.1);
}
.photo-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-family: monospace;
    z-index: 10003;
}

/* ============ АДАПТИВНЫЕ СТИЛИ ============ */
@media (min-width: 1440px) {
    .post-image img { max-height: 350px; }
}
@media (min-width: 1920px) {
    .post-image img { max-height: 300px; }
}
@media (max-width: 1024px) { 
    .right-sidebar { width: 300px; } 
    .main-content { margin-right: 300px; } 
}
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .close-menu-btn { display: block; }
    .sidebar { transform: translateX(-100%); width: 280px; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 15px; margin-top: 60px; margin-right: 0; }
    .right-sidebar { display: none; }
    .post-image img { max-height: 300px; }
    .post-stats button,
    .post-actions button,
    .like-btn,
    .comments-toggle-btn,
    .addCommentBtn,
    .editPostBtn,
    .deletePostBtn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .post-content { font-size: 15px; line-height: 1.5; }
    .comment-text { font-size: 14px; }
    .create-post-actions { flex-direction: column; align-items: stretch; }
    .create-post-actions label,
    .create-post-actions button { text-align: center; justify-content: center; }
    .add-comment { flex-direction: column; }
    .add-comment input { width: 100%; }
    .add-comment button { width: 100%; }
    .search-header { flex-direction: column; align-items: flex-start !important; }
    .search-header button { width: 100%; }
    .groups-grid { grid-template-columns: 1fr; }
    .friends-grid { grid-template-columns: 1fr; }
    .profile-avatar { width: 80px; height: 80px; font-size: 32px; }
    .profile-name { font-size: 20px; }
    .photo-modal-prev,
    .photo-modal-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .photo-modal-prev { left: 10px; }
    .photo-modal-next { right: 10px; }
    .photo-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
    .photo-modal-img { max-width: 95%; max-height: 85%; }
}
@media (max-width: 480px) {
    .post-image img { max-height: 250px; }
}
@media (max-width: 768px) and (orientation: landscape) {
    .photo-modal-img { max-height: 80%; }
    .photo-modal-prev,
    .photo-modal-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .photo-modal-close {
        width: 30px;
        height: 30px;
        font-size: 20px;
        top: 5px;
        right: 5px;
    }
}

/* ============ ПРЕМИУМ СТИЛИ ============ */
.premium-section {
    background: linear-gradient(135deg, rgba(241,196,15,0.1), rgba(230,126,34,0.1));
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}
.premium-badge {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
    display: inline-block;
}
.premium-plan-btn {
    background: rgba(102,126,234,0.2);
    border: 1px solid rgba(102,126,234,0.3);
    padding: 15px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: all 0.3s;
}
.premium-plan-btn:hover {
    background: rgba(102,126,234,0.4);
    transform: translateY(-2px);
}
.premium-price {
    color: #f1c40f;
    font-weight: 600;
}
.username-premium {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.premium-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 4px;
}
.premium-badge-icon::before { content: "⭐"; }
.avatar-premium {
    border: 2px solid #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
    border-radius: 50%;
}
.avatar-premium img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#premiumStatusProfile span {
    display: inline-block;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}
#usernameText.username-premium {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
#avatar.avatar-premium {
    border: 2px solid #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

/* ============ СВЕТЛАЯ ТЕМА ============ */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
    color: #1a1a2e;
}
body.light-theme .sidebar,
body.light-theme .right-sidebar,
body.light-theme .post-card,
body.light-theme .create-post,
body.light-theme .friend-card,
body.light-theme .group-card,
body.light-theme .settings-card,
body.light-theme .profile-card,
body.light-theme .chat-list,
body.light-theme .chat-area,
body.light-theme .messages-container > div {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .nav-item {
    color: #4a4a6a;
}
body.light-theme .nav-item:hover,
body.light-theme .nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}
body.light-theme .post-content,
body.light-theme .comment-text {
    color: #2d2d3d;
}
body.light-theme input,
body.light-theme textarea,
body.light-theme select {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.2);
}
body.light-theme .message.sent {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
body.light-theme .message.received {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}
body.light-theme .notification-item,
body.light-theme .friend-request-item,
body.light-theme .online-item {
    background: rgba(0, 0, 0, 0.05);
}
body.light-theme .trending-tags span {
    background: rgba(102, 126, 234, 0.1);
    color: #4a4a6a;
}
body.light-theme .trending-tags span:hover {
    background: rgba(102, 126, 234, 0.2);
}
body.light-theme .photo-modal-overlay {
    background: rgba(255, 255, 255, 0.95);
}
body.light-theme .photo-modal-close,
body.light-theme .photo-modal-prev,
body.light-theme .photo-modal-next {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}
body.light-theme .photo-modal-close:hover {
    background: #e74c3c;
}
body.light-theme .photo-modal-prev:hover,
body.light-theme .photo-modal-next:hover {
    background: #667eea;
}
body.light-theme .photo-modal-counter {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* Дополнительные стили */
.modal { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
#removeImageBtn {
    margin-top: 8px;
    background: rgba(231, 76, 60, 0.3);
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 12px;
}

/* ============ СВЕТЛАЯ ТЕМА ============ */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
    color: #1a1a2e;
}

/* Сайдбар и правая панель */
body.light-theme .sidebar,
body.light-theme .right-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Навигация */
body.light-theme .nav-item {
    color: #4a4a6a;
}

body.light-theme .nav-item:hover,
body.light-theme .nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Карточки постов и групп */
body.light-theme .post-card,
body.light-theme .create-post,
body.light-theme .friend-card,
body.light-theme .group-card,
body.light-theme .settings-card,
body.light-theme .profile-card,
body.light-theme .chat-list,
body.light-theme .chat-area {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

/* Текст постов и комментариев */
body.light-theme .post-content,
body.light-theme .comment-text,
body.light-theme .message-text {
    color: #2d2d3d;
}

/* Поля ввода */
body.light-theme input,
body.light-theme textarea,
body.light-theme select {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Сообщения */
body.light-theme .message.sent {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

body.light-theme .message.received {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

/* Уведомления и заявки */
body.light-theme .notification-item,
body.light-theme .friend-request-item,
body.light-theme .online-item {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
}

/* Тренды */
body.light-theme .trending-tags span {
    background: rgba(102, 126, 234, 0.1);
    color: #4a4a6a;
}

body.light-theme .trending-tags span:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Кнопки в светлой теме */
body.light-theme .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

body.light-theme .btn-secondary {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
}

body.light-theme .btn-secondary:hover {
    background: rgba(102, 126, 234, 0.3);
}

/* Модальные окна */
body.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
}

/* Загрузка */
body.light-theme .loader {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: #667eea;
}