:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
}

body {
    background: var(--bg-dark);
    color: #e2e8f0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    padding: 20px;
    min-height: 100vh;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 40px 0;
    border-radius: 20px;
    margin-bottom: 30px;
    text-align: center;
    color: white;
}

.file-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.file-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    margin-right: 15px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-info {
    flex-grow: 1;
    min-width: 0; /* Для правильного переноса текста */
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-all;
    color: #e2e8f0;
}

.file-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.badge-type {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    cursor: pointer;
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-copy {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.stats-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border-left: 4px solid var(--primary);
    margin-bottom: 20px;
}

.stats-card h3 {
    margin: 0;
    font-size: 2rem;
    color: #e2e8f0;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    width: 100%;
    margin-bottom: 20px;
    font-size: 1rem;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.footer-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .file-card {
        flex-wrap: wrap;
    }
    
    .file-info {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .file-actions {
        display: flex;
        gap: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .btn-copy, .btn-download {
        flex-grow: 1;
        justify-content: center;
    }
}

/* Анимация загрузки */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Стили для статистики */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
