* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0c10 0%, #1a1e24 100%);
    color: #ffffff;
    min-height: 100vh;
}

/* ===== ГЛАВНЫЙ КОНТЕЙНЕР ===== */
.chats-container, .chat-container, .profile-page, .gifts-page, .privacy-page {
    max-width: 420px;
    margin: 0 auto;
    background: rgba(18, 22, 28, 0.95);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== ШАПКА ===== */
.chats-header, .chat-header, .profile-header, .gifts-header, .privacy-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e2630 0%, #2a333f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.chats-header h2, .chat-header h2, .profile-header h2 {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-btn, .back-btn, .edit-btn, .close-menu, .settings-btn, .new-chat-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.menu-btn:hover, .back-btn:hover, .edit-btn:hover {
    background: rgba(43, 82, 120, 0.3);
    border-color: rgba(43, 82, 120, 0.5);
    transform: scale(1.05);
}

.new-chat-btn {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.3);
}

.new-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(43, 82, 120, 0.5);
}

/* ===== ПОИСК ===== */
.search-box {
    padding: 16px 20px;
}

.search-box input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(30, 38, 48, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-size: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2b5278;
    background: rgba(43, 82, 120, 0.2);
    box-shadow: 0 0 20px rgba(43, 82, 120, 0.3);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ===== ВКЛАДКИ ===== */
.tabs-container {
    display: flex;
    padding: 0 20px 16px;
    gap: 12px;
}

.tab-btn-chat, .tab-btn-channel {
    flex: 1;
    padding: 12px;
    background: rgba(30, 38, 48, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.tab-btn-chat.active, .tab-btn-channel.active {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.4);
}

/* ===== СПИСОК ЧАТОВ ===== */
#chatsList, #channelsList {
    padding: 8px 16px;
}

.chat-item, .channel-item, .search-result-item {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    border-radius: 20px;
    margin-bottom: 4px;
    background: rgba(30, 38, 48, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.chat-item:hover, .channel-item:hover, .search-result-item:hover {
    background: rgba(43, 82, 120, 0.2);
    border-color: rgba(43, 82, 120, 0.3);
    transform: translateX(4px);
}

.chat-avatar, .channel-avatar, .search-avatar {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-info, .channel-info, .search-info {
    flex: 1;
    min-width: 0;
}

.chat-title, .channel-name, .search-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chat-username, .channel-username, .search-username {
    color: #2b5278;
    font-size: 12px;
    margin-bottom: 2px;
    text-shadow: 0 0 10px rgba(43, 82, 120, 0.5);
}

.chat-preview, .channel-desc, .search-phone {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta, .channel-meta {
    text-align: right;
}

.chat-time {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    margin-bottom: 4px;
}

.chat-unread {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 30px;
    min-width: 22px;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(43, 82, 120, 0.4);
}

/* ===== СТРАНИЦА ЧАТА ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(10, 14, 18, 0.6);
}

.message-row {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.message-row.mine {
    margin-left: auto;
    justify-content: flex-end;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    align-self: flex-end;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.message-bubble {
    padding: 12px 18px;
    border-radius: 24px;
    word-break: break-word;
    font-size: 15px;
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.message-row:not(.mine) .message-bubble {
    background: rgba(30, 38, 48, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 8px;
}

.message-row.mine .message-bubble {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-bottom-right-radius: 8px;
}

.message-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-align: right;
    margin-top: 4px;
}

.message-row.mine .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.date-separator {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    margin: 20px 0;
    position: relative;
}

.date-separator::before,
.date-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.date-separator::before { left: 0; }
.date-separator::after { right: 0; }

/* ===== ПОЛЕ ВВОДА ===== */
.message-input-area {
    padding: 16px 20px;
    background: rgba(30, 38, 48, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
    backdrop-filter: blur(10px);
}

.attach-btn {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 18px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.attach-btn:hover {
    background: rgba(43, 82, 120, 0.3);
    border-color: rgba(43, 82, 120, 0.5);
    transform: scale(1.1);
}

.message-input-area input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(20, 26, 34, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: white;
    font-size: 15px;
    backdrop-filter: blur(5px);
}

.message-input-area input:focus {
    outline: none;
    border-color: #2b5278;
    box-shadow: 0 0 20px rgba(43, 82, 120, 0.3);
}

.send-btn {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    color: white;
    border-radius: 18px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.3);
    transition: all 0.2s ease;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(43, 82, 120, 0.5);
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

.modal-content, .themes-modal, .crystals-modal, .gifts-modal {
    background: rgba(30, 38, 48, 0.95);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 32px;
    width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

.modal h3, .themes-modal h3 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== МЕНЮ ===== */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: rgba(22, 28, 36, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-radius: 0 24px 24px 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.side-menu.open {
    left: 0;
}

.menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header span {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.menu-item {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    border-radius: 20px;
    margin-bottom: 4px;
    color: white;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.menu-item:hover {
    background: rgba(43, 82, 120, 0.2);
    transform: translateX(4px);
}

.menu-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
    color: #2b5278;
}

.menu-text {
    flex: 1;
    font-size: 16px;
}

.menu-badge {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(43, 82, 120, 0.3);
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 12px 0;
}

.menu-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    text-align: center;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 99;
    display: none;
}

.menu-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== ПРОФИЛЬ ===== */
.profile-avatar-section {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(43, 82, 120, 0.2), rgba(31, 62, 92, 0.1));
}

.profile-big-avatar {
    width: 130px;
    height: 130px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    margin-bottom: 16px;
    cursor: pointer;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.profile-big-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.change-avatar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.change-avatar-btn:hover {
    background: rgba(43, 82, 120, 0.3);
    border-color: rgba(43, 82, 120, 0.5);
}

.profile-info-section {
    padding: 20px;
}

.info-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.info-value {
    color: white;
    font-weight: 500;
    font-size: 15px;
}

.info-value-with-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #2b5278;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(43, 82, 120, 0.3);
    color: white;
}

/* ===== СТАТИСТИКА ===== */
.profile-stats {
    padding: 20px;
    background: rgba(30, 38, 48, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: rgba(30, 38, 48, 0.6);
    padding: 18px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.stat-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2b5278;
    text-shadow: 0 0 20px rgba(43, 82, 120, 0.5);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== ФОТО И ВИДЕО ===== */
.message-image img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.message-image img:hover {
    transform: scale(1.02);
    border-color: #2b5278;
}

.message-video-circle {
    position: relative;
    margin-bottom: 5px;
}

.message-video-circle video {
    width: 150px;
    height: 266px;
    border-radius: 24px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== РЕЗУЛЬТАТЫ ПОИСКА ===== */
.search-result-item {
    margin-bottom: 8px;
}

.search-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-badge.new {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(43, 82, 120, 0.3);
}

/* ===== ИНДИКАТОР ЗАПИСИ ===== */
#recordingIndicator {
    background: linear-gradient(135deg, #8b3a3a, #6b2a2a);
    margin: 10px 20px;
    padding: 12px 18px;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    animation: pulse 1.5s infinite;
}

#recordingTimer {
    font-family: monospace;
    font-size: 14px;
    color: white;
}

/* ===== ПРЕВЬЮ ВИДЕО ===== */
#videoPreview {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 110px;
    height: 196px;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid #2b5278;
    z-index: 100;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.8; transform: scale(1); }
}

/* ===== СКРОЛЛ ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 38, 48, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(43, 82, 120, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1f3e5c, #2b5278);
}
/* ========== СТИЛИ ДЛЯ РЕГИСТРАЦИИ ========== */

/* контейнер */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0c10 0%, #1a1e24 100%);
    padding: 16px;
}

/* белая карточка */
.auth-box {
    background: rgba(22, 28, 36, 0.95);
    backdrop-filter: blur(10px);
    padding: 32px 24px;
    border-radius: 32px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* заголовок */
.auth-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 32px;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* подзаголовок */
.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
    font-size: 14px;
}

/* вкладки */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(30, 38, 48, 0.6);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.4);
}

/* формы */
.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* поля ввода */
.auth-form input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(30, 38, 48, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 15px;
    color: white;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #2b5278;
    background: rgba(43, 82, 120, 0.2);
    box-shadow: 0 0 20px rgba(43, 82, 120, 0.3);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* кнопка */
.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.3);
    transition: all 0.2s ease;
}

.auth-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(43, 82, 120, 0.5);
}

.auth-btn:active {
    transform: scale(0.98);
}

/* группа кода */
#codeGroup {
    animation: fadeIn 0.3s ease;
}

#requestCodeBtn, #verifyCodeBtn {
    transition: all 0.2s ease;
}

#requestCodeBtn {
    background: rgba(255, 255, 255, 0.1);
}

#requestCodeBtn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* подсказка */
.auth-form p {
    background: rgba(30, 38, 48, 0.6);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========== СТИЛИ ДЛЯ ПРОФИЛЯ И НАСТРОЕК ========== */

/* страница профиля */
.profile-page {
    max-width: 420px;
    margin: 0 auto;
    background: rgba(18, 22, 28, 0.95);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* шапка профиля */
.profile-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e2630 0%, #2a333f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.profile-header h2 {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* секция аватара */
.profile-avatar-section {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(43, 82, 120, 0.2), rgba(31, 62, 92, 0.1));
}

.profile-big-avatar {
    width: 130px;
    height: 130px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    margin-bottom: 16px;
    cursor: pointer;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.profile-big-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.change-avatar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.change-avatar-btn:hover {
    background: rgba(43, 82, 120, 0.3);
    border-color: rgba(43, 82, 120, 0.5);
}

/* информация профиля */
.profile-info-section {
    padding: 20px;
}

.info-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.info-value {
    color: white;
    font-weight: 500;
    font-size: 15px;
}

.info-value-with-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #2b5278;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(43, 82, 120, 0.3);
    color: white;
}

/* статистика */
.profile-stats {
    padding: 20px;
    background: rgba(30, 38, 48, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stats h3 {
    color: white;
    margin-bottom: 16px;
    font-size: 18px;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: rgba(30, 38, 48, 0.6);
    padding: 18px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.stat-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2b5278;
    text-shadow: 0 0 20px rgba(43, 82, 120, 0.5);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* настройки в профиле */
.profile-settings {
    padding: 20px;
}

.profile-settings h3 {
    color: white;
    margin-bottom: 16px;
    font-size: 18px;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-item {
    padding: 18px 16px;
    background: rgba(30, 38, 48, 0.6);
    border-radius: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.settings-item:hover {
    background: rgba(43, 82, 120, 0.2);
    border-color: rgba(43, 82, 120, 0.3);
    transform: translateX(4px);
}

.settings-icon {
    font-size: 22px;
    margin-right: 14px;
    width: 28px;
    text-align: center;
    color: #2b5278;
}

.settings-text {
    flex: 1;
    color: white;
    font-size: 16px;
}

.settings-value {
    color: #2b5278;
    font-size: 14px;
    margin-right: 8px;
}

.settings-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
}

/* кнопка выхода */
.profile-actions {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #8b3a3a, #6b2a2a);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 58, 58, 0.3);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(139, 58, 58, 0.5);
}

.logout-btn:active {
    transform: scale(0.98);
}

/* страница конфиденциальности */
.privacy-page {
    max-width: 420px;
    margin: 0 auto;
    background: rgba(18, 22, 28, 0.95);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e2630 0%, #2a333f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.privacy-header h2 {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.privacy-header .save-btn {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.3);
}

.privacy-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.privacy-section h3 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.add-btn {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(43, 82, 120, 0.3);
}

.privacy-item {
    margin-bottom: 16px;
}

.privacy-item label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-size: 14px;
}

.privacy-item select {
    width: 100%;
    padding: 16px;
    background: rgba(30, 38, 48, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-size: 15px;
    cursor: pointer;
}

.privacy-item select:focus {
    outline: none;
    border-color: #2b5278;
}

.privacy-item select option {
    background: #1e2630;
    color: white;
}

/* списки пользователей */
.blocked-users-list,
.hidden-users-list {
    background: rgba(30, 38, 48, 0.4);
    border-radius: 20px;
    padding: 12px;
}

.blocked-user-item,
.hidden-user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blocked-user-item:last-child,
.hidden-user-item:last-child {
    border-bottom: none;
}

.unblock-btn,
.unhide-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.unblock-btn {
    background: linear-gradient(135deg, #8b3a3a, #6b2a2a);
    color: white;
}

.unhide-btn {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
}

.no-users {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.privacy-footer {
    padding: 20px;
}

.reset-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 1px solid rgba(139, 58, 58, 0.5);
    color: #ff6b6b;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: rgba(139, 58, 58, 0.2);
    border-color: #8b3a3a;
}

/* модальное окно выбора пользователя */
.select-user-modal {
    background: rgba(22, 28, 36, 0.95);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 32px;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.select-user-modal h3 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
}

.users-list-scroll {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.user-select-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-select-item:hover {
    background: rgba(43, 82, 120, 0.2);
}

.user-select-item .user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.user-select-item .user-info {
    flex: 1;
}

.user-select-item .user-name {
    color: white;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-select-item .user-username {
    color: #2b5278;
    font-size: 12px;
}

.close-modal-btn {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
/* стили для экранов входа */
.start-screen, .phone-screen, .code-screen {
    text-align: center;
    padding: 20px 0;
}

.start-icon {
    font-size: 80px;
    margin: 30px 0 20px;
    animation: bounce 2s infinite;
}

.start-screen h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: white;
}

.start-screen p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 30px;
    font-size: 15px;
}

.start-btn {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(43,82,120,0.3);
}

.phone-screen h2, .code-screen h2 {
    font-size: 22px;
    margin-bottom: 5px;
    color: white;
}

.hint {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-bottom: 25px;
}

.phone-display {
    background: rgba(43,82,120,0.2);
    padding: 12px;
    border-radius: 30px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #2b5278;
    font-weight: 500;
}

.phone-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.country-code {
    width: 90px;
    padding: 16px;
    background: rgba(30,38,48,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: white;
    font-size: 16px;
}

.phone-number {
    flex: 1;
    padding: 16px;
    background: rgba(30,38,48,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: white;
    font-size: 16px;
}

.code-input-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 30px 0;
}

.code-digit {
    width: 45px;
    height: 55px;
    background: rgba(30,38,48,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    color: white;
    font-size: 24px;
    text-align: center;
    font-weight: bold;
}

.code-digit:focus {
    outline: none;
    border-color: #2b5278;
    box-shadow: 0 0 15px rgba(43,82,120,0.3);
}

.next-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 20px 0;
}

.terms {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

.resend {
    color: #2b5278;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

.resend:hover {
    text-decoration: underline;
}

.back-btn {
    font-size: 24px;
    cursor: pointer;
    color: white;
    margin-bottom: 20px;
    text-align: left;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========== СТИЛИ ДЛЯ КАНАЛА ========== */
.channel-container, .group-container {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.channel-header, .group-header {
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.channel-info-header, .group-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.channel-avatar-large, .group-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.channel-title-info h2, .group-title-info h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.channel-meta, .group-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.channel-menu-btn, .group-menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.channel-menu-btn:hover, .group-menu-btn:hover {
    background: var(--bg-element);
}

.channel-description, .group-description {
    padding: 16px;
    background: var(--bg-card);
    margin: 12px;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    border: 1px solid var(--border);
}

.channel-action {
    padding: 0 12px 12px;
}

.subscribe-channel-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.subscribe-channel-btn.subscribed {
    background: var(--bg-element);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.channel-tabs, .group-tabs {
    display: flex;
    padding: 0 12px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.channel-tab, .group-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
}

.channel-tab.active, .group-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ========== ПОСТЫ КАНАЛА ========== */
.channel-posts {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.post-item {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-author-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.post-author-name {
    font-weight: 500;
    color: var(--text-primary);
}

.post-date {
    font-size: 11px;
    color: var(--text-secondary);
}

.post-content {
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.post-stats {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 12px 0;
}

.post-actions {
    display: flex;
    gap: 8px;
}

.post-action-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-element);
    border: none;
    color: var(--text-primary);
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
}

.post-action-btn.delete {
    background: #f44336;
    color: white;
}

/* ========== УЧАСТНИКИ ========== */
.channel-members, .group-members-list {
    padding: 12px;
}

.members-list {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.member-item {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.member-item:last-child {
    border-bottom: none;
}

.member-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.member-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.member-actions {
    display: flex;
    gap: 5px;
}

.member-action-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-element);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
}

.member-action-btn.delete {
    background: #f44336;
    color: white;
    border: none;
}

/* ========== АДМИН ПАНЕЛЬ ========== */
.admin-panel, .group-admin-panel {
    padding: 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.admin-btn {
    flex: 1;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.admin-btn.delete {
    background: #f44336;
}

/* ========== ГРУППОВОЙ ЧАТ ========== */
.group-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.group-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-message-input {
    padding: 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.group-message-input input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-element);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text-primary);
}

.send-group-btn {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border: none;
    border-radius: 18px;
    color: white;
    cursor: pointer;
    font-size: 18px;
}

/* ========== ПОДАРКИ ========== */
.gifts-page {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-page);
    min-height: 100vh;
}

.gifts-header {
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gifts-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.refresh-btn {
    background: var(--bg-element);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
}

.crystals-balance {
    background: var(--bg-card);
    margin: 16px;
    padding: 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    border: 1px solid var(--border);
}

.gifts-tabs {
    display: flex;
    padding: 0 16px;
    gap: 8px;
    margin-bottom: 16px;
}

.gifts-tab {
    flex: 1;
    padding: 12px;
    background: var(--bg-element);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
}

.gifts-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.gifts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.gift-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.gift-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.gift-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.gift-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gift-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.gift-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 14px;
    color: white;
}

.gift-lock {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    opacity: 0.5;
}

.gifts-list {
    padding: 16px;
}

.gift-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    border: 1px solid var(--border);
}

.gift-item.sent {
    opacity: 0.8;
}

.gift-item-emoji {
    font-size: 40px;
    background: var(--accent);
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.gift-item-info {
    flex: 1;
}

.gift-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gift-item-from, .gift-item-to {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 2px;
}

.gift-item-message {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-style: italic;
}

.gift-item-date {
    font-size: 10px;
    color: var(--text-secondary);
}

.gift-item-price {
    font-weight: bold;
    color: var(--accent);
}

.sell-gift-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #f44336;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

.sold-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.no-gifts {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ========== МОДАЛКИ ДЛЯ ПОДАРКОВ ========== */
.gift-message-modal {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 28px;
    width: 300px;
}

.gift-preview {
    text-align: center;
    margin-bottom: 20px;
}

.preview-emoji {
    font-size: 60px;
    background: var(--accent);
    width: 100px;
    height: 100px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: white;
}

.preview-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.preview-price {
    color: var(--accent);
    font-weight: bold;
}

.gift-info {
    background: var(--bg-element);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-label {
    color: var(--text-secondary);
}

.gift-message-box {
    margin-bottom: 20px;
}

.gift-message-box label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.gift-message-box textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-element);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    resize: none;
}

.gift-actions {
    display: flex;
    gap: 10px;
}

.send-gift-btn {
    flex: 1;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.cancel-btn {
    flex: 1;
    padding: 14px;
    background: var(--bg-element);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    cursor: pointer;
}

.select-user-modal {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 24px;
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
}

.select-user-modal h3 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.users-list-scroll {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.user-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.user-select-item:hover {
    background: var(--bg-element);
}

.user-select-item .user-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.user-select-item .user-info {
    flex: 1;
}

.user-select-item .user-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-select-item .user-username {
    font-size: 11px;
    color: var(--accent);
}

.close-modal-btn {
    width: 100%;
    padding: 14px;
    background: var(--bg-element);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    cursor: pointer;
}

/* ========== СТИЛИ ДЛЯ ПОДАРКОВ ========== */
.gift-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gift-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.gift-sticker {
    position: absolute;
    top: -8px;
    left: -8px;
    font-size: 24px;
    background: var(--accent);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

.gift-details {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    font-size: 11px;
    color: var(--text-secondary);
}

.gift-backdrop, .gift-symbol {
    background: var(--bg-element);
    padding: 4px 8px;
    border-radius: 12px;
}

/* карточка подарка как на скрине */
.gift-item-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    position: relative;
}

.gift-card-preview {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    border: 2px solid rgba(255,255,255,0.1);
}

.gift-card-sticker {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 30px;
    background: var(--accent);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-card);
}

.gift-card-emoji {
    font-size: 64px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.gift-card-name {
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.gift-card-id {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-family: monospace;
}

.gift-card-info {
    padding: 0 8px;
}

.gift-card-info .info-line {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.gift-card-info .info-line:last-child {
    border-bottom: none;
}

.gift-card-info .info-label {
    color: var(--text-secondary);
    font-size: 12px;
    display: inline-block;
    width: 70px;
}

.gift-card-info .message {
    background: var(--bg-element);
    padding: 8px;
    border-radius: 12px;
    margin: 8px 0;
    font-style: italic;
    border: none;
}

.gift-card-info .date {
    color: var(--text-secondary);
    font-size: 11px;
    text-align: right;
}

/* детали подарка */
.gift-details-modal {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 28px;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
}

.gift-preview-card {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    border: 2px solid rgba(255,255,255,0.1);
}

.gift-preview-sticker {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 32px;
    background: var(--accent);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-card);
}

.gift-preview-emoji {
    font-size: 72px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.gift-preview-name {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.gift-preview-id {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-family: monospace;
}

.gift-info-grid {
    background: var(--bg-element);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.gift-info-grid .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.gift-info-grid .info-row:last-child {
    border-bottom: none;
}

.gift-info-grid .price {
    color: var(--accent);
    font-weight: bold;
}

.gift-attributes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.attribute {
    background: var(--bg-element);
    padding: 12px;
    border-radius: 14px;
    text-align: center;
}

.attribute-label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.attribute-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.infinite-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    padding: 8px 16px;
    border-radius: 30px;
    text-align: center;
    margin-bottom: 16px;
    font-weight: 600;
}

/* кнопка продажи */
.sell-gift-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.sell-gift-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(244,67,54,0.3);
}

.sold-badge {
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
}

.message-gift {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.gift-bubble {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 20px;
    padding: 16px;
    text-align: center;
    min-width: 200px;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gift-bubble-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.gift-bubble-name {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.gift-bubble-message {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-style: italic;
    margin-bottom: 4px;
}

.gift-bubble-id {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    font-family: monospace;
}

/* ========== ПОДАРКИ В ЧАТЕ ========== */
.message-gift-content {
    background: linear-gradient(135deg, #2b5278, #1f3e5c);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    min-width: 180px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gift-emoji-large {
    font-size: 48px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.gift-name-large {
    font-size: 16px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.gift-message-small {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    margin: 4px 0;
    padding: 4px 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.gift-id-small {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    font-family: monospace;
    margin-top: 4px;
}

.gift-from-small {
    font-size: 11px;
    color: #ffd700;
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 4px;
}

/* мои подарки */
.message-row.mine .message-gift-content {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
}

.message-row.mine .gift-name-large,
.message-row.mine .gift-from-small {
    color: #000;
}

.message-row.mine .gift-message-small {
    background: rgba(0,0,0,0.1);
    color: #000;
}