/* /css/dashboard-styles.css */

.login-container {
	min-height: 100vh;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.login-card {
	background: white;
	border-radius: 15px;
	box-shadow: 0 15px 35px rgba(0,0,0,0.1);
	overflow: hidden;
	max-width: 400px;
	width: 100%;
}

.login-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 2rem;
	text-align: center;
}

.login-body {
	padding: 2rem;
}

.btn-steam {
	background: #1b2838;
	color: white;
	border: none;
	padding: 12px 24px;
	font-size: 16px;
	transition: all 0.3s ease;
}

.btn-steam:hover {
	background: #2a475e;
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Основные стили панели управления */
.code-editor { 
    width: 100%; 
    height: 400px; 
    font-family: 'Courier New', monospace; 
    font-size: 14px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.page-item { 
    transition: all 0.3s ease; 
}

.page-item:hover { 
    background-color: #f8f9fa; 
}

.language-badge { 
    font-size: 0.7em; 
}

/* Стили для продвинутого редактора */
.advanced-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.editor-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.editor-toolbar .btn-group {
    margin-right: 8px;
}

.editor-toolbar .btn {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    background: white;
    color: #333;
}

.editor-toolbar .btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.editor-content {
    min-height: 400px;
    padding: 15px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: white;
}

.editor-content:focus {
    outline: 2px solid #1b2838;
    outline-offset: -2px;
}

/* Дополнительные стили для изображений в редакторе */
#html_editor img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

#html_editor img[style*="float: left"] {
    float: left !important;
    margin: 0 20px 20px 0 !important;
    max-width: 50%;
    clear: left;
}

#html_editor img[style*="float: right"] {
    float: right !important;
    margin: 0 0 20px 20px !important;
    max-width: 50%;
    clear: right;
}

#html_editor img[style*="center"] {
    display: block !important;
    margin: 20px auto !important;
    max-width: 100%;
    text-align: center;
}

/* Стили для выравнивания текста в редакторе */
#html_editor {
    text-align: left;
}

#html_editor [style*="text-align: center"],
#html_editor .text-center {
    text-align: center !important;
}

#html_editor [style*="text-align: right"],
#html_editor .text-right {
    text-align: right !important;
}

#html_editor [style*="text-align: left"],
#html_editor .text-left {
    text-align: left !important;
}

#html_editor [style*="text-align: justify"],
#html_editor .text-justify {
    text-align: justify !important;
}

/* Clearfix для правильного обтекания */
#html_editor .clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Стили для параграфов */
#html_editor p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Подсветка выбранного изображения */
#html_editor img:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Контейнер для изображений */
#html_editor .image-container {
    margin: 20px 0;
    text-align: center;
}

#html_editor .image-caption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 8px;
    font-size: 14px;
}


/* Steam-подобные стили контента */
.steam-news-content, .steam-guide-content {
    max-width: 800px;
    margin: 0 auto;
}

.news-header, .guide-header {
    border-bottom: 2px solid #1b2838;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.news-meta, .guide-meta {
    color: #666;
    font-size: 14px;
}

.news-meta span, .guide-meta span {
    margin-right: 15px;
}

.highlight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tip-box {
    background: #e8f4fd;
    border-left: 4px solid #1b2838;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.image-container {
    margin: 20px 0;
    text-align: center;
}

.image-caption {
    /*color: #666;*/
    font-size: 14px;
    margin-top: 8px;
    font-style: italic;
}

.image-comparison {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.image-half {
    flex: 1;
    text-align: center;
}

.image-label {
    margin-top: 5px;
    font-weight: bold;
    color: #333;
}

.guide-toc {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border-left: 4px solid #1b2838;
}

/* Модальное окно загрузки изображений */
.image-manager-modal .modal-dialog {
    max-width: 90%;
    max-height: 90vh;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.image-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.image-item:hover {
    border-color: #1b2838;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-item img {
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 2px;
}

.image-item .filename {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    word-break: break-all;
    font-family: monospace;
}

.image-actions {
    margin-top: 8px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #1b2838;
    background: #f0f8ff;
}

.upload-area i {
    font-size: 48px;
    color: #666;
    margin-bottom: 15px;
}

.upload-area h5 {
    color: #333;
    margin-bottom: 10px;
}

.upload-area .text-muted {
    color: #6c757d !important;
}

/* Кнопки редактора */
.btn-editor {
    background: #1b2838;
    color: white;
    border: none;
    font-weight: 500;
}

.btn-editor:hover {
    background: #2a475e;
    color: white;
    transform: translateY(-1px);
}

/* Стили для предпросмотра */
.preview-content {
    background: white;
    border-radius: 4px;
    min-height: 300px;
    font-family: Arial, sans-serif;
}

/* Стили для таблиц */
.table-responsive {
    border-radius: 4px;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background-color: rgba(27, 40, 56, 0.05);
}

/* Стили для карточек */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.125);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,0.125);
    font-weight: 600;
}

/* Стили для навигации */
.navbar-brand {
    font-weight: 700;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Стили для выпадающих меню */
.dropdown-menu {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
}

.dropdown-item {
    transition: background-color 0.2s ease;
}

/* Стили для уведомлений */
.alert {
	margin-left: 2%;
    border: none;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
    background: #d1e7dd;
}

.alert-warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

/* Стили для баджей */
.badge {
    font-weight: 500;
}

/* Стили для форм */
.form-control:focus, .form-select:focus {
    border-color: #1b2838;
    box-shadow: 0 0 0 0.2rem rgba(27, 40, 56, 0.25);
}

.form-check-input:checked {
    background-color: #1b2838;
    border-color: #1b2838;
}

/* Стили для кнопок */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Стили для списков */
.list-group-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.125);
}

.list-group-item:hover {
    background-color: #f8f9fa;
    border-color: #1b2838;
}

.list-group-item.active {
    background-color: #1b2838;
    border-color: #1b2838;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .editor-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .editor-toolbar .btn-group {
        margin-right: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    
    .editor-toolbar .ms-auto {
        margin-left: 0 !important;
        width: 100%;
        margin-top: 8px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .image-comparison {
        flex-direction: column;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .upload-area i {
        font-size: 36px;
    }
}

/* Стили для скроллбара */
.image-grid::-webkit-scrollbar {
    width: 6px;
}

.image-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.image-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.image-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Стили для состояния загрузки */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1b2838;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Стили для пустых состояний */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Стили для футера */
footer {
    margin-top: auto;
}