/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: repeat url("https://admcher.ru/wp-content/uploads/2025/12/foto-risunka-tekstury-steny.webp");
    color: #333; /* Измените цвет текста по необходимости */
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    position: relative; /* Обязательно для позиционирования псевдоэлемента */
    z-index: 1; /* Убедитесь, что содержимое страницы находится выше оверлея */
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Темный полупрозрачный оверлей */
    z-index: -1; /* Помещаем оверлей под содержимое body, но над фоном */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Шапка */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo i {
    font-size: 48px;
    color: #3498db;
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
}

.header-info {
    display: flex;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.info-item i {
    font-size: 20px;
}

/* Основной контент */
.main-content {
    padding: 40px;
}

/* Панель управления */
.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 18px;
}

#search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#sort-select {
    padding: 14px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 5px;
}

.view-btn {
    padding: 10px 15px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #7f8c8d;
    transition: all 0.3s;
}

.view-btn.active {
    background: white;
    color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Информационная панель */
.info-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #e8f4fc;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #3498db;
    flex: 1;
}

.info-card i {
    font-size: 24px;
    color: #3498db;
}

.info-card h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.stats {
    background: #2c3e50;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
}

/* Контейнер файлов */
.files-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    min-height: 300px;
}

.files-container.list-view {
    grid-template-columns: 1fr;
}

.file-card {
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-card:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.15);
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.file-icon {
    font-size: 42px;
    margin-bottom: 20px;
    color: #3498db;
}

.file-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    word-break: break-word;
}

.file-size {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.file-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-info, .btn-download {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-info {
    background: #f8f9fa;
    color: #495057;
}

.btn-download {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-info:hover {
    background: #e9ecef;
}

.btn-download:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: scale(1.05);
}

/* Стили для списка */
.file-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.file-item:hover {
    border-color: #3498db;
    background: #f8fafc;
}

.file-item-icon {
    font-size: 28px;
    color: #3498db;
    margin-right: 20px;
    min-width: 40px;
}

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

.file-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.file-item-details {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

/* Загрузка */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 72px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
}

/* Путь */
.path-display {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 12px;
    font-family: monospace;
    color: #495057;
    margin-top: 30px;
}

.path-display i {
    color: #3498db;
    margin-right: 10px;
}

/* Подвал */
.footer {
    background: #2c3e50;
    color: white;
    padding: 50px 40px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section h4 i {
    color: #3498db;
}

.footer-section p {
    margin-bottom: 10px;
    opacity: 0.9;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

 .footer-signature {
    margin: 0;
    font-size: 14px;
    letter-spacing: 1px;
    color: #0d1b2a;
    font-family: "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.5s ease forwards;
    animation-delay: .8s;
}

.footer-signature span {
    color: #0d1b2a;
    font-weight: 600;
    transition: color .3s;
}

.footer-signature span:hover {
    color: #4dabf7;
}


.version {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.6;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

.modal-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 40px 40px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-icon {
    font-size: 48px;
}

.modal-body {
    padding: 30px 40px;
}

.file-info {
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.info-label {
    color: #7f8c8d;
}

.info-value {
    font-weight: 600;
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-cancel {
    padding: 14px 28px;
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-cancel:hover {
    background: #e9ecef;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        width: 100%;
    }
    
    .control-panel {
        flex-direction: column;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .files-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Стили для кнопки обновления */
.refresh-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #27ae60, #219653);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn.spinning i {
    animation: spin 1s linear infinite;
}

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

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
    border-left: 4px solid #3498db;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #2ecc71;
}

.notification-error {
    border-left-color: #e74c3c;
}

.notification-info {
    border-left-color: #3498db;
}

.notification i {
    font-size: 20px;
}

.notification-success i {
    color: #2ecc71;
}

.notification-error i {
    color: #e74c3c;
}

.notification-info i {
    color: #3498db;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #7f8c8d;
    cursor: pointer;
    margin-left: auto;
    padding: 0 0 0 10px;
}

.notification-close:hover {
    color: #e74c3c;
}