:root {
    --primary-color: #8B5CF6;
    --primary-gradient: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    --dark-bg: #131313;
    --darker-bg: #0a0a0a;
    --sidebar-bg: #1a1a1a;
    --text-light: #e0e0e0;
    --text-muted: #a1a1a1;
    --premium-gold: #f9d98e;
    --premium-bg: rgba(249, 217, 142, 0.1);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important;
    color: white !important;
    border-radius: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a42a0) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-light {
    color: #667eea !important;
    border-color: #667eea !important;
    background: transparent !important;
    border-radius: 8px;
}

.btn-outline-light:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.sidebar {
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    z-index: 1000;
    border-right: 1px solid #363636;
    transition: all 0.3s ease;
}

.sidebar-mini {
    width: 80px;
}

.sidebar-mini .nav-link span {
    display: none;
}

.sidebar-mini .brand-text {
    display: none;
}

/* new */
.sidebar-mini .sidebar-text {
    display: none;
}
.sidebar-mini .sidebar-footer {
    display: none;
}
.sidebar-mini .nav-link span {
    display: none;
}
.sidebar-mini .brand-text {
    display: none;
}

.main-content {
    margin-left: 220px;
    transition: all 0.3s ease;
}

.main-content-expanded {
    margin-left: 80px;
}

.navbar-custom {
    background: var(--darker-bg) !important;
    border-bottom: 1px solid #363636;
    height: 64px;
}

.nav-link {
    color: var(--text-light) !important;
    border-radius: 10px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light) !important;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.premium-link {
    background: var(--premium-bg) !important;
    border: 1px solid rgba(249, 217, 142, 0.3) !important;
}

.premium-link .premium-text {
    background: linear-gradient(45deg, var(--premium-gold), #d0b067);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.premium-link i {
    color: var(--premium-gold) !important;
}

.premium-badge {
    background: #B91923;
    color: white !important;
    font-size: 0.7em;
    padding: 2px 6px;
}

.mobile-bottom-nav {
    background: var(--darker-bg);
    border-top: 1px solid #363636;
    display: none;
}

.mobile-bottom-nav .nav-item {
    color: var(--text-light) !important;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color) !important;
}

.mobile-bottom-nav i {
    font-size: 1.2rem;
}

.mobile-bottom-nav small {
    color: var(--text-light);
    font-size: 0.7rem;
}

.mobile-premium .premium-mobile-text {
    background: linear-gradient(45deg, var(--premium-gold), #d0b067);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.mobile-premium i {
    color: var(--premium-gold) !important;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
}

.content-area {
    min-height: calc(100vh - 64px);
    padding: 20px;
    background: var(--dark-bg);
}

.footer-links a {
    color: var(--text-light) !important;
    text-decoration: none;
    font-size: 0.8em;
}

.footer-links a:hover {
    color: var(--primary-color) !important;
}

.welcome-text {
    color: var(--text-light) !important;
}

.content-text {
    color: var(--text-light) !important;
}
/* поля */
.auth-container {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--dark-bg);
}

.auth-card {
    background: var(--sidebar-bg);
    border: 1px solid #363636;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.auth-header {
    background: var(--primary-gradient);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #363636;
}

.auth-header h4 {
    color: white;
    margin: 0;
    font-weight: 600;
}

.auth-header i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-body {
    padding: 2rem;
}

/* Стили для полей ввода */
.form-label {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    background: var(--darker-bg) !important;
    border: 1px solid #363636 !important;
    color: var(--text-light) !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25) !important;
    background: var(--darker-bg) !important;
    color: var(--text-light) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

/* Стили для чекбоксов и радиокнопок */
.form-check-input {
    background-color: var(--darker-bg) !important;
    border: 1px solid #363636 !important;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.form-check-label {
    color: var(--text-light) !important;
}

.form-check-label a {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Группы радиокнопок */
.radio-group {
    background: var(--darker-bg);
    border: 1px solid #363636;
    border-radius: 8px;
    padding: 1rem;
}

.radio-group .form-check {
    margin-bottom: 0.5rem;
}

.radio-group .form-check:last-child {
    margin-bottom: 0;
}

/* Кнопка отправки формы */
.auth-submit-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    width: 100%;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Ссылки в форме */
.auth-link {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    color: #7C3AED !important;
    text-decoration: underline;
}

/* Текст в форме */
.auth-text {
    color: var(--text-light);
    text-align: center;
    margin: 0;
}

.auth-text-muted {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
}

/* Иконки в полях ввода */
.input-group-text {
    background: var(--darker-bg) !important;
    border: 1px solid #363636 !important;
    border-right: none !important;
    color: var(--text-muted) !important;
}

.input-group .form-control {
    border-left: none !important;
}

/* Алерты и уведомления */
.alert-auth {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    border-radius: 8px;
    padding: 1rem;
}

.alert-auth-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: #27ae60;
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        border-radius: 8px;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
}

.password-container {
    position: relative;
}

.input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8B5CF6;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    background-color: rgba(139, 92, 246, 0.1);
    color: #7C3AED;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-container .form-control {
    padding-right: 45px;
}

.form-control:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

.chat-image {
    transition: transform 0.3s ease;
    max-width: 100%;
    object-fit: cover;
}

.chat-image:hover {
    transform: scale(1.02);
}

.chat-image.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 9999;
    max-height: 80vh !important;
    max-width: 80vw !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    cursor: zoom-out;
}

/* Индикатор загрузки изображений */
.chat-image.loading {
    background: linear-gradient(90deg, #2d2d2d 25%, #3d3d3d 50%, #2d2d2d 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    min-height: 200px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Затемнение фона при увеличении изображения */
.chat-image.expanded::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: -1;
}

/* Индикатор типа сообщения */
.message-image-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #8B5CF6;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}